|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.globus.cog.gridface.impl.util.InputField
For a listing of all Locale's go to: http://ftp.ics.uci.edu/pub/ietf/http/related/iso639.txt TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates
| Nested Class Summary |
| Nested classes inherited from class javax.swing.JPanel |
JPanel.AccessibleJPanel |
| Nested classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
static String |
FIELD_COMBOFIELD
|
static String |
FIELD_DATE_TEXTFIELD
|
static String |
FIELD_FORMATTED_TEXTFIELD
|
static String |
FIELD_TEXTAREA
|
static String |
FIELD_TEXTFIELD
|
static String |
FIELD_TIME_TEXTFIELD
|
static String |
MASK_DOUBLE
|
static String |
MASK_INT
|
static String |
MASK_POS_INT
|
| Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
InputField(String type)
|
|
InputField(String type,
Format formatter)
|
|
InputField(String type,
Format formatter,
Locale locale)
|
|
InputField(String type,
int rows,
int cols)
|
|
InputField(String type,
int rows,
int cols,
Format formatter,
Locale myLocale)
Main constructor |
|
InputField(String type,
Locale locale)
|
|
| Method Summary | |
Object[] |
getComboChoices()
returns all of the choices of a COMBOBOX as Object[] if COMBOBOX else throws an exception |
JComponent |
getField()
returns the field as JComponent |
JComboBox |
getFieldAsComboField()
returns field as JComboBox if not correct type throw exception |
JFormattedTextField |
getFieldAsFormattedTextField()
returns field as JTextArea if not correct type throw exception |
JTextArea |
getFieldAsTextArea()
returns field as JTextArea if not correct type throw exception |
JTextField |
getFieldAsTextField()
returns the field as a JTextField if it is that type else exception thrown |
String |
getString()
this is the function that allows you to get the value in any of the input types (what makes it useful) NOTE: Swing is not thread-safe and you should use SwingUtilities.invokeLater for this function |
String |
getType()
returns the type Note DateField and TimeField return are types simply predefined formatted fields so they return as JFormattedField |
void |
setMask(String match)
This sets a listener to prevent the input from looking like match as a regular expression A hint at producing a mask is to ensure that the expression is valid at every increment ie: you want it to be a valid double use: "-?\\d\*\.?\\d*" It is recommended for you to use the formatter option rather than setting a mask if there is a formatter available. |
void |
setString(String value)
This will set the value of a TEXTFIELD or TEXTAREA to value it will addItem value to a COMBOFIELD |
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final String FIELD_TEXTFIELD
public static final String FIELD_COMBOFIELD
public static final String FIELD_TEXTAREA
public static final String FIELD_FORMATTED_TEXTFIELD
public static final String FIELD_DATE_TEXTFIELD
public static final String FIELD_TIME_TEXTFIELD
public static final String MASK_DOUBLE
public static final String MASK_INT
public static final String MASK_POS_INT
| Constructor Detail |
public InputField(String type)
throws FormInputPanelException
public InputField(String type,
Locale locale)
throws FormInputPanelException
public InputField(String type,
Format formatter)
throws FormInputPanelException
public InputField(String type,
Format formatter,
Locale locale)
throws FormInputPanelException
public InputField(String type,
int rows,
int cols)
throws FormInputPanelException
public InputField(String type,
int rows,
int cols,
Format formatter,
Locale myLocale)
throws FormInputPanelException
type - the type of InputField (Defaults to InputField)rows - the number of rows (Defaults to 100)cols - the number of cols (Defaults to 10)formatter - the formatter for a FORMATTED_TEXTFIELD (Defaults to none)myLocale - the locale used for Date and Time Fields (Defaults to the default locale w/in Java)
FormInputPanelException| Method Detail |
public JComponent getField()
public JTextField getFieldAsTextField()
throws FormInputPanelException
FormInputPanelException
public JComboBox getFieldAsComboField()
throws FormInputPanelException
FormInputPanelException
public JFormattedTextField getFieldAsFormattedTextField()
throws FormInputPanelException
FormInputPanelException
public JTextArea getFieldAsTextArea()
throws FormInputPanelException
FormInputPanelException
public Object[] getComboChoices()
throws FormInputPanelException
FormInputPanelExceptionpublic String getString()
public void setString(String value)
value - String
public void setMask(String match)
throws FormInputPanelException
match - String
FormInputPanelExceptionpublic String getType()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||