thinwire.ui
Interface MaskEditorComponent

All Superinterfaces:
AlignTextComponent, Component, EditorComponent, TextComponent
All Known Implementing Classes:
DropDown, DropDownDateBox, DropDownGridBox, TextField

public interface MaskEditorComponent
extends EditorComponent


Nested Class Summary
 
Nested classes/interfaces inherited from interface thinwire.ui.AlignTextComponent
AlignTextComponent.AlignX
 
Field Summary
static java.lang.String PROPERTY_EDIT_MASK
           
static java.lang.String PROPERTY_FORMAT_TEXT
           
 
Fields inherited from interface thinwire.ui.EditorComponent
PROPERTY_CURSOR_INDEX, PROPERTY_MAX_LENGTH, PROPERTY_SELECTION_BEGIN_INDEX, PROPERTY_SELECTION_END_INDEX
 
Fields inherited from interface thinwire.ui.AlignTextComponent
PROPERTY_ALIGN_X
 
Fields inherited from interface thinwire.ui.TextComponent
PROPERTY_TEXT
 
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.EditorComponent
getCursorIndex, getMaxLength, getSelectionBeginIndex, getSelectionEndIndex, setCursorIndex, setMaxLength, setSelectionBeginIndex, setSelectionEndIndex, setSelectionRange
 
Methods inherited from interface thinwire.ui.AlignTextComponent
getAlignX, setAlignX
 
Methods inherited from interface thinwire.ui.TextComponent
getText, setText
 
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
 

Field Detail

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
Method Detail

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.


ThinWire® is a registered of Custom Credit Systems  Copyright © 2007 All rights reserved.
ThinWire_is_Open_Source_under_the_terms_of_the_LGPLv2.1 SourceForge.net_Project_Page java.net_Member Support_ThinWire,_Digg_our_Story