com.javadocking.dockable
Class StateActionDockable

java.lang.Object
  extended by com.javadocking.dockable.ActionDockable
      extended by com.javadocking.dockable.StateActionDockable
All Implemented Interfaces:
Dockable

public class StateActionDockable
extends ActionDockable

This action dockable is a decorator for a delegate dockable. It adds one row of actions to the matrix of actions (Dockable.getActions()) of the delegate. The actions that are added, are created by the DockableStateActionFactory.

Information on using dockables with state actions is in How to Use Dockables in The Sanaware Developer Guide.

Author:
Heidi Rakels.

Constructor Summary
StateActionDockable(Dockable delegate, DockableStateActionFactory dockableStateActionFactory, int[] newDockableStates)
           Constructs a decorator for the given delegate dockable.
 
Method Summary
 javax.swing.Action[][] getActionsToAdd()
          Sets the actions that will be added by this wrapper to the matrix of actions of the delegate.
 
Methods inherited from class com.javadocking.dockable.ActionDockable
addDockingListener, addPropertyChangeListener, equals, fireDockingChanged, fireDockingWillChange, getActions, getContent, getDescription, getDock, getDockingModes, getIcon, getID, getLastDockingMode, getPossibleStates, getState, getTitle, getVisualizer, hashCode, isWithHeader, removeDockingListener, removePropertyChangeListener, setActionsToAdd, setDock, setLastDockingMode, setState, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StateActionDockable

public StateActionDockable(Dockable delegate,
                           DockableStateActionFactory dockableStateActionFactory,
                           int[] newDockableStates)

Constructs a decorator for the given delegate dockable.

One row of actions is added to the matrix of actions (Dockable.getActions()) of the delegate.

For every state in the given array newDockableStates an action is created with the method DockableStateActionFactory.createDockableStateAction(Dockable, int).

Parameters:
delegate - The decorated dockable.
dockableStateActionFactory - The factory that creates the DockableStateActions.
newDockableStates - The dockable states for which an action has to be added.
Method Detail

getActionsToAdd

public javax.swing.Action[][] getActionsToAdd()
Sets the actions that will be added by this wrapper to the matrix of actions of the delegate.

Overrides:
getActionsToAdd in class ActionDockable
Returns:
actions The actions that will be added to the matrix of actions of the delegate.
See Also:
ActionDockable.getActions()