The JadeEditMask class is a subclass of the Control class and inherits all of the properties and methods defined in the Control and Window classes. The JadeEditMask class provides a number of features that improve the types of validation that can be performed as data is entered and the presentation of those data entry fields. (The TextBox control provides basic numeric data types for controlling the characters that can be entered as input.)
The JadeEditMask class provides the following functionality.
Improves thin client performance due to the removal of validation requirements
Ability to define an edit mask that dictates the type of data that can be entered by the user for each character position in the text box
Presentation of input fields of the control using multiple text boxes that make up the logical text value
Ability to define one or more labels as part of the control
Ability to include literal values that remain in the text box text as visual prompts to the user
Automatic thousand-separator insertion into a keyed numeric value
Display of a prompt character at the position of each character that can be entered
As edit mask facilities are not provided by the Web browser, Web-enabled applications treat the control as another text box.
If a JadeEditMask is a cell control, the JadeEditMask uses its own mask definition if the cell on which it is activated does not have a mask defined. (Note, however, that if the cell control is activated on a cell that has a defined mask, its pre-defined mask is replaced by the cell's mask and the original JadeEditMask mask is lost.)
Examples of the use of the JadeEditMask control are listed in the following table.
By default, the control functions as a normal text box when you have not specified an edit mask (by using the mask property).
You can define an edit mask:
In the JADE Painter at application development time, by using the Properties dialog to define a mask of the JadeEditMask control selected on the Painter form, specifying the edit mask that you require for the control in the mask property on the Specific sheet of the dialog
Dynamically at run time, by constructing it in your JADE application logic
When running in JADE thin client mode and the
When the
An edit mask is simply a concatenated series of symbols that can define the following.
The type of data that can be entered at a specific character position.
The size and position of each field of the layout of the control (a label or text box). If you do not specify size and position values for each field, these are automatically calculated based on the potential size of that field.
The size may be larger than required for two reasons: the prompt character can require more space than the character for which it is prompting and the control must allow space for the widest character. For example, WWW takes considerably more space than iii if you do not use a monospaced font.
An indication to start a new label or text box section.
Literal text to be displayed as the label caption or in the current text box field.
Lists of characters that can be entered at a character position.
Actions to be taken; for example, uppercase, lowercase, or numeric separator display.
Right-aligned fields.
The numeric range that is permitted for a numeric portion of a text box or label.
When a user presses a key, the control determines the validity of the keyboard action and updates the contents of the control accordingly.
As the JadeEditMask control is numeric-aware, you cannot place the cursor into an invalid empty position before or after numeric data. The cursor automatically positions itself appropriately when the focus is gained (if the entire text is not selected). The Home key also positions the cursor at the beginning of the numeric text, while the End key positions the cursor at the end of the numeric value. In addition, pressing the Delete key when the cursor is positioned directly before a thousands separator deletes the character after the separator.
Pressing the Backspace key when the cursor is positioned directly after a thousands separator deletes the character before the separator.
For a summary of the constants, properties, methods, and events defined in the JadeEditMask class, see "JadeEditMask Class Constants", "JadeEditMask Properties", "JadeEditMask Methods", and "JadeEditMask Events", later in this document. See also "Right-Aligned or Left-Aligned Text Boxes", in the following subsection.