net.infonode.docking.action

Class DockingWindowAction

public abstract class DockingWindowAction extends Object implements Serializable, IconProvider

An action that can be performed on a DockingWindow. It has a name and an optional icon.

Since: IDW 1.3.0

Version: $Revision: 1.4 $

Author: $Author: jesper $

Method Summary
SimpleActiongetAction(DockingWindow window)
Creates a simple action that performs this action on a window.
IcongetIcon()
Returns the optional icon of this action.
abstract StringgetName()
Returns the name of this action.
abstract booleanisPerformable(DockingWindow window)
Returns true if this action is performable on a window.
abstract voidperform(DockingWindow window)
Performs this action on a window.
StringtoString()

Method Detail

getAction

public SimpleAction getAction(DockingWindow window)
Creates a simple action that performs this action on a window.

Parameters: window the window on which to perform the action

Returns: the action that performs this action on a window.

getIcon

public Icon getIcon()
Returns the optional icon of this action.

Returns: the optional icon of this action, null if there is no icon

getName

public abstract String getName()
Returns the name of this action.

Returns: the name of this action

isPerformable

public abstract boolean isPerformable(DockingWindow window)
Returns true if this action is performable on a window.

Parameters: window the window on which the action will be performed

Returns: true if this action is performable on the window

perform

public abstract void perform(DockingWindow window)
Performs this action on a window.

Parameters: window the window on which to perform the action

toString

public String toString()