I l@ve RuBoard |
![]() ![]() |
20.5 The InternationalFormatter ClassInternationalFormatter is a subclass of DefaultFormatter that delegates most of its work to an object of type java.text.Format (which is always a subclass since java.text.Format itself is abstract). Many of these subclasses provide internationalization support through awareness of locales, hence the name InternationalFormatter. InternationalFormatter is rarely used directly. It is a repository for the common functionality of its two subclasses, DateFormatter and NumberFormatter. 20.5.1 PropertiesTable 20-6 shows the properties defined by InternationalFormatter.
The format property is key to InternationalFormatter and is used by the valueToString( ) and stringToValue( ) methods to translate between the field's Object and String representations. It can be set in the constructor or via the setFormat( ) method. The minimum and maximum properties can constrain the value of the field. If minimum is not null, value may not be less than minimum. If maximum is not null, value may not be greater than maximum. These may be of any type that implements the Comparable interface. (Provided it hasn't already been set, calling setMinimum( ) or setMaximum( ) also sets the formatter's valueClass property.) InternationalFormatter overrides the overwriteMode property, setting it to false. 20.5.2 Constructors
20.5.3 Public Methods
|
I l@ve RuBoard |
![]() ![]() |