public class FontConverter extends DefaultObjectConverter<javafx.scene.text.Font>
| Constructor and Description |
|---|
FontConverter() |
FontConverter(java.lang.String separator) |
| Modifier and Type | Method and Description |
|---|---|
javafx.scene.text.Font |
fromString(java.lang.String string,
ConverterContext context)
Return null in most cases unless the generic type T is also a String.
|
java.text.NumberFormat |
getNumberFormat()
Gets the NumberFormat which is used to format the font size.
|
java.lang.String |
getSeparator()
Gets the separator string used to split the string representation of the Font.
|
void |
setNumberFormat(java.text.NumberFormat numberFormat)
Sets the NumberFormat which is used to format the font size.
|
void |
setSeparator(java.lang.String separator)
Sets the separator string used to split the string representation of the Font.
|
java.lang.String |
toString(javafx.scene.text.Font font,
ConverterContext context)
Converts the value to String.
|
fromString, getObjectConverterManager, toString, toStringConverterpublic FontConverter()
public FontConverter(java.lang.String separator)
public java.lang.String getSeparator()
public void setSeparator(java.lang.String separator)
separator - the separator string used to split the string representation of the Font.public void setNumberFormat(java.text.NumberFormat numberFormat)
numberFormat - a new NumberFormat which is used to format the font size.public java.text.NumberFormat getNumberFormat()
public java.lang.String toString(javafx.scene.text.Font font,
ConverterContext context)
DefaultObjectConvertertoString in interface ObjectConverter<javafx.scene.text.Font>toString in class DefaultObjectConverter<javafx.scene.text.Font>font - the value to be concerted.context - converter context to be usedpublic javafx.scene.text.Font fromString(java.lang.String string,
ConverterContext context)
DefaultObjectConverterfromString in interface ObjectConverter<javafx.scene.text.Font>fromString in class DefaultObjectConverter<javafx.scene.text.Font>string - the stringcontext - context to be converted