Package net.infonode.docking.action
Class StateDependentWindowAction
- java.lang.Object
-
- net.infonode.docking.action.DockingWindowAction
-
- net.infonode.docking.action.StateDependentWindowAction
-
- All Implemented Interfaces:
java.io.Serializable,IconProvider
public class StateDependentWindowAction extends DockingWindowAction
Performs different actions on a window depending on the state of the window.- Since:
- IDW 1.3.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StateDependentWindowActionMAXIMIZE_RESTOREIf the window is maximized or minimized it is restored, otherwise it is maximized.static StateDependentWindowActionMAXIMIZE_RESTORE_WITH_ABORTIf the window is maximized or minimized it is restored, otherwise it is maximized.
-
Constructor Summary
Constructors Constructor Description StateDependentWindowAction(DockingWindowAction normalAction, DockingWindowAction minimizedAction, DockingWindowAction maximizedAction)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetName()Returns the name of this action.booleanisPerformable(DockingWindow window)Returns true if this action is performable on a window.voidperform(DockingWindow window)Performs this action on a window.-
Methods inherited from class net.infonode.docking.action.DockingWindowAction
getAction, getIcon, toString
-
-
-
-
Field Detail
-
MAXIMIZE_RESTORE
public static final StateDependentWindowAction MAXIMIZE_RESTORE
If the window is maximized or minimized it is restored, otherwise it is maximized.
-
MAXIMIZE_RESTORE_WITH_ABORT
public static final StateDependentWindowAction MAXIMIZE_RESTORE_WITH_ABORT
If the window is maximized or minimized it is restored, otherwise it is maximized. The operations can be aborted by aDockingWindowListener.- Since:
- IDW 1.4.0
-
-
Constructor Detail
-
StateDependentWindowAction
public StateDependentWindowAction(DockingWindowAction normalAction, DockingWindowAction minimizedAction, DockingWindowAction maximizedAction)
Constructor.- Parameters:
normalAction- the action to perform if a window is in normal stateminimizedAction- the action to perform if a window is minimizedmaximizedAction- the action to perform if a window is maximized
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from class:DockingWindowActionReturns the name of this action.- Specified by:
getNamein classDockingWindowAction- Returns:
- the name of this action
-
isPerformable
public boolean isPerformable(DockingWindow window)
Description copied from class:DockingWindowActionReturns true if this action is performable on a window.- Specified by:
isPerformablein classDockingWindowAction- Parameters:
window- the window on which the action will be performed- Returns:
- true if this action is performable on the window
-
perform
public void perform(DockingWindow window)
Description copied from class:DockingWindowActionPerforms this action on a window.- Specified by:
performin classDockingWindowAction- Parameters:
window- the window on which to perform the action
-
-