Class CExtendedModeAction
java.lang.Object
bibliothek.gui.dock.common.action.CAction
bibliothek.gui.dock.common.intern.action.CDecorateableAction<A>
bibliothek.gui.dock.common.intern.action.CDropDownItem<CExtendedModeAction.Action>
bibliothek.gui.dock.common.intern.action.CExtendedModeAction
- Direct Known Subclasses:
CExternalizeAction,CMaximizeAction,CMinimizeAction,CNormalizeAction,CUnexternalizeAction,CUnmaximizeExternalizedAction
This action is intended to change the
ExtendedMode of a
CDockable by calling CDockable.setExtendedMode(ExtendedMode).- Author:
- Benjamin Sigg
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates an empty, non initialized action.protectedCExtendedModeAction(CControl control, ExtendedMode mode, String iconKey, String textKey, String tooltipKey, PropertyKey<KeyStroke> gotoStroke) Creates a new action. -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method actually changes theExtendedModeofdockableto the mode that was given to this action in the constructor.protected booleancheckTrigger(KeyEvent event) Checks whether this action is able to trigger this action.protected CExtendedModeAction.ActionCreates an instance of the action representing thisCExtendedModeAction.protected DockControllerGets the controller from which this action currently reads its content.protected voidinit(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 voidsetController(DockController controller) Exchanges all the properties such that they are read fromcontrollerMethods inherited from class bibliothek.gui.dock.common.intern.action.CDropDownItem
isDropDownSelectable, isDropDownTriggerableNotSelected, isDropDownTriggerableSelected, setDropDownSelectable, setDropDownTriggerableNotSelected, setDropDownTriggerableSelectedMethods inherited from class bibliothek.gui.dock.common.intern.action.CDecorateableAction
addDecorateableActionListener, 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, setTooltip
-
Constructor Details
-
CExtendedModeAction
protected CExtendedModeAction(CControl control, ExtendedMode mode, String iconKey, String textKey, String tooltipKey, PropertyKey<KeyStroke> gotoStroke) Creates a new action.- Parameters:
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 theIconManagertextKey- the key for the text of this action when searching theTextManagertooltipKey- the key for the tooltip of this action when searching theTextManagergotoStroke- the key to theKeyStrokethat triggers this action
-
CExtendedModeAction
protected CExtendedModeAction()Creates an empty, non initialized action. Subclasses must callinit(CControl, ExtendedMode, String, String, String, PropertyKey)to complete initialization.
-
-
Method Details
-
init
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.- Parameters:
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 theIconManagertextKey- the key for the text of this action when searching theTextManagertooltipKey- the key for the tooltip of this action when searching theTextManagergotoStroke- the key to theKeyStrokethat triggers this action
-
setController
Exchanges all the properties such that they are read fromcontroller- Parameters:
controller- the controller from which to read properties, ornull
-
getController
Gets the controller from which this action currently reads its content.- Returns:
- the controller or
null
-
checkTrigger
Checks whether this action is able to trigger this action.- Parameters:
event- an event that matches the accelerator of this action- Returns:
trueif this action really is triggered
-
action
This method actually changes theExtendedModeofdockableto 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.- Parameters:
dockable- the element for which the action is executed
-
createAction
Creates an instance of the action representing thisCExtendedModeAction.- Returns:
- the action
-