BT - the bean typeT - the field typePT - the get() typepublic static class BeanPathAdapter.FieldProperty<BT,T,PT>
extends javafx.beans.property.ObjectPropertyBase<PT>
implements javafx.collections.ListChangeListener<java.lang.Object>, javafx.collections.SetChangeListener<java.lang.Object>, javafx.collections.MapChangeListener<java.lang.Object,java.lang.Object>, javafx.beans.value.ChangeListener<java.lang.Object>
javafx.collections.ListChangeListener.Change<E>| Modifier | Constructor and Description |
|---|---|
protected |
BeanPathAdapter.FieldProperty(BT bean,
java.lang.String fullPath,
java.lang.String fieldName,
jfxtras.labs.scene.control.BeanPathAdapter.FieldPathValueProperty notifyProperty,
java.lang.Class<T> declaredFieldType,
java.lang.String collectionItemPath,
javafx.beans.Observable collectionObservable,
java.lang.Class<?> collectionType,
javafx.scene.control.SelectionModel<?> collectionSelectionModel,
BeanPathAdapter.FieldProperty<?,?,?> itemMaster)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addRemoveCollectionListener(javafx.beans.Observable observable,
boolean add)
Adds/Removes the
BeanPathAdapter.FieldProperty as a collection listener |
void |
changed(javafx.beans.value.ObservableValue<? extends java.lang.Object> observable,
java.lang.Object oldValue,
java.lang.Object newValue)
Detects
itemMaster changes for selection synchronization |
protected BeanPathAdapter.FieldProperty<java.lang.Object,?,?> |
extractCollectionItemFieldProperty(BeanPathAdapter.FieldBean<java.lang.Void,java.lang.Object> fieldBean)
Extracts the collections
BeanPathAdapter.FieldProperty from an associated
BeanPathAdapter.FieldBean |
protected BeanPathAdapter.FieldProperty<?,?,?> |
genCollectionFieldProperty(java.lang.Object bean)
Generates a
BeanPathAdapter.FieldProperty for a
getCollectionItemPath() and
getCollectionSelectionModel() when applicable |
protected BeanPathAdapter.FieldProperty<?,?,?> |
genFieldProperty(java.lang.Object itemBeanValue,
java.lang.Object itemBeanPropertyValue)
Generates a
BeanPathAdapter.FieldProperty using the specified bean and sets
the optional value on the bean (when the value is not null). |
PT |
get() |
BT |
getBean() |
java.lang.String |
getCollectionItemPath() |
protected javafx.beans.Observable |
getCollectionObservable() |
protected javafx.scene.control.SelectionModel<java.lang.Object> |
getCollectionSelectionModel() |
java.lang.Class<?> |
getDeclaredFieldType() |
java.lang.Object |
getDirty() |
java.lang.Class<T> |
getFieldType() |
java.lang.String |
getName() |
boolean |
hasCollectionItemPath() |
protected boolean |
hasDefaultDerived() |
protected boolean |
hasFieldPathValueTypeAddOrRemove(boolean add)
Determines if the
FieldPathValueProperty is registered for
adds or removals |
boolean |
hasItemMaster() |
boolean |
isList() |
boolean |
isMap() |
protected boolean |
isObservableList() |
protected static boolean |
isObservableList(javafx.beans.Observable observable) |
protected boolean |
isObservableMap() |
protected static boolean |
isObservableMap(javafx.beans.Observable observable) |
protected boolean |
isObservableSet() |
protected static boolean |
isObservableSet(javafx.beans.Observable observable) |
boolean |
isSet() |
protected BeanPathAdapter.FieldPathValue |
newSyncCollectionFieldPathValue(BeanPathAdapter.FieldProperty<?,?,?> fp,
java.lang.Object fpv,
boolean isAdd)
Creates a new
BeanPathAdapter.FieldPathValue using specified
BeanPathAdapter.FieldProperty or the current BeanPathAdapter.FieldProperty when the
specified BeanPathAdapter.FieldProperty is null. |
void |
onChanged(javafx.collections.ListChangeListener.Change<? extends java.lang.Object> change) |
void |
onChanged(javafx.collections.MapChangeListener.Change<? extends java.lang.Object,? extends java.lang.Object> change) |
void |
onChanged(javafx.collections.SetChangeListener.Change<? extends java.lang.Object> change) |
protected void |
postSet(java.lang.Object prevValue)
Executes any post processing that needs to take place after set
operation takes place
|
void |
set(java.lang.Object v)
Sets an <code>Object</code> value
|
protected void |
setDerived()
Sets the
BeanPathAdapter.FieldHandle.deriveValueFromAccessor() value |
void |
setDirty(java.lang.Object v)
Flags the <code>Property</code> value as dirty and calls
set(Object) |
protected void |
setFieldPathValues(java.util.Collection<BeanPathAdapter.FieldPathValue> fieldPathValues)
Sets a <code>Collection</code> of
BeanPathAdapter.FieldPathValue(s) on the
notifyProperty |
protected void |
setTarget(BT bean)
Binds a new target to the
BeanPathAdapter.FieldHandle |
protected java.lang.Object |
updateCollectionItemProperty(java.lang.Object itemBeanPropertyValue)
Updates the underlying collection item value
|
addListener, addListener, bind, fireValueChangedEvent, invalidated, isBound, removeListener, removeListener, toString, unbindbindBidirectional, setValue, unbindBidirectionalasString, asString, asString, getValue, isEqualTo, isEqualTo, isNotEqualTo, isNotEqualTo, isNotNull, isNull, objectExpressionprotected BeanPathAdapter.FieldProperty(BT bean, java.lang.String fullPath, java.lang.String fieldName, jfxtras.labs.scene.control.BeanPathAdapter.FieldPathValueProperty notifyProperty, java.lang.Class<T> declaredFieldType, java.lang.String collectionItemPath, javafx.beans.Observable collectionObservable, java.lang.Class<?> collectionType, javafx.scene.control.SelectionModel<?> collectionSelectionModel, BeanPathAdapter.FieldProperty<?,?,?> itemMaster)
bean - the bean that the path belongs tofullPath - the full . separated path to the
BeanPathAdapter.FieldPropertyfieldName - the name of the field within the beannotifyProperty - the FieldPathValueProperty that will be set every
time the ObjectProperty.setValue(Object) is
performed or an item within the value is changeddeclaredFieldType - the declared <code>Class</code> of the fieldcollectionItemPath - 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>)collectionObservable - the <code>Observable</code> <code>Collection</code> used to bind to
the BeanPathAdapter.FieldProperty OR when the
<code>SelectionModel</code> is specified this is the
<code>Observable</code> <code>Collection</code> of available items
to select fromcollectionType - the <code>Collection</code> <code>Class</code> used to attempt to
transform the underlying field <code>Observable</code>
<code>Collection</code> to the <code>Collection</code> <code>Class</code>
(only applicable when the actual field is a
<code>Collection</code>)collectionSelectionModel - 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 frompublic PT get()
protected void setDerived()
BeanPathAdapter.FieldHandle.deriveValueFromAccessor() valuepublic void setDirty(java.lang.Object v)
set(Object)v - the value to setpublic void set(java.lang.Object v)
protected final void postSet(java.lang.Object prevValue)
throws java.lang.Throwable
prevValue - the ObjectExpression.getValue() before ObjectProperty.setValue(Object)
was calledjava.lang.Throwable - thrown when any errors occur when processing a post set
operationprotected BeanPathAdapter.FieldPathValue newSyncCollectionFieldPathValue(BeanPathAdapter.FieldProperty<?,?,?> fp, java.lang.Object fpv, boolean isAdd)
BeanPathAdapter.FieldPathValue using specified
BeanPathAdapter.FieldProperty or the current BeanPathAdapter.FieldProperty when the
specified BeanPathAdapter.FieldProperty is null.fp - the BeanPathAdapter.FieldProperty (optional)fpv - the ObjectExpression.getValue()isAdd - true when adding an itemBeanPathAdapter.FieldPathValueprotected boolean hasFieldPathValueTypeAddOrRemove(boolean add)
FieldPathValueProperty is registered for
adds or removalsadd - true to check for add, false to check for removeFieldPathValueProperty is registered
for the add or removeprotected void setFieldPathValues(java.util.Collection<BeanPathAdapter.FieldPathValue> fieldPathValues)
BeanPathAdapter.FieldPathValue(s) on the
notifyPropertyfieldPathValues - the <code>Collection</code> of BeanPathAdapter.FieldPathValue(s) to setprotected BeanPathAdapter.FieldProperty<?,?,?> genFieldProperty(java.lang.Object itemBeanValue, java.lang.Object itemBeanPropertyValue)
BeanPathAdapter.FieldProperty using the specified bean and sets
the optional value on the bean (when the value is not null). The
returned BeanPathAdapter.FieldProperty will contain the same value instance
contained with the item master. When the item master is not available
an attempt will be made to get the item value from the
getDirty() collection/map.itemBeanValue - the collection BeanPathAdapter.FieldBean value to add/update. when
null the existing BeanPathAdapter.FieldBean value will
will be used unless it is null as well- in which
case an attempt will be made to instantiate a new instance
of the bean using a no-argument constructoritemBeanPropertyValue - the collection BeanPathAdapter.FieldBean's BeanPathAdapter.FieldProperty
value to add/update (null when no update should be made to
the BeanPathAdapter.FieldBean's BeanPathAdapter.FieldProperty value)BeanPathAdapter.FieldProperty for the collection item (null when
none is required)protected BeanPathAdapter.FieldProperty<?,?,?> genCollectionFieldProperty(java.lang.Object bean)
BeanPathAdapter.FieldProperty for a
getCollectionItemPath() and
getCollectionSelectionModel() when applicablebean - the bean to generate a BeanPathAdapter.FieldPropertyBeanPathAdapter.FieldPropertyprotected java.lang.Object updateCollectionItemProperty(java.lang.Object itemBeanPropertyValue)
itemBeanPropertyValue - the collection BeanPathAdapter.FieldBean's BeanPathAdapter.FieldProperty
value to add/updategetBean() when the collection item has
it's own bean path, the
itemBeanPropertyValue when it does not#updateCollectionItemBean(int, Object, Object)protected void addRemoveCollectionListener(javafx.beans.Observable observable,
boolean add)
BeanPathAdapter.FieldProperty as a collection listenerobservable - the <code>Observable</code> collection/map to listen for
changes onadd - true to add, false to removepublic void changed(javafx.beans.value.ObservableValue<? extends java.lang.Object> observable,
java.lang.Object oldValue,
java.lang.Object newValue)
itemMaster changes for selection synchronizationchanged in interface javafx.beans.value.ChangeListener<java.lang.Object>public final void onChanged(javafx.collections.ListChangeListener.Change<? extends java.lang.Object> change)
onChanged in interface javafx.collections.ListChangeListener<java.lang.Object>public final void onChanged(javafx.collections.SetChangeListener.Change<? extends java.lang.Object> change)
onChanged in interface javafx.collections.SetChangeListener<java.lang.Object>public final void onChanged(javafx.collections.MapChangeListener.Change<? extends java.lang.Object,? extends java.lang.Object> change)
onChanged in interface javafx.collections.MapChangeListener<java.lang.Object,java.lang.Object>public java.lang.Object getDirty()
protected void setTarget(BT bean)
BeanPathAdapter.FieldHandlebean - the target bean to bind topublic BT getBean()
getBean in interface javafx.beans.property.ReadOnlyProperty<PT>public java.lang.String getName()
getName in interface javafx.beans.property.ReadOnlyProperty<PT>public java.lang.Class<T> getFieldType()
BeanPathAdapter.FieldHandle.getFieldType()public java.lang.Class<?> getDeclaredFieldType()
BeanPathAdapter.FieldHandle.getDeclaredFieldType()protected boolean hasDefaultDerived()
BeanPathAdapter.FieldHandle.hasDefaultDerived()public boolean isList()
BeanPathAdapter.FieldProperty is for a <code>List</code>public boolean isSet()
BeanPathAdapter.FieldProperty is for a <code>Set</code>public boolean isMap()
BeanPathAdapter.FieldProperty is for a <code>Map</code>protected boolean isObservableList()
BeanPathAdapter.FieldProperty is bound to an
<code>ObservableList</code>protected boolean isObservableSet()
BeanPathAdapter.FieldProperty is bound to an
<code>ObservableSet</code>protected boolean isObservableMap()
BeanPathAdapter.FieldProperty is bound to an
<code>ObservableMap</code>protected static boolean isObservableList(javafx.beans.Observable observable)
observable - the <code>Observable</code> to checkprotected static boolean isObservableSet(javafx.beans.Observable observable)
observable - the <code>Observable</code> to checkprotected static boolean isObservableMap(javafx.beans.Observable observable)
observable - the <code>Observable</code> to checkprotected BeanPathAdapter.FieldProperty<java.lang.Object,?,?> extractCollectionItemFieldProperty(BeanPathAdapter.FieldBean<java.lang.Void,java.lang.Object> fieldBean)
BeanPathAdapter.FieldProperty from an associated
BeanPathAdapter.FieldBeanfieldBean - the BeanPathAdapter.FieldBean to extract fromBeanPathAdapter.FieldPropertypublic boolean hasCollectionItemPath()
public java.lang.String getCollectionItemPath()
. separated field name that represents each
item in the underlying collectionprotected javafx.scene.control.SelectionModel<java.lang.Object> getCollectionSelectionModel()
BeanPathAdapter.FieldProperty when
the field references a collection/map for item selection or
null when not a selection BeanPathAdapter.FieldPropertyprotected javafx.beans.Observable getCollectionObservable()
BeanPathAdapter.FieldProperty does not represent a collection)public boolean hasItemMaster()
BeanPathAdapter.FieldProperty has an item master that
it's using to reference get() for