borland Packages Class Hierarchy dx.text Package
StringFormatter component
java.lang.Object
+----com.borland.dx.text.ItemFormatter
+----com.borland.dx.text.VariantFormatter
+----com.borland.dx.text.StringFormatter
About the StringFormatter component
Constructors Properties Methods
Implements Serializable
The StringFormatter component formats and parses string data. It uses the pattern property of ItemFormatter to access the edit/display mask patterns that are used to format and parse the data.
See also: Edit/display mask patterns
StringFormatter constructors
StringFormatter properties
*Read-only properties **Write-only properties
Properties implemented in this class
Properties implemented in java.lang.Object
StringFormatter methods
Methods implemented in this class
Methods implemented in java.lang.Object
- clone()
- equals(java.lang.Object)
- finalize()
- hashCode()
- notify()
- notifyAll()
- toString()
- wait()
- wait(long)
- wait(long, int)
StringFormatter constructors
StringFormatter()
public StringFormatter()
Constructs a StringFormatter object.
StringFormatter properties
variantType
public int getVariantType()
Returns the Variant type of StringFormatter, which is always Variant.STRING for StringFormatter.
StringFormatter methods
format(com.borland.dx.dataset.Variant)
public final String format(Variant value)
Returns a String representing the given value stored in the supplied object. All reasonable attempts are made to "cast" the type found in the object into the appropriate type specified in the constructor of the implementing classes. A returned empty string indicates a null or empty input value. null means the formatting failed.
Parameters:
- value
- The value to be formatted to a String.
Overrides:
com.borland.dx.text.VariantFormatter.format(com.borland.dx.dataset.Variant)
parse(com.borland.dx.dataset.Variant, char[], int, int)
public void parse(Variant variant, char[] value, int offset, int len)
A high-speed parse that parses directly into a character array.
Parameters:
- variant
- The parsed value (cannot be null).
- value
- The character array containing the text to parse.
- offset
- The zero-based offset into the character array.
- len
- The maximum number of characters in the array to use in the parse.
Overrides: com.borland.dx.text.VariantFormatter.parse(com.borland.dx.dataset.Variant, char[], int, int)
parse(java.lang.String, com.borland.dx.dataset.Variant)
public void parse(String stringValue, Variant value)
Analyzes the given String and produces as output a Variant containing the approriate value.
Parameters:
- stringValue
- The string to be parsed.
- value
- The Variant that receives the parsed result.
Overrides:
com.borland.dx.text.VariantFormatter.parse(java.lang.String, com.borland.dx.dataset.Variant)