public class ActivatableSupport
extends java.lang.Object
IActivatable
. It offers all methods defined by IActivatable
,
while not formally implementing the interface, and can thus be used by a
source IActivatable
as a delegate.
If the given IActivatable
is also IAdaptable
, all calls to
activate()
and deactivate()
will be forwarded to all
adapters registered at the IActivatable
at that moment. However, the
ActivatableSupport
will not register a change listener on the
IAdaptable
to get notified about newly set or unset adapters, so they
will not be automatically activated/deactivated. The source
IActivatable
may use an AdaptableSupport
as a second delegate
for this purpose.
Type | Property and Description |
---|---|
javafx.beans.property.ReadOnlyBooleanProperty |
active
Returns a
ReadOnlyBooleanProperty that reflects the
activeProperty state of this ActivatableSupport . |
Constructor and Description |
---|
ActivatableSupport(IActivatable source)
Creates a new
ActivatableSupport for the given source
IActivatable and a related PropertyChangeSupport . |
Modifier and Type | Method and Description |
---|---|
void |
activate()
Activates this
ActivatableSupport if it is not yet
activeProperty. |
javafx.beans.property.ReadOnlyBooleanProperty |
activeProperty()
Returns a
ReadOnlyBooleanProperty that reflects the
activeProperty state of this ActivatableSupport . |
void |
deactivate()
Deactivates this
ActivatableSupport if it is not yet inactive. |
boolean |
isActive()
Reports whether this
ActivatableSupport is activeProperty or
inactive. |
public javafx.beans.property.ReadOnlyBooleanProperty activeProperty
ReadOnlyBooleanProperty
that reflects the
activeProperty state of this ActivatableSupport
.isActive()
public ActivatableSupport(IActivatable source)
ActivatableSupport
for the given source
IActivatable
and a related PropertyChangeSupport
.source
- The IActivatable
that encloses the to be created
ActivatableSupport
, delegating calls to it. May not be
null
public void activate()
ActivatableSupport
if it is not yet
activeProperty.
Will first adjust the activeProperty state, then activate any
IActivatable
adapters, being registered at the source
IActivatable
.IActivatable.activate()
public javafx.beans.property.ReadOnlyBooleanProperty activeProperty()
ReadOnlyBooleanProperty
that reflects the
activeProperty state of this ActivatableSupport
.isActive()
public void deactivate()
ActivatableSupport
if it is not yet inactive.
Will first deactivate any IActivatable
adapters, being registered
at the source IActivatable
, then adjust the activeProperty state.IActivatable.deactivate()
public boolean isActive()
ActivatableSupport
is activeProperty or
inactive.true
in case the ActivatableSupport
is
activeProperty, false
otherwise.IActivatable.isActive()
Copyright (c) 2014 itemis AG and others. All rights reserved.