Module org.controlsfx.controls
Class StringConverterWithFormat<T>
java.lang.Object
javafx.util.StringConverter<T>
org.controlsfx.control.spreadsheet.StringConverterWithFormat<T>
- Type Parameters:
T
-
public abstract class StringConverterWithFormat<T>
extends javafx.util.StringConverter<T>
This class is used by some of the
Since the format is specified in the
This class provide two constructors:
SpreadsheetCellType
in order to use
a specific format.Since the format is specified in the
SpreadsheetCell
, we need a
converter which provide a runtime method toStringFormat(Object, String)
.This class provide two constructors:
- A default one where you implement the three abstract methods.
- Another one which takes another StringConverter. This is useful when you just want to implement
the
toStringFormat(Object, String)
and let the other converter handle the other methods.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.StringConverterWithFormat
(javafx.util.StringConverter<T> specificStringConverter) This constructor allow to use another StringConverter. -
Method Summary
Modifier and TypeMethodDescriptiontoStringFormat
(T value, String format) Converts the object provided into its string form with the specified format.Methods inherited from class javafx.util.StringConverter
fromString, toString
-
Field Details
-
myConverter
-
-
Constructor Details
-
StringConverterWithFormat
public StringConverterWithFormat()Default constructor. -
StringConverterWithFormat
This constructor allow to use another StringConverter.- Parameters:
specificStringConverter
-
-
-
Method Details
-
toStringFormat
Converts the object provided into its string form with the specified format.- Parameters:
value
-format
-- Returns:
- a string containing the converted value with the specified format.
-