Top Description Fields Constructors Methods
javafx.util.converter

public Class FormatStringConverter<T>

extends StringConverter<T>
Class Inheritance
Type Parameters
<T>
the type of the object being converted
Imports
java.text.*, javafx.beans.NamedArg, javafx.util.StringConverter

StringConverter implementation that can use a Format instance.

Since
JavaFX 2.2

Field Summary

Modifier and TypeField and Description
pack-priv final Format

Constructor Summary

AccessConstructor and Description
public
FormatStringConverter(Format
the Format instance
format
)

Creates a FormatStringConverter for the given Format instance.

Method Summary

Modifier and TypeMethod and Description
public T
fromString(String
the String to convert
value
)

Implements abstract javafx.util.StringConverter.fromString.

Converts the string provided into an object defined by the specific converter.

protected Format

Returns:

a Format instance for formatting and parsing in this StringConverter
getFormat
()

Return a Format instance to use for formatting and parsing in this StringConverter.

public String
toString(T
the object of type T to convert
value
)

Implements abstract javafx.util.StringConverter.toString.

Converts the object provided into its string form.

Field Detail

formatback to summary
pack-priv final Format format

Constructor Detail

FormatStringConverterback to summary
public FormatStringConverter(Format format)

Creates a FormatStringConverter for the given Format instance.

Parameters
format:Format

the Format instance

Method Detail

fromStringback to summary
public T fromString(String value)

Implements abstract javafx.util.StringConverter.fromString.

Doc from javafx.util.StringConverter.fromString.

Converts the string provided into an object defined by the specific converter. Format of the string and type of the resulting object is defined by the specific converter.

Parameters
value:String

the String to convert

Returns:T

an object representation of the string passed in.

Annotations
@Override
getFormatback to summary
protected Format getFormat()

Return a Format instance to use for formatting and parsing in this StringConverter.

Returns:Format

a Format instance for formatting and parsing in this StringConverter

toStringback to summary
public String toString(T value)

Implements abstract javafx.util.StringConverter.toString.

Doc from javafx.util.StringConverter.toString.

Converts the object provided into its string form. Format of the returned string is defined by the specific converter.

Parameters
value:T

the object of type T to convert

Returns:String

a string representation of the object passed in

Annotations
@Override