thinwire.ui
Interface MaskEditorComponent
- All Superinterfaces:
- AlignTextComponent, Component, EditorComponent, TextComponent
- All Known Implementing Classes:
- DropDown, DropDownDateBox, DropDownGridBox, TextField
public interface MaskEditorComponent
- extends EditorComponent
Fields inherited from interface thinwire.ui.Component |
ACTION_CLICK, ACTION_DOUBLE_CLICK, PROPERTY_ENABLED, PROPERTY_FOCUS, PROPERTY_FOCUS_CAPABLE, PROPERTY_HEIGHT, PROPERTY_LIMIT, PROPERTY_USER_OBJECT, PROPERTY_VISIBLE, PROPERTY_WIDTH, PROPERTY_X, PROPERTY_Y |
Method Summary |
java.lang.String |
getEditMask()
Get this TextField's edit mask |
boolean |
isFormatText()
Determines whether the text returned by getText() is formatted. |
void |
setEditMask(java.lang.String editMask)
This method accepts an edit mask as a String and applies it to the text field. |
void |
setFormatText(boolean formatText)
Sets whether the text returned by getText() is formatted. |
Methods inherited from interface thinwire.ui.Component |
addActionListener, addActionListener, addDropListener, addDropListener, addKeyPressListener, addKeyPressListener, addPropertyChangeListener, addPropertyChangeListener, fireAction, fireAction, fireAction, fireDrop, fireDrop, fireDrop, fireKeyPress, fireKeyPress, getContainer, getHeight, getLabel, getLimit, getParent, getStyle, getUserObject, getWidth, getX, getY, isEnabled, isFocus, isFocusCapable, isVisible, removeActionListener, removeDropListener, removeKeyPressListener, removePropertyChangeListener, setBounds, setEnabled, setFocus, setFocusCapable, setHeight, setLimit, setPosition, setSize, setUserObject, setVisible, setWidth, setX, setY |
PROPERTY_EDIT_MASK
static final java.lang.String PROPERTY_EDIT_MASK
- See Also:
- Constant Field Values
PROPERTY_FORMAT_TEXT
static final java.lang.String PROPERTY_FORMAT_TEXT
- See Also:
- Constant Field Values
getEditMask
java.lang.String getEditMask()
- Get this TextField's edit mask
- Returns:
- the edit mask
setEditMask
void setEditMask(java.lang.String editMask)
- This method accepts an edit mask as a String and applies it to the text field.
- Parameters:
editMask
-
isFormatText
boolean isFormatText()
- Determines whether the text returned by getText() is formatted.
- Returns:
- true if the text is formatted, false otherwise. Default is true.
setFormatText
void setFormatText(boolean formatText)
- Sets whether the text returned by getText() is formatted.
If an editMask is specified that contains with format charcters, such as ###,###,###.## and
this property is set to false, then the value returned by getText will not contain the the
commas from the editMask. i.e. If the value in the field is 123,456.78 then 123456.78 would
be returned. Whereas, if this property is set to true then 123,456.78 would be returned.
Another example would be with a mask of MM/dd/yyyy, value of 11/21/1978. With this set to false
you would get the value 11211978 by calling getText(), with it set to true, you'd get 11/21/1978.
- Parameters:
formatText
- true if you want the text formattted, false otherwise. Default is true.