All Packages Class Hierarchy This Package Previous Next Index
Class dtai.gwt.MaskedTextFieldGadget
java.lang.Object
|
+----dtai.gwt.Gadget
|
+----dtai.gwt.ContainerGadget
|
+----dtai.gwt.PanelGadget
|
+----dtai.gwt.BorderGadget
|
+----dtai.gwt.TextFieldGadget
|
+----dtai.gwt.MaskedTextFieldGadget
- public class MaskedTextFieldGadget
- extends TextFieldGadget
a = for any alphabetical character
A = for any alphabetical character, convert lower case to uppercase
9 = for numbers only
x = for any alphanumeric character
X = for any alphanumeric character, convert lower case to uppercase
c = any keyboard character
C = any keyboard character, convert lower case to uppercase
You can define special characters that can be typed in anywhere
You can specify limit characters and corresponding legal values (no case conversion)
all other characters, such as (-, + $) are treated as masking characters
These codes are then used to create an input mask. For example an US Social
Security Number mask would be entered as 999-99-9999. The nines stand for
numbers while the hyphens are used as masking characters that are automatically
displayed.
-
MaskedTextFieldGadget()
- Constructs a Text with no text or mask.
-
MaskedTextFieldGadget(String)
- Constructs a Text with the specified mask and no text.
-
MaskedTextFieldGadget(String, String)
- Constructs a Text with the specified text and mask.
-
MaskedTextFieldGadget(String, String, MaskedTextLine)
- MaskedTextFieldGadget
-
getFont(GadgetGraphics)
- getFont
-
getInputText()
- Gets the text without mask characters.
-
getMask()
- Gets the mask of the button.
-
setMask(String)
- Sets the mask.
-
setNewLimitChar(char, String)
- specify a new limit character and its legal values
-
setSpecialChar(char)
- set a character that can be anywhere
MaskedTextFieldGadget
public MaskedTextFieldGadget()
- Constructs a Text with no text or mask.
MaskedTextFieldGadget
public MaskedTextFieldGadget(String mask)
- Constructs a Text with the specified mask and no text.
- Parameters:
- mask - - the mask of the button
MaskedTextFieldGadget
public MaskedTextFieldGadget(String mask,
String text)
- Constructs a Text with the specified text and mask.
- Parameters:
- mask - - the mask of the button
- text - - the text of the button
MaskedTextFieldGadget
protected MaskedTextFieldGadget(String mask,
String text,
MaskedTextLine line)
- MaskedTextFieldGadget
- Parameters:
- mask - - the mask of the button
- text - - the text of the button
- line - - the line of masked text
getFont
public Font getFont(GadgetGraphics g)
- getFont
- Parameters:
- g - the GadgetGraphics object
- Returns:
- Font
- Overrides:
- getFont in class Gadget
getInputText
public String getInputText()
- Gets the text without mask characters.
- Returns:
- the unmaksed text
- See Also:
- setText
getMask
public String getMask()
- Gets the mask of the button.
- Returns:
- the mask
- See Also:
- setText
setMask
public void setMask(String mask)
- Sets the mask.
- Parameters:
- mask - - the mask
- See Also:
- getMask
setSpecialChar
public void setSpecialChar(char c)
- set a character that can be anywhere
- Parameters:
- c - new special character
setNewLimitChar
public void setNewLimitChar(char c,
String limits)
- specify a new limit character and its legal values
- Parameters:
- c - new limit character
- limits - legal values for limit character
All Packages Class Hierarchy This Package Previous Next Index