protected static class BeanPathAdapter.FieldStringConverter<T>
extends javafx.util.StringConverter<T>
Coercible StringConverter
that handles conversions between
strings and a target class when used in the binding process
Bindings.bindBidirectional(Property, Property, StringConverter)
StringConverter
Modifier and Type | Field and Description |
---|---|
static java.text.SimpleDateFormat |
SDF |
Constructor and Description |
---|
FieldStringConverter(java.lang.Class<T> targetClass)
Constructor
|
Modifier and Type | Method and Description |
---|---|
static <VT> VT |
coerce(java.lang.Object v,
java.lang.Class<VT> targetClass)
Attempts to coerce a value into the specified class
|
static <VT> java.lang.String |
coerceToString(VT v)
Attempts to coerce a value into a
String |
T |
fromString(java.lang.String string) |
java.lang.Class<T> |
getTargetClass() |
java.lang.String |
toString(T object) |
public FieldStringConverter(java.lang.Class<T> targetClass)
Constructor
targetClass
- the class that the BeanPathAdapter.FieldStringConverter
is
targetingpublic T fromString(java.lang.String string)
fromString
in class javafx.util.StringConverter<T>
public java.lang.String toString(T object)
toString
in class javafx.util.StringConverter<T>
public java.lang.Class<T> getTargetClass()
public static <VT> java.lang.String coerceToString(VT v)
Attempts to coerce a value into a String
v
- the value to coercepublic static <VT> VT coerce(java.lang.Object v, java.lang.Class<VT> targetClass)
Attempts to coerce a value into the specified class
v
- the value to coercetargetClass
- the class to coerce to