com.javadocking.dockable.action
Class DefaultDockableStateActionFactory
java.lang.Object
com.javadocking.dockable.action.DefaultDockableStateActionFactory
- All Implemented Interfaces:
- DockableStateActionFactory
public class DefaultDockableStateActionFactory
- extends java.lang.Object
- implements DockableStateActionFactory
This factory creates the default actions for changing the state of a dockable.
The new state of a dockable is defined by a constant of the class DockableState
.
This class defines also constants for the possible actions that can be added to the popup, e.g. closed all, close others,
minimize all, minimize others, and dockable actions.
These constants are integers that can be combined with the bitwise or-operation.
- Author:
- Heidi Rakels.
Method Summary |
DockableStateAction |
createDockableStateAction(Dockable dockable,
int newDockableState)
Creates a default window state action for the states: DockableState.CLOSED, DockableState.NORMAL, DockableState.MAXIMIZED, DockableState.MINIMIZED, and DockableState.EXTERNALIZED. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultDockableStateActionFactory
public DefaultDockableStateActionFactory()
createDockableStateAction
public DockableStateAction createDockableStateAction(Dockable dockable,
int newDockableState)
- Creates a default window state action for the states: DockableState.CLOSED, DockableState.NORMAL, DockableState.MAXIMIZED, DockableState.MINIMIZED, and DockableState.EXTERNALIZED.
- Specified by:
createDockableStateAction
in interface DockableStateActionFactory
- Parameters:
dockable
- The dockable whose state will be changed by the created action.newDockableState
- The action puts the dockable in this state. Should be DockableState.NORMAL, DockableState.MAXIMIZED, DockableState.MINIMIZED, DockableState.CLOSED, or DockableState.EXTERNALIZED.
- Returns:
- The action to change the state of the window in which the dockable is docked.
- Throws:
java.lang.IllegalArgumentException
- If the given window state is not DockableState.NORMAL, DockableState.MAXIMIZED, DockableState.MINIMIZED, DockableState.CLOSED, or DockableState.EXTERNALIZED.