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 StringConverter<T>
This class is used by some of theSpreadsheetCellType
in order to use a specific format.
Since the format is specified in theSpreadsheetCell
, we need a converter which provide a runtime methodtoStringFormat(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:
SpreadsheetCellType
-
-
Field Summary
Fields Modifier and Type Field Description protected StringConverter<T>
myConverter
-
Constructor Summary
Constructors Constructor Description StringConverterWithFormat()
Default constructor.StringConverterWithFormat(StringConverter<T> specificStringConverter)
This constructor allow to use another StringConverter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
toStringFormat(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 Detail
-
myConverter
protected StringConverter<T> myConverter
-
-
Constructor Detail
-
StringConverterWithFormat
public StringConverterWithFormat()
Default constructor.
-
StringConverterWithFormat
public StringConverterWithFormat(StringConverter<T> specificStringConverter)
This constructor allow to use another StringConverter.- Parameters:
specificStringConverter
-
-
-