borland Packages Class Hierarchy dx.text Package
TimeFormatter component
java.lang.Object
+----com.borland.dx.text.ItemFormatter
+----com.borland.dx.text.VariantFormatter
+----com.borland.dx.text.TimeFormatter
About the TimeFormatter component
Constructors Properties Methods
Implements Serializable
The TimeFormatter class formats and parses time data values.
See also: Edit/display mask patterns
TimeFormatter constructors
TimeFormatter properties
*Read-only properties **Write-only properties
Properties implemented in this class
Properties implemented in java.lang.Object
TimeFormatter 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)
TimeFormatter constructors
TimeFormatter()
public TimeFormatter()
Constructs a TimeFormatter object.
TimeFormatter properties
variantType
public int getVariantType()
Returns the type of the Variant, which is always Variant.TIME for TimeFormatter.
TimeFormatter methods
format(com.borland.dx.dataset.Variant)
public final String format(Variant value)
Returns a String representing the given timestamp stored in the Variant. 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 final 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)