@FrameworkOnly public class CExtendedModeAction extends CDropDownItem<CExtendedModeAction.Action>
ExtendedMode of a
CDockable by calling CDockable.setExtendedMode(ExtendedMode).| Modifier and Type | Class and Description |
|---|---|
class |
CExtendedModeAction.Action
The internal representation of a
CExtendedModeAction. |
| Modifier | Constructor and Description |
|---|---|
protected |
CExtendedModeAction()
Creates an empty, non initialized action.
|
protected |
CExtendedModeAction(CControl control,
ExtendedMode mode,
String iconKey,
String textKey,
String tooltipKey,
PropertyKey<KeyStroke> gotoStroke)
Creates a new action.
|
| Modifier and Type | Method and Description |
|---|---|
void |
action(CDockable dockable)
This method actually changes the
ExtendedMode of dockable
to the mode that was given to this action in the constructor. |
protected boolean |
checkTrigger(KeyEvent event)
Checks whether this action is able to trigger this action.
|
protected CExtendedModeAction.Action |
createAction()
Creates an instance of the action representing this
CExtendedModeAction. |
protected DockController |
getController()
Gets the controller from which this action currently reads its content.
|
protected void |
init(CControl control,
ExtendedMode mode,
String iconKey,
String textKey,
String tooltipKey,
PropertyKey<KeyStroke> gotoStroke)
Creates a new action, this method must be called only once.
|
protected void |
setController(DockController controller)
Exchanges all the properties such that they are read from
controller |
isDropDownSelectable, isDropDownTriggerableNotSelected, isDropDownTriggerableSelected, setDropDownSelectable, setDropDownTriggerableNotSelected, setDropDownTriggerableSelectedaddDecorateableActionListener, getAccelerator, getDisabledHoverIcon, getDisabledIcon, getDisabledPressedIcon, getHoverIcon, getIcon, getPressedIcon, getText, getTooltip, init, intern, isAcceleratorGlobal, isEnabled, isShowTextOnButtons, removeDecorateableActionListener, setAccelerator, setAcceleratorIsGlobal, setDisabledHoverIcon, setDisabledIcon, setDisabledPressedIcon, setEnabled, setHoverIcon, setIcon, setPressedIcon, setShowTextOnButtons, setText, setTooltipprotected CExtendedModeAction(CControl control, ExtendedMode mode, String iconKey, String textKey, String tooltipKey, PropertyKey<KeyStroke> gotoStroke)
control - the control for which this action will be usedmode - the mode into which this action leadsiconKey - the key of the icon when searching in the IconManagertextKey - the key for the text of this action when searching the TextManagertooltipKey - the key for the tooltip of this action when searching the TextManagergotoStroke - the key to the KeyStroke that triggers this actionprotected CExtendedModeAction()
init(CControl, ExtendedMode, String, String, String, PropertyKey) to
complete initialization.protected void init(CControl control, ExtendedMode mode, String iconKey, String textKey, String tooltipKey, PropertyKey<KeyStroke> gotoStroke)
control - the control for which this action will be usedmode - the mode into which this action leadsiconKey - the key of the icon when searching in the IconManagertextKey - the key for the text of this action when searching the TextManagertooltipKey - the key for the tooltip of this action when searching the TextManagergotoStroke - the key to the KeyStroke that triggers this actionprotected void setController(DockController controller)
controllercontroller - the controller from which to read properties, or nullprotected DockController getController()
nullprotected boolean checkTrigger(KeyEvent event)
event - an event that matches the accelerator of this actiontrue if this action really is triggeredpublic void action(CDockable dockable)
ExtendedMode of dockable
to the mode that was given to this action in the constructor. Every
triggering of this action will finally call this method, so this method
is the optimal point to be overridden and modified.dockable - the element for which the action is executedprotected CExtendedModeAction.Action createAction()
CExtendedModeAction.Copyright © 2018. All rights reserved.