@ButtonContentAction public class FlapDockHoldToggle extends GroupedSelectableDockAction.Check<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 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.
|
createGroupaddSelectableListener, createGroup, createView, fireSelectedChanged, fireSelectedChanged, getDisabledSelectedIcon, getSelectedIcon, isSelected, isSelected, removeSelectableListener, setDisabledSelectedIcon, setGroup, setSelected, setSelectedIconisDropDownSelectable, isDropDownSelectable, isDropDownTriggerable, isDropDownTriggerable, setDropDownSelectable, setDropDownTriggerableNotSelected, setDropDownTriggerableSelectedbound, 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, unboundaddDockActionListener, bind, fireActionEnabledChanged, fireActionIconChanged, fireActionRepresentativeChanged, fireActionTextChanged, fireActionTooltipTextChanged, getBoundDockables, isBound, removeDockActionListener, unbindclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbind, createView, unbindisDropDownSelectable, isDropDownTriggerableaddDockActionListener, getDockableRepresentation, getIcon, getIconContexts, getText, getTooltipText, isEnabled, removeDockActionListenerpublic FlapDockHoldToggle(FlapDockStation station)
station - The station on which the Dockables
are registered.public boolean trigger(Dockable dockable)
DockActiontrigger in interface DockActiontrigger in class GroupedDockAction<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)
SelectableDockActiondockable.setSelected in interface SelectableDockActionsetSelected in class GroupedSelectableDockAction<Boolean>dockable - the affected dockableselected - the new stateprotected Boolean createGroupKey(Dockable dockable)
GroupedDockActiondockable
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<Boolean,SimpleSelectableAction>dockable - The Dockable whose group has to be
foundnull is not a valid result.public void setController(DockController controller)
ListeningDockActionsetController in interface ListeningDockActioncontroller - the new controllerCopyright © 2017 Docking Frames. All rights reserved.