borland Packages  Class Hierarchy  jbcl.model Package  Index 

ItemEditMaskStr class

java.lang.Object
   +----borland.jbcl.model.ItemEditMaskStr

About the ItemEditMaskStr class

Constructors  Properties  Methods  

Implements ItemEditMask, ItemEditMaskRegionChar, Serializable

The ItemEditMaskStr class implements the ItemEditMask interface using pattern strings to control formatting, parsing, and edit interactions.

For information about constructing an edit mask, see string-based patterns.


ItemEditMaskStr constructors

ItemEditMaskStr properties

*Read-only properties **Write-only properties

Properties implemented in java.lang.Object

ItemEditMaskStr methods

Methods implemented in this class

Methods implemented in java.lang.Object


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. See string-based patterns for more information about constructing an edit mask.

Parameters:

editMask
The 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.

literalAt(int)

  public char literalAt(int charPosition)

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.