PT - the parent bean typeBT - the bean typeprotected static class BeanPathAdapter.FieldBean<PT,BT>
extends java.lang.Object
implements java.io.Serializable
.
separated field path that will be traversed on a bean until the
final field name is found. Each bean may contain child BeanPathAdapter.FieldBeans
when an operation is perfomed with a direct descendant field that is a
non-primitive type. Any primitive types are added as a
BeanPathAdapter.FieldProperty reference to the BeanPathAdapter.FieldBean.| Modifier | Constructor and Description |
|---|---|
protected |
BeanPathAdapter.FieldBean(BeanPathAdapter.FieldBean<?,PT> parent,
BeanPathAdapter.FieldHandle<PT,BT> fieldHandle,
jfxtras.labs.scene.control.BeanPathAdapter.FieldPathValueProperty notifyProperty)
Creates a
BeanPathAdapter.FieldBean |
protected |
BeanPathAdapter.FieldBean(BeanPathAdapter.FieldBean<?,PT> parent,
BT bean,
java.lang.String fieldName,
jfxtras.labs.scene.control.BeanPathAdapter.FieldPathValueProperty notifyProperty)
Creates a
BeanPathAdapter.FieldBean with a generated BeanPathAdapter.FieldHandle that
targets the supplied bean and is projected on the parent
BeanPathAdapter.FieldBean. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addFieldBean(BeanPathAdapter.FieldBean<BT,?> fieldBean)
Adds a child
BeanPathAdapter.FieldBean if it doesn't already exist. |
protected void |
addOrUpdateFieldProperty(BeanPathAdapter.FieldProperty<BT,?,?> fieldProperty)
Adds or updates a child
BeanPathAdapter.FieldProperty. |
protected BeanPathAdapter.FieldHandle<PT,BT> |
createFieldHandle(PT parentBean,
BT bean,
java.lang.String fieldName)
Generates a
BeanPathAdapter.FieldHandle that targets the supplied bean and is
projected on the parent BeanPathAdapter.FieldBean that has |
BT |
getBean() |
protected java.util.Map<java.lang.String,BeanPathAdapter.FieldBean<BT,?>> |
getFieldBeans() |
java.lang.String |
getFieldName() |
protected java.util.Map<java.lang.String,BeanPathAdapter.FieldProperty<BT,?,?>> |
getFieldProperties() |
BeanPathAdapter.FieldProperty<BT,?,?> |
getFieldProperty(java.lang.String proptertyName) |
protected java.util.Map<java.lang.String,BeanPathAdapter.FieldProperty<BT,?,?>> |
getFieldSelectionProperties() |
<FCT,SMT> BeanPathAdapter.FieldStringConverter<FCT> |
getFieldStringConverter(java.lang.Class<FCT> targetClass)
Gets/Creates (if not already created) a
BeanPathAdapter.FieldStringConverter. |
BeanPathAdapter.FieldBean<?,PT> |
getParent() |
protected <T> void |
performOperation(BeanPathAdapter.FieldProperty<BT,?,?> fp,
javafx.beans.Observable observable,
java.lang.Class<T> observableValueClass,
BeanPathAdapter.FieldBeanOperation operation)
Performs a
BeanPathAdapter.FieldBeanOperation on a BeanPathAdapter.FieldProperty and
an <code>Observable</code> |
<T> BeanPathAdapter.FieldProperty<?,?,?> |
performOperation(java.lang.String fieldPath,
javafx.collections.ObservableList<T> observableList,
java.lang.Class<T> listValueClass,
java.lang.String collectionItemPath,
java.lang.Class<?> collectionItemPathType,
javafx.scene.control.SelectionModel<T> selectionModel,
BeanPathAdapter.FieldProperty<?,?,?> itemMaster,
BeanPathAdapter.FieldBeanOperation operation) |
<K,V> BeanPathAdapter.FieldProperty<?,?,?> |
performOperation(java.lang.String fieldPath,
javafx.collections.ObservableMap<K,V> observableMap,
java.lang.Class<V> mapValueClass,
java.lang.String collectionItemPath,
java.lang.Class<?> collectionItemPathType,
javafx.scene.control.SelectionModel<V> selectionModel,
BeanPathAdapter.FieldProperty<?,?,?> itemMaster,
BeanPathAdapter.FieldBeanOperation operation) |
<T> BeanPathAdapter.FieldProperty<?,?,?> |
performOperation(java.lang.String fieldPath,
javafx.collections.ObservableSet<T> observableSet,
java.lang.Class<T> setValueClass,
java.lang.String collectionItemPath,
java.lang.Class<?> collectionItemPathType,
javafx.scene.control.SelectionModel<T> selectionModel,
BeanPathAdapter.FieldProperty<?,?,?> itemMaster,
BeanPathAdapter.FieldBeanOperation operation) |
<T> BeanPathAdapter.FieldProperty<?,?,?> |
performOperation(java.lang.String fieldPath,
javafx.beans.property.Property<T> property,
java.lang.Class<T> propertyValueClass,
BeanPathAdapter.FieldBeanOperation operation) |
protected <T> BeanPathAdapter.FieldProperty<?,?,?> |
performOperation(java.lang.String fullFieldPath,
java.lang.String fieldPath,
java.lang.Class<T> propertyValueClass,
java.lang.String collectionItemPath,
javafx.beans.Observable observable,
java.lang.Class<?> collectionItemType,
javafx.scene.control.SelectionModel<T> selectionModel,
BeanPathAdapter.FieldProperty<?,?,?> itemMaster,
BeanPathAdapter.FieldBeanOperation operation)
Performs a
BeanPathAdapter.FieldBeanOperation by generating a
BeanPathAdapter.FieldProperty based upon the supplied . |
void |
setBean(BT bean)
Sets the bean of the
BeanPathAdapter.FieldBean and it's underlying
getFieldBeans(), getFieldProperties(), and
getFieldSelectionProperties() |
void |
setParentBean(PT bean)
Binds a parent bean to the
BeanPathAdapter.FieldBean and it's underlying
getFieldBeans(), getFieldProperties(), and
getFieldSelectionProperties() |
protected BeanPathAdapter.FieldBean(BeanPathAdapter.FieldBean<?,PT> parent, BeanPathAdapter.FieldHandle<PT,BT> fieldHandle, jfxtras.labs.scene.control.BeanPathAdapter.FieldPathValueProperty notifyProperty)
BeanPathAdapter.FieldBeanparent - the parent BeanPathAdapter.FieldBean (should not be null)fieldHandle - the BeanPathAdapter.FieldHandle (should not be null)notifyProperty - the FieldPathValueProperty that will be set every
time the setBean(Object) is changedprotected BeanPathAdapter.FieldBean(BeanPathAdapter.FieldBean<?,PT> parent, BT bean, java.lang.String fieldName, jfxtras.labs.scene.control.BeanPathAdapter.FieldPathValueProperty notifyProperty)
BeanPathAdapter.FieldBean with a generated BeanPathAdapter.FieldHandle that
targets the supplied bean and is projected on the parent
BeanPathAdapter.FieldBean. It assumes that the supplied BeanPathAdapter.FieldBean has
been set on the parent BeanPathAdapter.FieldBean.parent - the parent BeanPathAdapter.FieldBean (null when it's the root)bean - the bean that the BeanPathAdapter.FieldBean is forfieldName - the field name of the parent BeanPathAdapter.FieldBean for which
the new BeanPathAdapter.FieldBean is fornotifyProperty - the FieldPathValueProperty that will be set every
time the setBean(Object) is changedcreateFieldHandle(Object, Object, String)protected BeanPathAdapter.FieldHandle<PT,BT> createFieldHandle(PT parentBean, BT bean, java.lang.String fieldName)
BeanPathAdapter.FieldHandle that targets the supplied bean and is
projected on the parent BeanPathAdapter.FieldBean that hasparentBean - the parent beanbean - the child beanfieldName - the field name of the child within the parentBeanPathAdapter.FieldHandlepublic BT getBean()
BeanPathAdapter.FieldBean representssetParentBean(Object)protected void addFieldBean(BeanPathAdapter.FieldBean<BT,?> fieldBean)
BeanPathAdapter.FieldBean if it doesn't already exist. NOTE: It
does NOT ensure the child bean has been set on the parent.fieldBean - the BeanPathAdapter.FieldBean to addprotected void addOrUpdateFieldProperty(BeanPathAdapter.FieldProperty<BT,?,?> fieldProperty)
BeanPathAdapter.FieldProperty. When the child already
exists it will BeanPathAdapter.FieldProperty.setTarget(Object) using the bean
of the BeanPathAdapter.FieldProperty.fieldProperty - the BeanPathAdapter.FieldProperty to add or updatepublic void setBean(BT bean)
BeanPathAdapter.FieldBean and it's underlying
getFieldBeans(), getFieldProperties(), and
getFieldSelectionProperties()bean - the bean to setsetParentBean(Object)public void setParentBean(PT bean)
BeanPathAdapter.FieldBean and it's underlying
getFieldBeans(), getFieldProperties(), and
getFieldSelectionProperties()bean - the parent bean to bind tosetBean(Object)public <T> BeanPathAdapter.FieldProperty<?,?,?> performOperation(java.lang.String fieldPath, javafx.beans.property.Property<T> property, java.lang.Class<T> propertyValueClass, BeanPathAdapter.FieldBeanOperation operation)
BeanPathAdapter.FieldBean#performOperation(String, String,
Class, String, Observable, Class, SelectionModel, FieldProperty,
FieldBeanOperation)public <T> BeanPathAdapter.FieldProperty<?,?,?> performOperation(java.lang.String fieldPath, javafx.collections.ObservableList<T> observableList, java.lang.Class<T> listValueClass, java.lang.String collectionItemPath, java.lang.Class<?> collectionItemPathType, javafx.scene.control.SelectionModel<T> selectionModel, BeanPathAdapter.FieldProperty<?,?,?> itemMaster, BeanPathAdapter.FieldBeanOperation operation)
BeanPathAdapter.FieldBean#performOperation(String, String,
Class, String, Observable, Class, SelectionModel, FieldProperty,
FieldBeanOperation)public <T> BeanPathAdapter.FieldProperty<?,?,?> performOperation(java.lang.String fieldPath, javafx.collections.ObservableSet<T> observableSet, java.lang.Class<T> setValueClass, java.lang.String collectionItemPath, java.lang.Class<?> collectionItemPathType, javafx.scene.control.SelectionModel<T> selectionModel, BeanPathAdapter.FieldProperty<?,?,?> itemMaster, BeanPathAdapter.FieldBeanOperation operation)
BeanPathAdapter.FieldBean#performOperation(String, String,
Class, String, Observable, Class, SelectionModel, FieldProperty,
FieldBeanOperation)public <K,V> BeanPathAdapter.FieldProperty<?,?,?> performOperation(java.lang.String fieldPath, javafx.collections.ObservableMap<K,V> observableMap, java.lang.Class<V> mapValueClass, java.lang.String collectionItemPath, java.lang.Class<?> collectionItemPathType, javafx.scene.control.SelectionModel<V> selectionModel, BeanPathAdapter.FieldProperty<?,?,?> itemMaster, BeanPathAdapter.FieldBeanOperation operation)
BeanPathAdapter.FieldBean#performOperation(String, String,
Class, String, Observable, Class, SelectionModel, FieldProperty,
FieldBeanOperation)protected <T> BeanPathAdapter.FieldProperty<?,?,?> performOperation(java.lang.String fullFieldPath, java.lang.String fieldPath, java.lang.Class<T> propertyValueClass, java.lang.String collectionItemPath, javafx.beans.Observable observable, java.lang.Class<?> collectionItemType, javafx.scene.control.SelectionModel<T> selectionModel, BeanPathAdapter.FieldProperty<?,?,?> itemMaster, BeanPathAdapter.FieldBeanOperation operation)
BeanPathAdapter.FieldBeanOperation by generating a
BeanPathAdapter.FieldProperty based upon the supplied .
separated path to the field by traversing the matching children of
the BeanPathAdapter.FieldBean until the corresponding BeanPathAdapter.FieldProperty
is found (target bean uses the POJO from getBean()
). If the operation is bind and the BeanPathAdapter.FieldProperty doesn't
exist all relative BeanPathAdapter.FieldBeans in the path will be
instantiated using a no-argument constructor until the
BeanPathAdapter.FieldProperty is created and bound to the supplied
<code>Property</code>. The process is reciprocated until all path
BeanPathAdapter.FieldBean and BeanPathAdapter.FieldProperty attributes of the field
path are extinguished.fullFieldPath - the full . separated field names (used in
recursion of method call to maintain the original path and
should not be used in initial method invocation)fieldPath - the . separated field namespropertyValueClass - the class of the <code>Property</code> value type (only needed
when binding)collectionItemPath - the the . separated field names of the
<code>Observable</code> collection (only applicable when the
<code>Observable</code> is a <code>ObservableList</code>,
<code>ObservableSet</code>, or <code>ObservableMap</code>)observable - the <code>Property</code>, <code>ObservableList</code>,
<code>ObservableSet</code>, or <code>ObservableMap</code> to perform
the BeanPathAdapter.FieldBeanOperation oncollectionItemType - the <code>Observable</code> <code>Class</code> of each item in the
<code>Observable</code> collection (only applicable when the
<code>Observable</code> is a <code>ObservableList</code>,
<code>ObservableSet</code>, or <code>ObservableMap</code>)selectionModel - the <code>SelectionModel</code> used to set the values within
the <code>Observable</code> only applicable when the
<code>Observable</code> is used for selection(s) and therefore
cannot be updated directly because it is read-onlyitemMaster - the BeanPathAdapter.FieldProperty that contains the item(s) that
the <code>SelectionModel</code> can select fromoperation - the BeanPathAdapter.FieldBeanOperationBeanPathAdapter.FieldProperty the operation was performed on
(null when the operation was not performed on any
BeanPathAdapter.FieldPropertyBindings.bindBidirectional(Property, Property),
Bindings.unbindBidirectional(Property, Property)protected <T> void performOperation(BeanPathAdapter.FieldProperty<BT,?,?> fp, javafx.beans.Observable observable, java.lang.Class<T> observableValueClass, BeanPathAdapter.FieldBeanOperation operation)
BeanPathAdapter.FieldBeanOperation on a BeanPathAdapter.FieldProperty and
an <code>Observable</code>fp - the BeanPathAdapter.FieldPropertyobservable - the <code>Property</code>, <code>ObservableList</code>,
<code>ObservableSet</code>, or <code>ObservableMap</code> to perform
the BeanPathAdapter.FieldBeanOperation onobservableValueClass - the <code>Class</code> of the <code>Observable</code> valueoperation - the BeanPathAdapter.FieldBeanOperationpublic java.lang.String getFieldName()
BeanPathAdapter.FieldBean represents in it's
parent (null when the BeanPathAdapter.FieldBean is root)public BeanPathAdapter.FieldBean<?,PT> getParent()
BeanPathAdapter.FieldBean (null when the BeanPathAdapter.FieldBean
is root)protected java.util.Map<java.lang.String,BeanPathAdapter.FieldBean<BT,?>> getFieldBeans()
BeanPathAdapter.FieldBean that are not a BeanPathAdapter.FieldProperty, but
rather exist as a BeanPathAdapter.FieldBean that may or may not
contain their own BeanPathAdapter.FieldProperty instancesgetFieldProperties(),
getFieldSelectionProperties()protected java.util.Map<java.lang.String,BeanPathAdapter.FieldProperty<BT,?,?>> getFieldProperties()
BeanPathAdapter.FieldBean that are not BeanPathAdapter.FieldBeans, but rather
exist as a BeanPathAdapter.FieldProperty and are not
getFieldSelectionProperties()getFieldSelectionProperties(),
getFieldBeans()protected java.util.Map<java.lang.String,BeanPathAdapter.FieldProperty<BT,?,?>> getFieldSelectionProperties()
BeanPathAdapter.FieldBean that are not BeanPathAdapter.FieldBeans, but rather
exist as a BeanPathAdapter.FieldProperty that are not
getFieldProperties()getFieldProperties(),
getFieldBeans()public BeanPathAdapter.FieldProperty<BT,?,?> getFieldProperty(java.lang.String proptertyName)
BeanPathAdapter.FieldProperty with the given name that belongs to
the BeanPathAdapter.FieldBean (null when the name does not exist)getFieldProperties(),
getFieldSelectionProperties()public <FCT,SMT> BeanPathAdapter.FieldStringConverter<FCT> getFieldStringConverter(java.lang.Class<FCT> targetClass)
BeanPathAdapter.FieldStringConverter.targetClass - the target class of the BeanPathAdapter.FieldStringConverterBeanPathAdapter.FieldStringConverter