|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.limegroup.gnutella.gui.InputFieldDialog
This class creates a generic input field that gets a line of text input from the user in a JDialog. It gives the user "OK" and "Cancel" button options, and the constructor takes keys for locale- specific strings that allow customization of the dialog caption as well as the label on the input field.
Field Summary | |
static int |
CANCELLED
The return code for when the user cancelled the action. |
static int |
NO_TEXT_ENTERED
The return code for when the user has pressed ok but not entered any text. |
static int |
TEXT_ENTERED
The return code for when the user has entered some text. |
Constructor Summary | |
InputFieldDialog(java.lang.String LABEL_KEY)
Constructs an input field with a generic caption and a specialized label for the field. |
|
InputFieldDialog(java.lang.String CAPTION_KEY,
java.lang.String LABEL_KEY)
Constructs an input field using the specified locale-specific keys for both the caption and the field label. |
Method Summary | |
java.lang.String |
getText()
Returns the text contained in the wrapped text field. |
int |
showDialog()
Displays the modal dialog, returning the appropriate return code to the caller. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int NO_TEXT_ENTERED
public static final int CANCELLED
public static final int TEXT_ENTERED
Constructor Detail |
public InputFieldDialog(java.lang.String LABEL_KEY)
LABEL_KEY
- the key for the locale-specific label of the fieldpublic InputFieldDialog(java.lang.String CAPTION_KEY, java.lang.String LABEL_KEY)
CAPTION_KEY
- the key for the locale-specific dialog captionLABEL_KEY
- the key for the locale-specific label of the fieldMethod Detail |
public int showDialog()
public java.lang.String getText()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |