public class CloseAction extends SimpleButtonAction implements ListeningDockAction
close
-method is invoked with the
Dockable
to close. This method will then remove the Dockable
from it's parent.BUTTON_CONTENT_FILTER
Constructor and Description |
---|
CloseAction(DockController controller)
Sets the icon and the text of this action.
|
Modifier and Type | Method and Description |
---|---|
void |
action(Dockable dockable)
Invoked when this action is triggered by the user.
|
protected void |
close(Dockable dockable)
Invoked when the
dockable has to be closed. |
DockActionIcon |
getCloseIcon()
Gets the
DockActionIcon which is responsible for automatically setting the close
icon. |
DockActionIcon |
getCloseIconHover()
Gets the
DockActionIcon which is responsible for automatically setting the close icon
when the mouse is hovering over the button. |
DockActionIcon |
getCloseIconPressed()
Gets the
DockActionIcon which is responsible for automatically setting the close icon
if the mouse is pressed. |
void |
setController(DockController controller)
Called when a new controller has been set.
|
addActionListener, createView, getCommand, removeActionListener, setCommand, trigger
isDropDownSelectable, isDropDownSelectable, isDropDownTriggerable, isDropDownTriggerableNotSelected, isDropDownTriggerableSelected, setDropDownSelectable, setDropDownTriggerableNotSelected, setDropDownTriggerableSelected
bound, getAccelerator, getDisabledIcon, getDockableRepresentation, getDockableRepresentation, getIcon, getIcon, getIcon, getIconContexts, getText, getText, getTooltip, getTooltipText, getTooltipText, isEnabled, isEnabled, setAccelerator, setDisabledIcon, setDockableRepresentation, setEnabled, setIcon, setIcon, setText, setTooltip, trigger, unbound
addDockActionListener, bind, fireActionEnabledChanged, fireActionIconChanged, fireActionRepresentativeChanged, fireActionTextChanged, fireActionTooltipTextChanged, getBoundDockables, isBound, removeDockActionListener, unbind
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
bind, createView, trigger, unbind
isDropDownSelectable, isDropDownTriggerable
addDockActionListener, getDockableRepresentation, getIcon, getIconContexts, getText, getTooltipText, isEnabled, removeDockActionListener
getAccelerator, getDisabledIcon, getDockableRepresentation, getIcon, getIcon, getText, getTooltip, getTooltipText, isEnabled, setAccelerator, setDisabledIcon, setDockableRepresentation, setEnabled, setIcon, setIcon, setText, setTooltip
public CloseAction(DockController controller)
controller
- The controller from which this action should read
properties, might be null
and can be changed by the
method setController
public DockActionIcon getCloseIcon()
DockActionIcon
which is responsible for automatically setting the close
icon.public DockActionIcon getCloseIconHover()
DockActionIcon
which is responsible for automatically setting the close icon
when the mouse is hovering over the button.public DockActionIcon getCloseIconPressed()
DockActionIcon
which is responsible for automatically setting the close icon
if the mouse is pressed.public void setController(DockController controller)
ListeningDockAction
setController
in interface ListeningDockAction
controller
- the new controllerpublic void action(Dockable dockable)
ButtonDockAction
action
in interface ButtonDockAction
action
in class SimpleButtonAction
dockable
- The Dockable
which is associated with
this DockAction, and which shall be used for the current action.