bibliothek.gui.dock.action
Interface SelectableDockAction

All Superinterfaces:
DockAction, DropDownItemAction, StandardDockAction, StandardDropDownItemAction
All Known Subinterfaces:
CommonSelectableAction, SharingSelectableDockAction
All Known Implementing Classes:
CommonSimpleCheckAction, CommonSimpleRadioAction, FlapDockHoldToggle, GroupedSelectableDockAction, GroupedSelectableDockAction.Check, GroupedSelectableDockAction.Radio, SimpleSelectableAction, SimpleSelectableAction.Check, SimpleSelectableAction.Radio, StationChildrenActionSource.FocusAction

public interface SelectableDockAction
extends StandardDockAction, StandardDropDownItemAction

An action which has two states "selected" and "not selected".

Author:
Benjamin Sigg

Method Summary
 void addSelectableListener(SelectableDockActionListener listener)
          Adds a listener to this action.
 boolean isSelected(Dockable dockable)
          Tells whether this DockAction is selected or not (in respect to the given dockable).
 void removeSelectableListener(SelectableDockActionListener listener)
          Removes a listener from this action.
 void setSelected(Dockable dockable, boolean selected)
          Sets the selected state for dockable.
 
Methods inherited from interface bibliothek.gui.dock.action.dropdown.DropDownItemAction
isDropDownSelectable, isDropDownTriggerable
 

Method Detail

isSelected

boolean isSelected(Dockable dockable)
Tells whether this DockAction is selected or not (in respect to the given dockable).

Parameters:
dockable - The Dockable for which this action may be selected or not selected
Returns:
true if this DockAction is selcted, false otherwise

setSelected

void setSelected(Dockable dockable,
                 boolean selected)
Sets the selected state for dockable.

Parameters:
dockable - the affected dockable
selected - the new state

addSelectableListener

void addSelectableListener(SelectableDockActionListener listener)
Adds a listener to this action. The listener will be invoked whenever the selected state of a Dockable changes.

Parameters:
listener - the new listener

removeSelectableListener

void removeSelectableListener(SelectableDockActionListener listener)
Removes a listener from this action.

Parameters:
listener - the listener to remove