bibliothek.gui
Class DockFrontend.Hider

java.lang.Object
  extended by bibliothek.gui.dock.action.actions.AbstractStandardDockAction
      extended by bibliothek.gui.dock.action.actions.SimpleDockAction
          extended by bibliothek.gui.dock.action.actions.SimpleDropDownItemAction
              extended by bibliothek.gui.dock.action.actions.SimpleButtonAction
                  extended by bibliothek.gui.DockFrontend.Hider
All Implemented Interfaces:
ActionGuard, ButtonDockAction, DockAction, DropDownItemAction, StandardDockAction, StandardDropDownItemAction, IconManagerListener
Enclosing class:
DockFrontend

@EclipseTabDockAction
public class DockFrontend.Hider
extends SimpleButtonAction
implements ActionGuard, IconManagerListener

An object which is action and ActionGuard at the same time. The action is always to invoke hide of the enclosing a DockFrontend. The guard reacts on all Dockables which are known to the enclosing frontend.

Author:
Benjamin Sigg

Constructor Summary
DockFrontend.Hider()
          Creates a new action/guard.
 
Method Summary
 void action(Dockable dockable)
          Invoked when this action is triggered by the user.
 DockActionSource getSource(Dockable dockable)
          Gets a list of actions for the Dockable
 void iconChanged(String key, Icon icon)
          This method is invoked when an icon was exchanged.
 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.
 
Methods inherited from class bibliothek.gui.dock.action.actions.SimpleButtonAction
addActionListener, createView, getCommand, removeActionListener, setCommand, trigger
 
Methods inherited from class bibliothek.gui.dock.action.actions.SimpleDropDownItemAction
isDropDownSelectable, isDropDownSelectable, isDropDownTriggerable, isDropDownTriggerableNotSelected, isDropDownTriggerableSelected, setDropDownSelectable, setDropDownTriggerableNotSelected, setDropDownTriggerableSelected
 
Methods inherited from class bibliothek.gui.dock.action.actions.SimpleDockAction
bound, getAccelerator, getDisabledIcon, getDisabledIcon, getIcon, getIcon, getText, getText, getTooltip, getTooltipText, getTooltipText, isEnabled, isEnabled, setAccelerator, setDisabledIcon, setEnabled, setIcon, setText, setTooltip, trigger, unbound
 
Methods inherited from class bibliothek.gui.dock.action.actions.AbstractStandardDockAction
addDockActionListener, bind, fireActionDisabledIconChanged, fireActionEnabledChanged, fireActionIconChanged, fireActionTextChanged, fireActionTooltipTextChanged, getBoundDockables, isBound, removeDockActionListener, unbind
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface bibliothek.gui.dock.action.dropdown.DropDownItemAction
isDropDownSelectable, isDropDownTriggerable
 

Constructor Detail

DockFrontend.Hider

public DockFrontend.Hider()
Creates a new action/guard.

Method Detail

iconChanged

public void iconChanged(String key,
                        Icon icon)
Description copied from interface: IconManagerListener
This method is invoked when an icon was exchanged.

Specified by:
iconChanged in interface IconManagerListener
Parameters:
key - the key of the icon
icon - the new value of the icon

getSource

public DockActionSource getSource(Dockable dockable)
Description copied from interface: ActionGuard
Gets a list of actions for the Dockable

Specified by:
getSource in interface ActionGuard
Parameters:
dockable - The Dockable for which ActionGuard.react(Dockable) is true
Returns:
The actions which shall be used together with the dockable.

react

public boolean react(Dockable dockable)
Description copied from interface: ActionGuard
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.

Specified by:
react in interface ActionGuard
Parameters:
dockable - The Dockable to test
Returns:
true if the ActionGuard.getSource(Dockable)-method should be invoked, false otherwise

action

public void action(Dockable dockable)
Description copied from interface: ButtonDockAction
Invoked when this action is triggered by the user.

Specified by:
action in interface ButtonDockAction
Overrides:
action in class SimpleButtonAction
Parameters:
dockable - The Dockable which is associated with this DockAction, and which shall be used for the current action.