bibliothek.gui.dock.common.action.predefined
Class CCloseAction
java.lang.Object
bibliothek.gui.dock.common.action.CAction
bibliothek.gui.dock.common.intern.action.CDecorateableAction
bibliothek.gui.dock.common.intern.action.CDropDownItem
bibliothek.gui.dock.common.action.predefined.CCloseAction
public class CCloseAction
- extends CDropDownItem
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 CDockable
s at the
same time.
- Author:
- Benjamin Sigg
Methods inherited from class bibliothek.gui.dock.common.intern.action.CDecorateableAction |
getAccelerator, getDisabledIcon, getIcon, getText, getTooltip, init, isEnabled, setAccelerator, setDisabledIcon, setEnabled, setIcon, setText, setTooltip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CCloseAction
public CCloseAction(CControl control)
- Creates a new action
- Parameters:
control
- the control for which this action will be used
close
public void close(CDockable dockable)
- Closes
dockable
now. 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 a JOptionPane
asking whether
dockable
should really be closed.
Note: Consider using the CVetoClosingListener
instead, it can
handle all kind of closing events.
- Parameters:
dockable
- the element to close