-
Enhancement
-
Resolution: Unresolved
-
P5
-
None
The Node has the following code which allows user to add an arbitrary name-value pair to Node. It proved to be very useful. I hope the ObjectProperty could have this method so that we can add name-value pair to an ObjectProperty. Personally I don't care if the properties will be included in persistence, toString, hashCode, equal.
// A map containing a set of properties for this node
private ObservableMap<Object, Object> properties;
/**
* Returns an observable map of properties on this node for use primarily
* by application developers.
*
* @return an observable map of properties on this node for use primarily
* by application developers
*/
public final ObservableMap<Object, Object> getProperties() {
if (properties == null) {
properties = FXCollections.observableMap(new HashMap<Object, Object>());
}
return properties;
}
// A map containing a set of properties for this node
private ObservableMap<Object, Object> properties;
/**
* Returns an observable map of properties on this node for use primarily
* by application developers.
*
* @return an observable map of properties on this node for use primarily
* by application developers
*/
public final ObservableMap<Object, Object> getProperties() {
if (properties == null) {
properties = FXCollections.observableMap(new HashMap<Object, Object>());
}
return properties;
}