Binding of an javafx.collections.ObservableMap .
MapBinding provides a simple invalidation-scheme. An extending
class can register dependencies by calling bind(Observable..
If one of the registered dependencies becomes invalid, this
MapBinding is marked as invalid. With
unbind(Observable. listening to dependencies can be stopped.
To provide a concrete implementation of this class, the method
computeValue() has to be implemented to calculate the value of this
binding based on the current state of the dependencies. It is called when
get() is called for an invalid binding.
See DoubleBinding for an example how this base class can be extended.
Binding, MapExpression
| Modifier and Type | Class and Description |
|---|---|
| private class | |
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private MapBinding | |
| private MapExpressionHelper | |
| private final MapChangeListener | |
| private BindingHelperObserver | |
| private MapBinding | |
| private boolean | |
| private ObservableMap |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addListener(InvalidationListener listener)
Implements javafx. Adds an |
| public void | addListener(ChangeListener<? super ObservableMap<K, V>> listener)
Implements javafx. Adds a |
| public void | addListener(MapChangeListener<? super K, ? super V> listener)
Implements javafx. Add a listener to this observable map. |
| protected final void | bind(Observable...
the dependencies to observe dependencies)Start observing the dependencies for changes. |
| protected abstract ObservableMap | |
| public void | dispose()
Implements javafx. A default implementation of |
| public ReadOnlyBooleanProperty | emptyProperty()
Implements abstract javafx. A boolean property that is |
| public final ObservableMap | Returns: the current valueImplements javafx. Returns the result of |
| public ObservableList | Returns: an emptyObservableListImplements javafx. A default implementation of |
| public final void | |
| private void | |
| public final boolean | |
| protected void | onInvalidating()
The method onInvalidating() can be overridden by extending classes to react, if this binding becomes invalid. |
| public void | removeListener(InvalidationListener listener)
Implements javafx. Removes the given listener from the list of listeners, that are notified
whenever the value of the |
| public void | removeListener(ChangeListener<? super ObservableMap<K, V>> listener)
Implements javafx. Removes the given listener from the list of listeners that are notified
whenever the value of the |
| public void | removeListener(MapChangeListener<? super K, ? super V> listener)
Implements javafx. Tries to removed a listener from this observable map. |
| public ReadOnlyIntegerProperty | sizeProperty()
Implements abstract javafx. An integer property that represents the size of the map. |
| public String | Returns: a string representation of thisMapBinding object.Overrides java. Returns a string representation of this |
| protected final void | unbind(Observable...
the dependencies to stop observing dependencies)Stop observing the dependencies for changes. |
| empty0 | back to summary |
|---|---|
| private MapBinding<K, V>. | |
| helper | back to summary |
|---|---|
| private MapExpressionHelper<K, V> helper | |
| mapChangeListener | back to summary |
|---|---|
| private final MapChangeListener<K, V> mapChangeListener | |
| observer | back to summary |
|---|---|
| private BindingHelperObserver observer | |
| size0 | back to summary |
|---|---|
| private MapBinding<K, V>. | |
| valid | back to summary |
|---|---|
| private boolean valid | |
| value | back to summary |
|---|---|
| private ObservableMap<K, V> value | |
| MapBinding | back to summary |
|---|---|
| public MapBinding() Creates a default | |
| addListener | back to summary |
|---|---|
| public void addListener(InvalidationListener listener) Implements javafx. Doc from javafx. Adds an
Note that the same actual
The
| |
| addListener | back to summary |
|---|---|
| public void addListener(ChangeListener<? super ObservableMap<K, V>> listener) Implements javafx. Doc from javafx. Adds a
Note that the same actual
The
| |
| addListener | back to summary |
|---|---|
| public void addListener(MapChangeListener<? super K, ? super V> listener) Implements javafx. Doc from javafx. Add a listener to this observable map.
| |
| bind | back to summary |
|---|---|
| protected final void bind(Observable... dependencies) Start observing the dependencies for changes. If the value of one of the dependencies changes, the binding is marked as invalid.
| |
| computeValue | back to summary |
|---|---|
| protected abstract ObservableMap Calculates the current value of this binding.
Classes extending
| |
| dispose | back to summary |
|---|---|
| public void dispose() Implements javafx. A default implementation of
| |
| emptyProperty | back to summary |
|---|---|
| public ReadOnlyBooleanProperty emptyProperty() Implements abstract javafx. Doc from javafx. A boolean property that is
| |
| get | back to summary |
|---|---|
| public final ObservableMap Implements javafx. Returns the result of
| |
| getDependencies | back to summary |
|---|---|
| public ObservableList Implements javafx. A default implementation of
| |
| invalidate | back to summary |
|---|---|
| public final void invalidate() Implements javafx. Doc from javafx. Mark a binding as invalid. This forces the recalculation of the value of
the
| |
| invalidateProperties | back to summary |
|---|---|
| private void invalidateProperties() | |
| isValid | back to summary |
|---|---|
| public final boolean isValid() Implements javafx. Doc from javafx. Checks if a binding is valid.
| |
| onInvalidating | back to summary |
|---|---|
| protected void onInvalidating() The method onInvalidating() can be overridden by extending classes to react, if this binding becomes invalid. The default implementation is empty. | |
| removeListener | back to summary |
|---|---|
| public void removeListener(InvalidationListener listener) Implements javafx. Doc from javafx. Removes the given listener from the list of listeners, that are notified
whenever the value of the If the given listener has not been previously registered (i.e. it was never added) then this method call is a no-op. If it had been previously added then it will be removed. If it had been added more than once, then only the first occurrence will be removed.
| |
| removeListener | back to summary |
|---|---|
| public void removeListener(ChangeListener<? super ObservableMap<K, V>> listener) Implements javafx. Doc from javafx. Removes the given listener from the list of listeners that are notified
whenever the value of the If the given listener has not been previously registered (i.e. it was never added) then this method call is a no-op. If it had been previously added then it will be removed. If it had been added more than once, then only the first occurrence will be removed.
| |
| removeListener | back to summary |
|---|---|
| public void removeListener(MapChangeListener<? super K, ? super V> listener) Implements javafx. Doc from javafx. Tries to removed a listener from this observable map. If the listener is not attached to this map, nothing happens.
| |
| sizeProperty | back to summary |
|---|---|
| public ReadOnlyIntegerProperty sizeProperty() Implements abstract javafx. Doc from javafx. An integer property that represents the size of the map.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a string representation of this | |
| unbind | back to summary |
|---|---|
| protected final void unbind(Observable... dependencies) Stop observing the dependencies for changes.
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| protected void | fireValueChangedEvent()
Overrides javafx. Sends notifications to all attached
|
| public boolean | get()
Implements javafx. Returns the current value of this |
| public Object | getBean()
Implements javafx. Returns the |
| public String | getName()
Implements javafx. Returns the name of this property. |
| EmptyProperty | back to summary |
|---|---|
| private EmptyProperty() | |
| fireValueChangedEvent | back to summary |
|---|---|
| protected void fireValueChangedEvent() Overrides javafx. Doc from javafx. Sends notifications to all attached
| |
| get | back to summary |
|---|---|
| public boolean get() Implements javafx. Doc from javafx. Returns the current value of this
| |
| getBean | back to summary |
|---|---|
| public Object getBean() Implements javafx. Doc from javafx. Returns the
| |
| getName | back to summary |
|---|---|
| public String getName() Implements javafx. Doc from javafx. Returns the name of this property. If the property does not have a name,
this method returns an empty
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| protected void | fireValueChangedEvent()
Overrides javafx. Sends notifications to all attached
|
| public int | get()
Implements javafx. Returns the current value of this |
| public Object | getBean()
Implements javafx. Returns the |
| public String | getName()
Implements javafx. Returns the name of this property. |
| SizeProperty | back to summary |
|---|---|
| private SizeProperty() | |
| fireValueChangedEvent | back to summary |
|---|---|
| protected void fireValueChangedEvent() Overrides javafx. Doc from javafx. Sends notifications to all attached
| |
| get | back to summary |
|---|---|
| public int get() Implements javafx. Doc from javafx. Returns the current value of this
| |
| getBean | back to summary |
|---|---|
| public Object getBean() Implements javafx. Doc from javafx. Returns the
| |
| getName | back to summary |
|---|---|
| public String getName() Implements javafx. Doc from javafx. Returns the name of this property. If the property does not have a name,
this method returns an empty
| |