| |
|
| javax.swing.JTextField abbot.editor.widgets.TextField
TextField | public class TextField extends JTextField (Code) | | A better text field with some useful features.
- Fires when focus leaves the component.
- Selects all the contents when the action is fired to indicate the
contents were accepted.
- Until the user causes a notify-field-accept (usually with the
Enter key), the contents may be reverted to the original value by invoking
the field-revert action (bound to ESC by default).
- Actions are fired on all edits.
- The field has a fixed height.
- Pressing Enter when the field is blank will insert a default value, if
one has been provided.
This functionality may be applied to any JTextField with the
TextField.decorate(JTextField) method.
|
Inner Class :public static class Decorator | |
ACTION_FOCUS_LOST | final public static String ACTION_FOCUS_LOST(Code) | | Action command when the field loses focus.
|
ACTION_TEXT_CHANGED | final public static String ACTION_TEXT_CHANGED(Code) | | Action command when the text changes.
|
ACTION_TEXT_INSERTED | final public static String ACTION_TEXT_INSERTED(Code) | | Action command when text is inserted.
|
ACTION_TEXT_REMOVED | final public static String ACTION_TEXT_REMOVED(Code) | | Action command when text is removed.
|
ACTION_TEXT_REVERTED | final public static String ACTION_TEXT_REVERTED(Code) | | Action command when the field reverts to its original value. The
action is equivalent to typing the original text and hitting "enter".
|
fireActionPerformed | protected void fireActionPerformed()(Code) | | |
getMaximumSize | public Dimension getMaximumSize()(Code) | | Don't allow text field to resize height.
|
getMinimumSize | public Dimension getMinimumSize()(Code) | | Don't allow text field to resize height.
|
isDocumentAction | public static boolean isDocumentAction(String action)(Code) | | |
setDefaultValue | public void setDefaultValue(String value)(Code) | | The default value will be inserted when the field is blank and ENTER
is pressed. This behavior is disabled if the value is null.
|
|
|
|