de.hillenbrand.jreqtools
Class OkCancelRequester

java.lang.Object
  extended by de.hillenbrand.jreqtools.AbstractRequester
      extended by de.hillenbrand.jreqtools.OkCancelRequester
Direct Known Subclasses:
ChangePasswordRequester, ColorRequester, ColorRequester2, FileEditorRequester, FileRequester, FontRequester, GenericOkCancelRequester, HBorderRequester, IconRequester, LoginRequester, PasswordRequester, SelectRequester, StringRequester, TextRequester

public abstract class OkCancelRequester
extends AbstractRequester


Field Summary
protected  int answer
           
protected  java.lang.String comment
           
protected  javax.swing.JDialog dialog
           
protected  javax.swing.Icon icon
           
 
Fields inherited from class de.hillenbrand.jreqtools.AbstractRequester
CANCEL, listener, message, OK, title
 
Constructor Summary
OkCancelRequester(java.lang.String title, java.lang.String message)
           
OkCancelRequester(java.lang.String title, java.lang.String message, javax.swing.Icon icon)
           
 
Method Summary
protected  void cancel()
           
protected  javax.swing.JDialog createJDialog(java.awt.Window parent)
           
 java.lang.String getComment()
          Returns the value of the comment property.
 javax.swing.Icon getIcon()
          Returns the value of the icon property.
protected  javax.swing.JComponent getOkTriggerComponent()
           
protected  java.awt.Dimension getPreferredRequesterSize()
          Return the preferred size of the dialog's frame to be used when the requester opens for the first time.
protected  int getReturnValue()
           
protected abstract  javax.swing.JPanel getUserPanel()
           
protected  void ok()
           
protected  void prepareForRequest()
          This method is being called directly before the dialog will be shown.
 int request(OkCancelRequester ar)
           
 void setCancelButtonText(java.lang.String text)
          Sets the text of the "Cancel" button.
 void setComment(java.lang.String arg)
          Assigns the value of the comment property.
 void setIcon(javax.swing.Icon arg)
          Assigns the value of the icon property.
 void setOkButtonText(java.lang.String text)
          Sets the text of the "Ok" button.
 void simulateCancelPressed()
           
 void simulateOkPressed()
           
protected  java.lang.String validateData()
           
 
Methods inherited from class de.hillenbrand.jreqtools.AbstractRequester
enableHelpKey4JavaHelp, getBounds, getLocation, getMessage, getSize, getTitle, request, request, setBounds, setBounds, setLocation, setLocation, setMessage, setParentComponent, setSize, setSize, setTitle, showError, showMessage, showNotYetImplemented
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

answer

protected int answer

dialog

protected javax.swing.JDialog dialog

comment

protected java.lang.String comment

icon

protected javax.swing.Icon icon
Constructor Detail

OkCancelRequester

public OkCancelRequester(java.lang.String title,
                         java.lang.String message)

OkCancelRequester

public OkCancelRequester(java.lang.String title,
                         java.lang.String message,
                         javax.swing.Icon icon)
Method Detail

cancel

protected void cancel()

createJDialog

protected javax.swing.JDialog createJDialog(java.awt.Window parent)
Specified by:
createJDialog in class AbstractRequester

getComment

public java.lang.String getComment()
Returns the value of the comment property.


getIcon

public javax.swing.Icon getIcon()
Returns the value of the icon property.


getOkTriggerComponent

protected javax.swing.JComponent getOkTriggerComponent()

getPreferredRequesterSize

protected java.awt.Dimension getPreferredRequesterSize()
Return the preferred size of the dialog's frame to be used when the requester opens for the first time. If it returns null, Dialog.pack() will be used ti determine the preferred size.


getReturnValue

protected int getReturnValue()
Specified by:
getReturnValue in class AbstractRequester

getUserPanel

protected abstract javax.swing.JPanel getUserPanel()

ok

protected void ok()

prepareForRequest

protected void prepareForRequest()
Description copied from class: AbstractRequester
This method is being called directly before the dialog will be shown.

Specified by:
prepareForRequest in class AbstractRequester

request

public int request(OkCancelRequester ar)

setCancelButtonText

public void setCancelButtonText(java.lang.String text)
Sets the text of the "Cancel" button.


setComment

public void setComment(java.lang.String arg)
Assigns the value of the comment property.


setIcon

public void setIcon(javax.swing.Icon arg)
Assigns the value of the icon property.


setOkButtonText

public void setOkButtonText(java.lang.String text)
Sets the text of the "Ok" button.


simulateCancelPressed

public void simulateCancelPressed()

simulateOkPressed

public void simulateOkPressed()

validateData

protected java.lang.String validateData()