borland.jbcl Packages borland.jbcl Class Hierarchy borland.jbcl.model
ItemEditMaskStr class
java.lang.Object
+----borland.jbcl.model.ItemEditMaskStr
About the ItemEditMaskStr class
Constructors Properties Methods
Implements ItemEditMask, ItemEditMaskRegionChar
The ItemEditMaskStr class implements the ItemEditMask interface using pattern strings to control formatting, parsing, and edit interactions.
ItemEditMaskStr constructors
ItemEditMaskStr properties
*Read-only properties **Write-only properties
ItemEditMaskStr methods
Methods implemented in this class
- delete(borland.jbcl.model.ItemEditMaskState, int, int)
- deleteCharAt(java.lang.StringBuffer, int, char)
- getCharAt(java.lang.StringBuffer, int)
- getFinalValue(borland.jbcl.model.ItemEditMaskState, borland.jbcl.util.Variant)
- getFinalValue(borland.jbcl.model.ItemEditMaskState, borland.jbcl.util.Variant, int)
- insert(borland.jbcl.model.ItemEditMaskState, char)
- isComplete(borland.jbcl.model.ItemEditMaskState)
- isLiteral(int)
- isOptional(int)
- isPassword(int)
- isValid(int, char)
- move(borland.jbcl.model.ItemEditMaskState, int)
- prepare(borland.jbcl.util.Variant)
- setCharAt(java.lang.StringBuffer, int, char)
- shiftLeft(borland.jbcl.model.ItemEditMaskState)
ItemEditMaskStr constructors
ItemEditMaskStr(java.lang.String, borland.jbcl.model.VariantFormatter, int)
public ItemEditMaskStr(java.lang.String editMask, borland.jbcl.model.VariantFormatter formatter, int variantType)
Constructs an ItemEditMaskStr object.
Parameters:
- editMask
- The uncooked edit mask
- formatter
- The VariantFormatter used this class. If formatter is null, a default VariantFormatter is created from the other parameters.
- variantType
- One of the values contained in Variant.
ItemEditMaskStr(java.lang.String, borland.jbcl.model.VariantFormatter, int, java.util.Locale)
public ItemEditMaskStr(java.lang.String editMask, borland.jbcl.model.VariantFormatter formatter, int variantType, java.util.Locale locale)
Constructs an ItemEditMaskStr object which implements a string-based ItemEditMask.
You do not need to construct an ItemEditMask for every text field, only those you want to constrain input on a character-by-character basis.
Parameters:
- editMask
- Contains a String which controls the character-by-character editing semantics when used by a text control. If null or empty, it inherits the formatMask from the formatter parameter.
- formatter
- The VariantFormatter object used by this class. If this parameter is null, a default one will be constructed from the other parameters.
- variantType
- Contains one of the values defined in Variant. variantType defines the type of data returned from the getValue() method. If it is zero, variantType defaults to that of the formatter.
- locale
- Contains the locale to use. If null, the Locale of the formatter object is used. If formatter is also null, the current machine's default locale is used.
See also: VariantFormatStr, ItemEditMask
ItemEditMaskStr methods
isPassword(int)
public boolean isPassword(int charPosition)
Returns true if the string is the password; returns false if it is not.
Parameters:
- charPosition
- A character position in the edit mask.
shiftLeft(borland.jbcl.model.ItemEditMaskState)
protected boolean shiftLeft(borland.jbcl.model.ItemEditMaskState state)
Shifts the entire contents of the edit buffer left by one position. It stops when it hits an illegal situation (such as moving a letter into a digit field). It also stops at the first character in the string; that is, it doesn't drop characters off the left. It starts at the state.cursorPos. If that cursorPos is at a valid character, it converts that character into
a blankChar. Blank characters are not shifted, so the first blank character stops the shift.
Parameters:
- state
- The edit mask state of the control.