bibliothek.gui.dock.station.flap
Class FlapDockHoldToggle
java.lang.Object
bibliothek.gui.dock.action.actions.AbstractStandardDockAction
bibliothek.gui.dock.action.actions.GroupedDockAction<K,D>
bibliothek.gui.dock.action.actions.GroupedDropDownItemAction<K,SimpleSelectableAction>
bibliothek.gui.dock.action.actions.GroupedSelectableDockAction<K>
bibliothek.gui.dock.action.actions.GroupedSelectableDockAction.Check<java.lang.Boolean>
bibliothek.gui.dock.station.flap.FlapDockHoldToggle
- All Implemented Interfaces:
- DockAction, DropDownItemAction, ListeningDockAction, SelectableDockAction, StandardDockAction, StandardDropDownItemAction
@ButtonContentAction
public class FlapDockHoldToggle
- extends GroupedSelectableDockAction.Check<java.lang.Boolean>
- implements ListeningDockAction
This DockAction
is shown together with the children of a
FlapDockStation
, and allows to "stick" a Dockable
.
When a Dockable
is sticked, it will not be disposed by the
FlapDockStation
, when it looses the focus. In fact, this
action just uses the setHold
-method
of the station.
- Author:
- Benjamin Sigg
Method Summary |
protected java.lang.Boolean |
createGroupKey(Dockable dockable)
Calculates the name of the group to which the dockable
should be added. |
void |
setController(DockController controller)
Called when a new controller has been set. |
void |
setSelected(Dockable dockable,
boolean selected)
Sets the selected state for dockable . |
boolean |
trigger(Dockable dockable)
Does the appropriate action that can be done respecting the current
state of this action. |
Methods inherited from class bibliothek.gui.dock.action.actions.GroupedSelectableDockAction |
addSelectableListener, createGroup, createView, fireSelectedChanged, fireSelectedChanged, getDisabledSelectedIcon, getSelectedIcon, isSelected, isSelected, removeSelectableListener, setDisabledSelectedIcon, setGroup, setSelected, setSelectedIcon |
Methods inherited from class bibliothek.gui.dock.action.actions.GroupedDockAction |
bound, ensureGroup, getAccelerator, getDisabledIcon, getDisabledIcon, getDockableRepresentation, getDockableRepresentation, getGenerator, getGroup, getGroup, getIcon, getIcon, getText, getText, getTooltip, getTooltipText, getTooltipText, groupExists, isEnabled, isEnabled, isKnown, isRemoveEmptyGroups, removeGroup, setAccelerator, setDisabledIcon, setDockableRepresentation, setEnabled, setGenerator, setIcon, setRemoveEmptyGroups, setText, setTooltip, unbound |
Methods inherited from class bibliothek.gui.dock.action.actions.AbstractStandardDockAction |
addDockActionListener, bind, fireActionDisabledIconChanged, fireActionEnabledChanged, fireActionIconChanged, fireActionRepresentativeChanged, fireActionTextChanged, fireActionTooltipTextChanged, getBoundDockables, isBound, removeDockActionListener, unbind |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FlapDockHoldToggle
public FlapDockHoldToggle(FlapDockStation station)
- Constructor, sets the icons and makes the action ready to be shown.
- Parameters:
station
- The station on which the Dockables
are registered.
trigger
public boolean trigger(Dockable dockable)
- Description copied from interface:
DockAction
- Does the appropriate action that can be done respecting the current
state of this action.
- Specified by:
trigger
in interface DockAction
- Overrides:
trigger
in class GroupedDockAction<java.lang.Boolean,SimpleSelectableAction>
- Parameters:
dockable
- the element for which this action is called
- Returns:
true
if this action could do anything, false
if this action was not able to react in any way to the event.
setSelected
public void setSelected(Dockable dockable,
boolean selected)
- Description copied from interface:
SelectableDockAction
- Sets the selected state for
dockable
.
- Specified by:
setSelected
in interface SelectableDockAction
- Overrides:
setSelected
in class GroupedSelectableDockAction<java.lang.Boolean>
- Parameters:
dockable
- the affected dockableselected
- the new state
createGroupKey
protected java.lang.Boolean createGroupKey(Dockable dockable)
- Description copied from class:
GroupedDockAction
- Calculates the name of the group to which the
dockable
should be added.
Every Dockable
is member of one group. The membership
determines text, icon, etc. for the dockable. Whenever a
dockable is bound
to this action,
the group will be determined by this method. Later on, the group
can be changed by the method setGroup
.
The default implementation uses the generator
of
this action.
- Overrides:
createGroupKey
in class GroupedDockAction<java.lang.Boolean,SimpleSelectableAction>
- Parameters:
dockable
- The Dockable
whose group has to be
found
- Returns:
- the name of the dockable's group. That can be an existing
or a non existing group.
null
is not a valid result.
setController
public void setController(DockController controller)
- Description copied from interface:
ListeningDockAction
- Called when a new controller has been set.
- Specified by:
setController
in interface ListeningDockAction
- Parameters:
controller
- the new controller