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, PropertyFileEditorRequester, SelectRequester, StringRequester, TextRequester

public abstract class OkCancelRequester
extends AbstractRequester


Field Summary
protected  int answer
           
protected  javax.swing.JButton cancel
           
protected  java.lang.String comment
           
protected  boolean drawFirstSeparator
           
protected  boolean drawSecondSeparator
           
protected  javax.swing.Icon icon
           
protected  javax.swing.JButton ok
           
 
Fields inherited from class de.hillenbrand.jreqtools.AbstractRequester
CANCEL, dialog, 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.JPanel createContentPane()
           
 java.lang.String getComment()
          Returns the value of the comment property.
protected  javax.swing.JButton getDefaultButton()
           
 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()
           
 boolean isDrawFirstSeparator()
           
 boolean isDrawSecondSeparator()
           
protected  void ok()
           
protected  void prepareForRequest()
          This method is being called directly before the dialog will be shown.
 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 setDrawFirstSeparator(boolean drawFirstSeparator)
           
 void setDrawSecondSeparator(boolean drawSecondSeparator)
           
 void setDrawSeparators(boolean drawSeparators)
           
 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
_checkLocation, _checkLocation, _checkSize, _checkSize, checkForClass, enableHelpKey4JavaHelp, getBounds, getLocation, getMessage, getSize, getTitle, request, request, request, setBorder, setBounds, setBounds, setLocation, setLocation, setMessage, setSize, setSize, setTitle, setVisible, showError, showException, showMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

answer

protected int answer

comment

protected java.lang.String comment

ok

protected final javax.swing.JButton ok

cancel

protected final javax.swing.JButton cancel

icon

protected javax.swing.Icon icon

drawFirstSeparator

protected boolean drawFirstSeparator

drawSecondSeparator

protected boolean drawSecondSeparator
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

isDrawFirstSeparator

public boolean isDrawFirstSeparator()

setDrawFirstSeparator

public void setDrawFirstSeparator(boolean drawFirstSeparator)

isDrawSecondSeparator

public boolean isDrawSecondSeparator()

setDrawSecondSeparator

public void setDrawSecondSeparator(boolean drawSecondSeparator)

setDrawSeparators

public void setDrawSeparators(boolean drawSeparators)

cancel

protected void cancel()

createContentPane

protected javax.swing.JPanel createContentPane()
Specified by:
createContentPane in class AbstractRequester

getComment

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

Returns:

getDefaultButton

protected javax.swing.JButton getDefaultButton()
Overrides:
getDefaultButton in class AbstractRequester

getIcon

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

Returns:

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.

Returns:

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

setCancelButtonText

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

Parameters:
text -

setComment

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

Parameters:
arg -

setIcon

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

Parameters:
arg -

setOkButtonText

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

Parameters:
text -

simulateCancelPressed

public void simulateCancelPressed()

simulateOkPressed

public void simulateOkPressed()

validateData

protected java.lang.String validateData()