de.hillenbrand.jreqtools
Class GenericOkCancelRequester

java.lang.Object
  extended by de.hillenbrand.jreqtools.AbstractRequester
      extended by de.hillenbrand.jreqtools.OkCancelRequester
          extended by de.hillenbrand.jreqtools.GenericOkCancelRequester

public class GenericOkCancelRequester
extends OkCancelRequester

This is a generic and configurable requester.


Nested Class Summary
static class GenericOkCancelRequester.Tab
           
static class GenericOkCancelRequester.TypeConfig
           
 
Field Summary
static int TYPE_BOOLEAN
           
static int TYPE_BYTE
           
static int TYPE_CHOICE
           
static int TYPE_DATE
           
static int TYPE_DIRECTORY
           
static int TYPE_DOUBLE
           
static int TYPE_EDITABLE_CHOICE
           
static int TYPE_EDITABLE_LIST
           
static int TYPE_FILE
           
static int TYPE_FLOAT
           
static int TYPE_INTEGER
           
static int TYPE_LONG
           
static int TYPE_MULTI_SELECTION
           
static int TYPE_PASSWORD
           
static int TYPE_PHONE
           
static int TYPE_SHORT
           
static int TYPE_SINGLE_SELECTION
           
static int TYPE_STRING
           
static int TYPE_TEXT
           
static int TYPE_TIME_HHMM
           
static int TYPE_TIME_HHMMSS
           
static int TYPE_TIME_HHMMSSmmm
           
static int TYPE_URI
           
 
Fields inherited from class de.hillenbrand.jreqtools.OkCancelRequester
answer, cancel, comment, drawFirstSeparator, drawSecondSeparator, icon, ok
 
Fields inherited from class de.hillenbrand.jreqtools.AbstractRequester
CANCEL, dialog, listener, message, OK, title
 
Constructor Summary
GenericOkCancelRequester(java.lang.String message, GenericOkCancelRequester.TypeConfig[] types)
           
GenericOkCancelRequester(java.lang.String title, java.lang.String message, GenericOkCancelRequester.TypeConfig[] types)
           
 
Method Summary
protected  java.lang.String check(java.lang.String text, StringChecker checker)
           
protected static int[] convertToIntArray(java.lang.Object o)
           
protected  javax.swing.JComponent createJComponent(GenericOkCancelRequester.TypeConfig tc)
           
 java.lang.Object getResult(int index)
          Returns the value of TypeConfig at index.
protected  javax.swing.JPanel getUserPanel()
           
protected  void ok()
           
protected  void prepareForRequest()
          This method is being called directly before the dialog will be shown.
 void setRenderer(int i, java.lang.Object renderer)
           
 void setTabFont(java.awt.Font f)
          Sets the font for the tabbedpane.
 void setTabLayoutPolicy(int policy)
          Sets the tab placement for the tabbedpane.
 void setTabPlacement(int placement)
          Sets the tab placement for the tabbedpane.
 void setValue(int index, java.lang.Object value)
          Sets the value of TypeConfig at index.
protected  java.lang.String validateData()
           
 
Methods inherited from class de.hillenbrand.jreqtools.OkCancelRequester
cancel, createContentPane, getComment, getDefaultButton, getIcon, getOkTriggerComponent, getPreferredRequesterSize, getReturnValue, isDrawFirstSeparator, isDrawSecondSeparator, setCancelButtonText, setComment, setDrawFirstSeparator, setDrawSecondSeparator, setDrawSeparators, setIcon, setOkButtonText, simulateCancelPressed, simulateOkPressed
 
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

TYPE_STRING

public static final int TYPE_STRING
See Also:
Constant Field Values

TYPE_SHORT

public static final int TYPE_SHORT
See Also:
Constant Field Values

TYPE_INTEGER

public static final int TYPE_INTEGER
See Also:
Constant Field Values

TYPE_LONG

public static final int TYPE_LONG
See Also:
Constant Field Values

TYPE_FLOAT

public static final int TYPE_FLOAT
See Also:
Constant Field Values

TYPE_DOUBLE

