Class CloseAction
- All Implemented Interfaces:
SharingDropDownItemAction,SharingStandardDockAction,ButtonDockAction,DockAction,DropDownItemAction,ListeningDockAction,StandardDockAction,StandardDropDownItemAction
- Direct Known Subclasses:
CCloseAction.Action
This action shows an icon for "close". When the action is trigged,
the
close-method is invoked with the
Dockable to close. This method will then remove the Dockable
from it's parent.- Author:
- Benjamin Sigg
-
Field Summary
Fields inherited from interface bibliothek.gui.dock.action.DockAction
BUTTON_CONTENT_FILTER -
Constructor Summary
ConstructorsConstructorDescriptionCloseAction(DockController controller) Sets the icon and the text of this action. -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected voidInvoked when thedockablehas to be closed.Gets theDockActionIconwhich is responsible for automatically setting the close icon.Gets theDockActionIconwhich is responsible for automatically setting the close icon when the mouse is hovering over the button.Gets theDockActionIconwhich is responsible for automatically setting the close icon if the mouse is pressed.voidsetController(DockController controller) Methods inherited from class bibliothek.gui.dock.action.actions.SimpleButtonAction
addActionListener, createView, getCommand, removeActionListener, setCommand, triggerMethods inherited from class bibliothek.gui.dock.action.actions.SimpleDropDownItemAction
isDropDownSelectable, isDropDownSelectable, isDropDownTriggerable, isDropDownTriggerableNotSelected, isDropDownTriggerableSelected, setDropDownSelectable, setDropDownTriggerableNotSelected, setDropDownTriggerableSelectedMethods inherited from class bibliothek.gui.dock.action.actions.SimpleDockAction
bound, getAccelerator, getDisabledIcon, getDockableRepresentation, getDockableRepresentation, getIcon, getIcon, getIcon, getIconContexts, getText, getText, getTooltip, getTooltipText, getTooltipText, isAcceleratorGlobal, isEnabled, isEnabled, setAccelerator, setAcceleratorIsGlobal, setDisabledIcon, setDockableRepresentation, setEnabled, setIcon, setIcon, setText, setTooltip, trigger, unboundMethods inherited from class bibliothek.gui.dock.action.actions.AbstractStandardDockAction
addDockActionListener, bind, fireActionEnabledChanged, fireActionIconChanged, fireActionRepresentativeChanged, fireActionTextChanged, fireActionTooltipTextChanged, getBoundDockables, isBound, removeDockActionListener, unbindMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface bibliothek.gui.dock.action.DockAction
bind, createView, trigger, unbindMethods inherited from interface bibliothek.gui.dock.action.dropdown.DropDownItemAction
isDropDownSelectable, isDropDownTriggerableMethods inherited from interface bibliothek.gui.dock.action.actions.SharingStandardDockAction
getAccelerator, getDisabledIcon, getDockableRepresentation, getIcon, getIcon, getText, getTooltip, getTooltipText, isAcceleratorGlobal, isEnabled, setAccelerator, setAcceleratorIsGlobal, setDisabledIcon, setDockableRepresentation, setEnabled, setIcon, setIcon, setText, setTooltipMethods inherited from interface bibliothek.gui.dock.action.StandardDockAction
addDockActionListener, getDockableRepresentation, getIcon, getIconContexts, getText, getTooltipText, isEnabled, removeDockActionListener
-
Constructor Details
-
CloseAction
Sets the icon and the text of this action.- Parameters:
controller- The controller from which this action should read properties, might benulland can be changed by the methodsetController
-
-
Method Details
-
getCloseIcon
Gets theDockActionIconwhich is responsible for automatically setting the close icon.- Returns:
- the object that sets the icon
-
getCloseIconHover
Gets theDockActionIconwhich is responsible for automatically setting the close icon when the mouse is hovering over the button.- Returns:
- the object that sets the icon
-
getCloseIconPressed
Gets theDockActionIconwhich is responsible for automatically setting the close icon if the mouse is pressed.- Returns:
- the object that sets the icon
-
setController
- Specified by:
setControllerin interfaceListeningDockAction
-
action
- Specified by:
actionin interfaceButtonDockAction- Overrides:
actionin classSimpleButtonAction
-
close
Invoked when thedockablehas to be closed. The default-behaviour of this method is to remove theDockablefrom it's parent, if there is a parent.- Parameters:
dockable- TheDockableto close
-