@ClientOnly public class ReplaceActionGuard extends java.lang.Object implements ActionGuard
ActionGuard
that adds a ReplaceAction
to all elements
that are Dockable
and DockStation
at the same time.Constructor and Description |
---|
ReplaceActionGuard(DockController controller)
Creates a new guard
|
Modifier and Type | Method and Description |
---|---|
DockActionSource |
getSource(Dockable dockable)
Gets a list of actions for the
Dockable |
boolean |
isVisible()
Tells whether the action of this guard can be seen or not
|
boolean |
react(Dockable dockable)
|
void |
setVisible(boolean visible)
Sets the visibility of the action.
|
public ReplaceActionGuard(DockController controller)
controller
- The controller for which actions are created.public void setVisible(boolean visible)
visible
- the new statepublic boolean isVisible()
true
if the action can be seenpublic DockActionSource getSource(Dockable dockable)
ActionGuard
Dockable
getSource
in interface ActionGuard
dockable
- The Dockable
for which ActionGuard.react(Dockable)
is true
dockable
.public boolean react(Dockable dockable)
ActionGuard
Dockable
and tells whether this
ActionGuard is interested in it and wants to add some additional
actions
to it, or if this guard
is not made for the dockable
.react
in interface ActionGuard
dockable
- The Dockable
to testtrue
if the ActionGuard.getSource(Dockable)
-method
should be invoked, false
otherwise