bibliothek.gui.dock.action
Interface ActionGuard

All Known Implementing Classes:
DockFrontend.Hider, ReplaceActionGuard, SimpleTypedActionGuard, TypedActionGuard

public interface ActionGuard

An ActionGuard is added to a DockController, and whenever the actions of a Dockable have to be determined, all known ActionGuards are asked, if they may add some additional actions.

Author:
Benjamin Sigg
See Also:
DockController.addActionGuard(ActionGuard), DockController.removeActionGuard(ActionGuard), DockController.listOffers(Dockable)

Method Summary
 DockActionSource getSource(Dockable dockable)
          Gets a list of actions for the Dockable
 boolean react(Dockable dockable)
          Tests the given 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.
 

Method Detail

react

boolean react(Dockable dockable)
Tests the given 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.

Parameters:
dockable - The Dockable to test
Returns:
true if the getSource(Dockable)-method should be invoked, false otherwise

getSource

DockActionSource getSource(Dockable dockable)
Gets a list of actions for the Dockable

Parameters:
dockable - The Dockable for which react(Dockable) is true
Returns:
The actions which shall be used together with the dockable.