T
- the target class type that is used in the coercion of the
stringprotected static class BeanPathAdapter.FieldStringConverter<T>
extends javafx.util.StringConverter<T>
StringConverter
that handles conversions between
strings and a target class when used in the binding process
Bindings.bindBidirectional(Property, Property, StringConverter)
StringConverter
Constructor and Description |
---|
BeanPathAdapter.FieldStringConverter(java.lang.Class<T> targetClass,
javafx.beans.property.ObjectProperty<java.text.DateFormat> dfp)
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,
java.text.DateFormat df)
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 BeanPathAdapter.FieldStringConverter(java.lang.Class<T> targetClass, javafx.beans.property.ObjectProperty<java.text.DateFormat> dfp)
targetClass
- the class that the BeanPathAdapter.FieldStringConverter
is
targetingdfp
- the DateFormat
ObjectProperty
used for
Date
/ Calendar
conversionspublic 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, java.text.DateFormat df)
String
v
- the value to coercedf
- the DateFormat
to use (when needed)public static <VT> VT coerce(java.lang.Object v, java.lang.Class<VT> targetClass)
v
- the value to coercetargetClass
- the class to coerce to