Package org.eclipse.gef.common.activate
Class ActivatableSupport
java.lang.Object
org.eclipse.gef.common.activate.ActivatableSupport
A support class to manage the activeProperty state for a source
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.-
Property Summary
PropertiesTypePropertyDescriptionReturns aReadOnlyBooleanPropertythat reflects the activeProperty state of thisActivatableSupport. -
Constructor Summary
ConstructorsConstructorDescriptionActivatableSupport(IActivatable source) Creates a newActivatableSupportfor the given sourceIActivatable. -
Method Summary
Modifier and TypeMethodDescriptionvoidActivates thisActivatableSupportif it is not yet active.Returns aReadOnlyBooleanPropertythat reflects the activeProperty state of thisActivatableSupport.voiddeactivate(Runnable preDeactivationCallback, Runnable postDeactivationCallback) Deactivates thisActivatableSupportif it is not yet inactive.booleanisActive()Reports whether thisActivatableSupportis activeProperty or inactive.
-
Property Details
-
active
Returns aReadOnlyBooleanPropertythat reflects the activeProperty state of thisActivatableSupport.- See Also:
-
-
Constructor Details
-
ActivatableSupport
Creates a newActivatableSupportfor the given sourceIActivatable.- Parameters:
source- TheIActivatablethat encloses the to be createdActivatableSupport, delegating calls to it. May not benull
-
-
Method Details
-
activate
Activates thisActivatableSupportif it is not yet active.- Parameters:
preActivationCallback- An optional callback that is executed before the active state is set.postActivationCallback- An optional callback that is executed after the active state has been set.- See Also:
-
activeProperty
Returns aReadOnlyBooleanPropertythat reflects the activeProperty state of thisActivatableSupport.- See Also:
-
deactivate
Deactivates thisActivatableSupportif it is not yet inactive.- Parameters:
preDeactivationCallback- An optional callback that is executed before the active state is unset.postDeactivationCallback- An optional callback that is executed after the active state has been unset.- See Also:
-
isActive
public boolean isActive()Reports whether thisActivatableSupportis activeProperty or inactive.- Returns:
truein case theActivatableSupportis activeProperty,falseotherwise.- See Also:
-