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.


Constructor Index

 o MaskedTextFieldGadget()
Constructs a Text with no text or mask.
 o MaskedTextFieldGadget(String)
Constructs a Text with the specified mask and no text.
 o MaskedTextFieldGadget(String, String)
Constructs a Text with the specified text and mask.
 o MaskedTextFieldGadget(String, String, MaskedTextLine)
MaskedTextFieldGadget

Method Index

 o getFont(GadgetGraphics)
getFont
 o getInputText()
Gets the text without mask characters.
 o getMask()
Gets the mask of the button.
 o setMask(String)
Sets the mask.
 o setNewLimitChar(char, String)
specify a new limit character and its legal values
 o setSpecialChar(char)
set a character that can be anywhere

Constructors

 o MaskedTextFieldGadget
 public MaskedTextFieldGadget()
Constructs a Text with no text or mask.

 o MaskedTextFieldGadget
 public MaskedTextFieldGadget(String mask)
Constructs a Text with the specified mask and no text.

Parameters:
mask - - the mask of the button
 o 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
 o 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

Methods

 o getFont
 public Font getFont(GadgetGraphics g)
getFont

Parameters:
g - the GadgetGraphics object
Returns:
Font
Overrides:
getFont in class Gadget
 o getInputText
 public String getInputText()
Gets the text without mask characters.

Returns:
the unmaksed text
See Also:
setText
 o getMask
 public String getMask()
Gets the mask of the button.

Returns:
the mask
See Also:
setText
 o setMask
 public void setMask(String mask)
Sets the mask.

Parameters:
mask - - the mask
See Also:
getMask
 o setSpecialChar
 public void setSpecialChar(char c)
set a character that can be anywhere

Parameters:
c - new special character
 o 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