public static final int TYPE_DOUBLE
See Also:
Constant Field Values

TYPE_PASSWORD

public static final int TYPE_PASSWORD
See Also:
Constant Field Values

TYPE_CHOICE

public static final int TYPE_CHOICE
See Also:
Constant Field Values

TYPE_EDITABLE_CHOICE

public static final int TYPE_EDITABLE_CHOICE
See Also:
Constant Field Values

TYPE_TEXT

public static final int TYPE_TEXT
See Also:
Constant Field Values

TYPE_SINGLE_SELECTION

public static final int TYPE_SINGLE_SELECTION
See Also:
Constant Field Values

TYPE_MULTI_SELECTION

public static final int TYPE_MULTI_SELECTION
See Also:
Constant Field Values

TYPE_EDITABLE_LIST

public static final int TYPE_EDITABLE_LIST
See Also:
Constant Field Values

TYPE_BYTE

public static final int TYPE_BYTE
See Also:
Constant Field Values

TYPE_DATE

public static final int TYPE_DATE
See Also:
Constant Field Values

TYPE_FILE

public static final int TYPE_FILE
See Also:
Constant Field Values

TYPE_DIRECTORY

public static final int TYPE_DIRECTORY
See Also:
Constant Field Values

TYPE_TIME_HHMM

public static final int TYPE_TIME_HHMM
See Also:
Constant Field Values

TYPE_TIME_HHMMSS

public static final int TYPE_TIME_HHMMSS
See Also:
Constant Field Values

TYPE_TIME_HHMMSSmmm

public static final int TYPE_TIME_HHMMSSmmm
See Also:
Constant Field Values

TYPE_BOOLEAN

public static final int TYPE_BOOLEAN
See Also:
Constant Field Values

TYPE_URI

public static final int TYPE_URI
See Also:
Constant Field Values

TYPE_PHONE

public static final int TYPE_PHONE
See Also:
Constant Field Values
Constructor Detail

GenericOkCancelRequester

public GenericOkCancelRequester(java.lang.String message,
                                GenericOkCancelRequester.TypeConfig[] types)

GenericOkCancelRequester

public GenericOkCancelRequester(java.lang.String title,
                                java.lang.String message,
                                GenericOkCancelRequester.TypeConfig[] types)
Method Detail

check

protected java.lang.String check(java.lang.String text,
                                 StringChecker checker)

convertToIntArray

protected static int[] convertToIntArray(java.lang.Object o)

createJComponent

protected javax.swing.JComponent createJComponent(GenericOkCancelRequester.TypeConfig tc)

getResult

public java.lang.Object getResult(int index)
Returns the value of TypeConfig at index.

Parameters:
index - index of the TypeConfig
Returns:

getUserPanel

protected javax.swing.JPanel getUserPanel()
Specified by:
getUserPanel in class OkCancelRequester

ok

protected void ok()
Overrides:
ok in class OkCancelRequester

prepareForRequest

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

Overrides:
prepareForRequest in class OkCancelRequester

setRenderer

public void setRenderer(int i,
                        java.lang.Object renderer)

setTabFont

public void setTabFont(java.awt.Font f)
Sets the font for the tabbedpane.

Parameters:
f -

setTabLayoutPolicy

public void setTabLayoutPolicy(int policy)
Sets the tab placement for the tabbedpane. Tab layout policy may be either: JTabbedPane.WRAP_TAB_LAYOUT or JTabbedPane.SCROLL_TAB_LAYOUT.

Parameters:
policy -

setTabPlacement

public void setTabPlacement(int placement)
Sets the tab placement for the tabbedpane. Tab placement may be either: JTabbedPane.TOP, JTabbedPane.BOTTOM, JTabbedPane.LEFT, or JTabbedPane.RIGHT.

Parameters:
placement -

setValue

public void setValue(int index,
                     java.lang.Object value)
Sets the value of TypeConfig at index.

Parameters:
index - index of the TypeConfig
value - value to assign to that index

validateData

protected java.lang.String validateData()
Overrides:
validateData in class OkCancelRequester