Package org.eclipse.gef.common.activate
Interface IActivatable
-
public interface IActivatable
AnIActivatable
represents an entity that can be activated (activate()
) and deactivated (deactivate()
) as required.The current activation state of an
IActivatable
(whether the entity is active or not) can be queried by clients (isActive()
) and changes to it can be observed via theactive property
Any client implementing this interface may internally use an
ActivatableSupport
as a delegate to easily realize the required functionality.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ACTIVE_PROPERTY
The name of theactive property
.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
activate()
Activates theIActivatable
.javafx.beans.property.ReadOnlyBooleanProperty
activeProperty()
A read-only property providing information about the active state if thisIActivatable
.void
deactivate()
Deactivates theIActivatable
.boolean
isActive()
Reports whether thisIActivatable
is active or inactive, which resembles the value of theactive property
.
-
-
-
Field Detail
-
ACTIVE_PROPERTY
static final java.lang.String ACTIVE_PROPERTY
The name of theactive property
.- See Also:
- Constant Field Values
-
-
Method Detail
-
activate
void activate()
Activates theIActivatable
. It is expected that a call toisActive()
returnstrue
after this method has been called (unlessdeactivate()
is called to deactivate theIActivatable
).
-
activeProperty
javafx.beans.property.ReadOnlyBooleanProperty activeProperty()
A read-only property providing information about the active state if thisIActivatable
.- Returns:
- A read-only boolean property which is
true
in case theIActivatable
is active,false
otherwise.
-
deactivate
void deactivate()
Deactivates theIActivatable
. It is expected that a call toisActive()
returnfalse
after this method has been called (unless {activate()
is called to re-activate theIAdaptable
.
-
isActive
boolean isActive()
Reports whether thisIActivatable
is active or inactive, which resembles the value of theactive property
.- Returns:
true
in case theIActivatable
is active,false
otherwise.
-
-