Class CCloseAction
java.lang.Object
bibliothek.gui.dock.common.action.CAction
bibliothek.gui.dock.common.intern.action.CDecorateableAction<A>
bibliothek.gui.dock.common.intern.action.CDropDownItem<CCloseAction.Action>
bibliothek.gui.dock.common.action.predefined.CCloseAction
An action that can close any
CDockable by calling
CDockable.setVisible(boolean). Clients can either create one
CCloseAction for each CDockable or use one action for many CDockables at the
same time.- Author:
- Benjamin Sigg
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassInternal representation of theCCloseAction, just callsclose(CDockable)when triggered. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClosesdockablenow.protected CCloseAction.ActionCreates the action that is used forCDecorateableAction.intern().Methods 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
-
CCloseAction
Creates a new action- Parameters:
control- the control for which this action will be used
-
-
Method Details
-
createAction
Creates the action that is used forCDecorateableAction.intern().- Returns:
- the internal representation of this action
-
close
Closesdockablenow. This method is always called when this action is triggered, so this is the optimal method to be overridden and extended with new features like aJOptionPaneasking whetherdockableshould really be closed.
Note: Consider using theCVetoClosingListenerinstead, it can handle all kind of closing events.- Parameters:
dockable- the element to close
-