Class: com.ibm.btt.rcp.visualbean.BTTText
Extends: org.eclipse.swt.widgets.Text
Implements:
- org.eclipse.swt.events.TraverseListener
- org.eclipse.swt.events.KeyListener
- org.eclipse.swt.events.KeyListener
- com.ibm.btt.rcp.visualbean.core.DataExchanger
- org.eclipse.swt.events.VerifyListeners
- com.ibm.btt.rcp.visualbean.event.ErrorMessageGenerator
- com.ibm.btt.rcp.visualbean.core.EuroConvertible
- com.ibm.btt.rcp.visualbean.core.GUIControl
- org.eclipse.swt.events.SelectionListener
- org.eclipse.swt.events.FocusListener
- java.beans.VetoableChangeListener
The BTTTextField class has the following properties:
- BTT_activatedOkKey: boolean. If true, focus on the text field, and OK
button exists in the composite or its parent composite, the composite fires
the same CoordinationEvent as Ok button is clicked when OkKey is pressed.
- BTT_alternativeDataName: A data element name defined in the context. Its
type must correspond to the type expected by the text field. If this property
is set, the Bean's BTTCoordinatedComp will write to the specified dataElement
whenever it writes to the date element specified by the dataName property.
Both data elements will contain the same value after the first writes are
done.
- BTT_autoClear: Boolean. If true, the text in the bean is selected when
the bean gets focus.
- BTT_autoTab: Boolean. If true, focus is transferred to the next component
in the composite when the length of the text in the bean is equal to the maxChars
property.
- BTT_beansReactions: A class name. When a bean changes states and the end
state is a non-error state, the bean will call the beanReaction(java.awt.Component)
static method of the specified class.
- BTT_colors: Allows different colors for mandatory, background, or foreground,
etc., to be specified, overriding those defined in Settings.
- BTT_dataName: A data element defined in the context or operation context.
Its type must correspond to the type expected by the text field formatter.
BTTCoordinatedComp will read and write to this data element.
- BTT_dataToClear: Clears the data exchangers according to the value in
the dataDirection property, which can be Input, Output, or Both. Applicable
to the Clear button type.
- BTT_formatter: The class responsible for validating and formatting the
entry field contents. The following data can be customized:
- Formatter. Can be either null, one of the provided formatters (Numeric,
Integer, Float, or Date), or a formatter developed by the user. (See Using
formatters and Creating a formatter.)
- Error message. The message to be displayed when validation fails. Data
related to the selected formatter (for example, the date separator and the
date pattern for the Date formatter).
- euro-EMUConvertible. Enabled only if the formatter is null or FloatConverter.
If it is selected, data in the entry field will be converted to the appropriate
currency when the Euro or EMUCurrency button is clicked. Data is not converted
if one of the following conditions applies:
- The formatter is null and the data in the text field is not a number (with
or without a decimal separator).
- The formatter is FloatConverter and the text field data is wrong.
Initial data entered by the user in the source currency is stored
by the system. Then, when converting back from the target currency to the
source currency, this value is used instead of making a conversion for precision,
in order to avoid rounding errors.
There is an alternative to using
a formatter to format and validate the value. This bean can use the descriptor
validation in the dataElement. If both alternatives exist then the bean will
test validity using both validations, but it will be formatted from the view
properties.
- BTT_helpID: Identifier for the help function. The static method showHelp(String
helpId) is called with this property as input when the Help key is pressed.
If this property is not defined, the HelpId of the composite where the text
field is located is used. If that composite's helpId property is not defined,
the parent composites are searched recursively until the property is found
or the BTTCoordinatedComp is reached. If the helpID value is not found at
the BTTCoordinatedComp, null is used.
- BTT_keystroke: Boolean. If true, each key typed will invoke a validation
method in the associated formatter.
- BTT_maxChars: Maximum number of characters allowed in the text field once
it is formatted. If autoTab is false, extra characters are ignored and a warning
beep sounds.
- BTT_mandatory: Boolean. If true, a value in the text field is required.
This property can also be defined in the dataElement descriptor.
- BTT_minChars: Minimum number of characters required in the text field
before it is formatted. The following data can be customized:
- Minimum length: Minimum number of characters required. If minChars is
greater than maxChars, then minChars will reduce to MaxChars.
- Error Message: The message to be displayed if user input is short.
- BTT_navigationParameters: An object that contains properties to facilitate
navigation between views. (For more information about this object see NavigationParameters
object description.) Only the properties that are needed for the specified
type are significant (see the type property, below).
- BTT_type: Specifies the type of text field. Possible values are Default,
OK, Clear, Close, Repeat, Euro, EMU Currency, Help, Previous View, Next View,
Undo, Cancel, Open View, None, Close_Navigation, and Execute Operation.
- dataDirection: Specifies the direction in which a consistency check is
made between the associated data element and the bean. Following are the possible
values:
- Input: When the combo box is selected, the data element in dataName (and
alternativeDataName) associated with the bean is updated.
- Output: When the data element in dataName associated with the bean changes,
the combo box is updated.
- Both: Both the Input and Output behaviors occur.