borland.jbcl Packages borland.jbcl Class Hierarchy borland.jbcl.model
borland.jbcl.model.ItemEditMask
Methods
Implemented by ItemEditMaskStr
The ItemEditMask interface provides an open interface for character-by-character input validation. Although this interface is not based on an ItemEditMask string in its design, there is an ItemEditMaskStr implementation which uses a control string to validate characters.
public boolean delete(borland.jbcl.model.ItemEditMaskState state, int startPos, int count)Deletes the given range of characters from the edit buffer and returns true if deletion occurred and the edit string has changed. If delete returns false, the deletion could not take place.
Usually each deleted character is replaced with an underscore character.
Parameters:
public void getFinalValue(borland.jbcl.model.ItemEditMaskState state, borland.jbcl.util.Variant value)Fetches the results from parsing the current edit buffer, storing the results into the value parameter. getFinalValue() never returns a null Variant, but it does throw an InvalidFormatException if the current edit buffer cannot be parsed. This exception class contains the cursor position where the failure occurred.
Parameters:
public void getFinalValue(borland.jbcl.model.ItemEditMaskState state, borland.jbcl.util.Variant value, int variantType)Fetches the results from parsing the current edit buffer, storing the results into the value parameter. getFinalValue() never returns a null Variant, but it does throw an InvalidFormatException if the current edit buffer cannot be parsed. This exception class contains the cursor position where the failure occurred.
Parameters:
public boolean insert(borland.jbcl.model.ItemEditMaskState state, char c)Inserts the specified character at the position given by state.cursorPos. If insert() returns true, the insert succeeded and the display string state is now different. If insert() returns false, the insert was refused. No error reporting or beeping occurs as the control is expected to do that.
Parameters:
public boolean isComplete(borland.jbcl.model.ItemEditMaskState state)Determines whether all the required fields in the edit buffer have been provided. If isComplete returns true, all required fields have been filled in. If it returns false, state.cursorPos is set at the first required character which has been left emtpy. This method does not perform validation.
Parameters:
public boolean move(borland.jbcl.model.ItemEditMaskState state, int keyCode)Handles the given navigation request starting from the specified cursor position. If the cursor position changes, move() returns true. If nothing happened, move() returns false.
Parameters:
public ItemEditMaskState prepare(borland.jbcl.util.Variant value)The initial method called when setting up for editing against the ItemEditMask interface. It returns an ItemEditMaskState, an object allocated within the prepare() method but which should be owned by the control doing the editing. It contains state information regarding the current edit string and cursor position. A null return value signifies that the ItemEditMask interface should not be used (meaning there will be no character-by-character checking during editing). prepare() instantiates some private data which is owned by the edit control.
Parameters: