Object
ObjectBinding with the ability to lazily register and eagerly unregister listeners on its
dependencies.
| Modifier and Type | Field and Description |
|---|---|
| private Subscription | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | addListener(ChangeListener<? super T>
The listener to register listener)Overrides javafx. Implements javafx. Adds a |
| public void | addListener(InvalidationListener
The listener to register listener)Overrides javafx. Implements javafx. Adds an |
| protected boolean | allowValidation()
Overrides javafx. Checks if the binding is allowed to become valid. |
| protected abstract Subscription | Returns: aSubscription which will be cancelled when this binding no longer has any observers, never nullCalled when this binding was previously not observed and a new observer was added. |
| public void | removeListener(ChangeListener<? super T>
The listener to remove listener)Overrides javafx. Implements javafx. Removes the given listener from the list of listeners that are notified
whenever the value of the |
| public void | removeListener(InvalidationListener
The listener to remove listener)Overrides javafx. Implements javafx. Removes the given listener from the list of listeners, that are notified
whenever the value of the |
| private void | updateSubscriptionAfterAdd()
Called after a listener was added to start observing inputs if they're not observed already. |
| private void | updateSubscriptionAfterRemove()
Called after a listener was removed to stop observing inputs if this was the last listener observing this binding. |
| subscription | back to summary |
|---|---|
| private Subscription subscription | |
| wasObserved | back to summary |
|---|---|
| private boolean wasObserved | |
| LazyObjectBinding | back to summary |
|---|---|
| pack-priv LazyObjectBinding() | |
| addListener | back to summary |
|---|---|
| public void addListener(ChangeListener<? super T> listener) Overrides javafx. Implements javafx. Doc from javafx. Adds a
Note that the same actual
The
| |
| addListener | back to summary |
|---|---|
| public void addListener(InvalidationListener listener) Overrides javafx. Implements javafx. Doc from javafx. Adds an
Note that the same actual
The
| |
| allowValidation | back to summary |
|---|---|
| protected boolean allowValidation() Overrides javafx. Doc from javafx. Checks if the binding is allowed to become valid. Overriding classes can prevent a binding from becoming valid. This is useful in subclasses which do not always listen for invalidations of their dependencies and prefer to recompute the current value instead. This can also be useful if caching of the current computed value is not desirable. The default implementation always allows bindings to become valid.
| |
| observeSources | back to summary |
|---|---|
| protected abstract Subscription observeSources() Called when this binding was previously not observed and a new observer was added. Implementors must return a
| |
| removeListener | back to summary |
|---|---|
| public void removeListener(ChangeListener<? super T> listener) Overrides javafx. 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(InvalidationListener listener) Overrides javafx. 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.
| |
| updateSubscriptionAfterAdd | back to summary |
|---|---|
| private void updateSubscriptionAfterAdd() Called after a listener was added to start observing inputs if they're not observed already. | |
| updateSubscriptionAfterRemove | back to summary |
|---|---|
| private void updateSubscriptionAfterRemove() Called after a listener was removed to stop observing inputs if this was the last listener observing this binding. | |