@ButtonContentAction public class FlapDockHoldToggle extends GroupedSelectableDockAction.Check<java.lang.Boolean> implements ListeningDockAction
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.GroupedSelectableDockAction.Check<K>, GroupedSelectableDockAction.Radio<K>
BUTTON_CONTENT_FILTER
Constructor and Description |
---|
FlapDockHoldToggle(FlapDockStation station)
Constructor, sets the icons and makes the action ready to be shown.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.Boolean |
createGroupKey(Dockable dockable)
Calculates the name of the group to which the
dockable
should be added.Every Dockable is member of one group. |
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.
|
createGroup
addSelectableListener, createGroup, createView, fireSelectedChanged, fireSelectedChanged, getDisabledSelectedIcon, getSelectedIcon, isSelected, isSelected, removeSelectableListener, setDisabledSelectedIcon, setGroup, setSelected, setSelectedIcon
isDropDownSelectable, isDropDownSelectable, isDropDownTriggerable, isDropDownTriggerable, setDropDownSelectable, setDropDownTriggerableNotSelected, setDropDownTriggerableSelected
bound, ensureGroup, getAccelerator, getDisabledIcon, getDisabledIcon, getDockableRepresentation, getDockableRepresentation, getGenerator, getGroup, getGroup, getIcon, getIcon, getIcon, getIconContexts, getText, getText, getTooltip, getTooltipText, getTooltipText, groupExists, isEnabled, isEnabled, isKnown, isRemoveEmptyGroups, removeGroup, setAccelerator, setDisabledIcon, setDockableRepresentation, setEnabled, setGenerator, setIcon, setIcon, setRemoveEmptyGroups, setText, setTooltip, unbound
addDockActionListener, bind, fireActionEnabledChanged, fireActionIconChanged, fireActionRepresentativeChanged, fireActionTextChanged, fireActionTooltipTextChanged, getBoundDockables, isBound, removeDockActionListener, unbind
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
bind, createView, unbind
isDropDownSelectable, isDropDownTriggerable
addDockActionListener, getDockableRepresentation, getIcon, getIconContexts, getText, getTooltipText, isEnabled, removeDockActionListener
public FlapDockHoldToggle(FlapDockStation station)
station
- The station on which the Dockables
are registered.public boolean trigger(Dockable dockable)
DockAction
trigger
in interface DockAction
trigger
in class GroupedDockAction<java.lang.Boolean,SimpleSelectableAction>
dockable
- the element for which this action is calledtrue
if this action could do anything, false
if this action was not able to react in any way to the event.public void setSelected(Dockable dockable, boolean selected)
SelectableDockAction
dockable
.setSelected
in interface SelectableDockAction
setSelected
in class GroupedSelectableDockAction<java.lang.Boolean>
dockable
- the affected dockableselected
- the new stateprotected java.lang.Boolean createGroupKey(Dockable dockable)
GroupedDockAction
dockable
should be added.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
.generator
of
this action.createGroupKey
in class GroupedDockAction<java.lang.Boolean,SimpleSelectableAction>
dockable
- The Dockable
whose group has to be
foundnull
is not a valid result.public void setController(DockController controller)
ListeningDockAction
setController
in interface ListeningDockAction
controller
- the new controller