public final class ToggleInclusionAction extends CustomizeConfigAction implements Command
app, id, MODIFIERS_TOOLTIP_KEY, NO_MNEMONIC, SELECTED_ICON_KEY, UNSELECTED_ICON_KEY
changeSupport, enabled
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor and Description |
---|
ToggleInclusionAction() |
Modifier and Type | Method and Description |
---|---|
protected void |
exec()
Second step of
LengthyAction.doIt() . |
CommandResult |
executeCommand(Gadget gadget,
String parameter,
int x,
int y)
Actually executes this command with specified parameter and in
specified context.
|
protected boolean |
init()
First step of
LengthyAction.doIt() . |
boolean |
prepareCommand(Gadget gadget,
String parameter,
int x,
int y)
Tests whether this command can be executed with specified parameter
and in specified context.
|
getActiveCustomizableConfig, updateEnabled
doIt, finish
actionPerformed, activeEditorChanged, applyPreferences, destroyApp, editingContextChanged, flushPreferences, getAccelerator, getApp, getDialogTitle, getIcon, getId, getLabel, getMnemonic, getMnemonicIndex, getModifiersToolTip, getSelectedIcon, getToolTip, getUnselectedIcon, hasListeners, initApp, isEditingContextSensitive, isSelected, namespacePrefixesChanged, saveStateChanged, setAccelerator, setDisabledIcons, setIcon, setLabel, setMnemonic, setMnemonicIndex, setModifiersToolTip, setSelected, setSelectedIcon, setToolTip, setUnselectedIcon, undoStateChanged, validityStateChanged, wasCtrlClick, wasRightClick, wasShiftClick
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
protected boolean init()
LengthyAction
LengthyAction.doIt()
. Possibly an interactive one. It is
possible to prompt the user during this step and therefore, the user
can cancel the execution of the action (before it actually starts).init
in class LengthyAction
true
if execution should proceed;
false
if execution has been canceledprotected void exec()
LengthyAction
LengthyAction.doIt()
. Actual execution of the action. A busy
cursor is displayed during this step.exec
in class LengthyAction
public boolean prepareCommand(Gadget gadget, String parameter, int x, int y)
Command
If the command can be executed, this method returns
true
after having configured its internal state for
consumption by method Command.executeCommand(com.xmlmind.xmledit.gadget.Gadget, java.lang.String, int, int)
which should be invoked
immediately after this one.
Returns false
if this command cannot be executed with
specified parameter and in specified context.
prepareCommand
in interface Command
gadget
- the target of this commandparameter
- parameterizes the command (that is, modifies the
behavior of the command in a command specific way)x
- X position relative to gadget of the mouse event
having triggered this command; -1 if this command was triggered by a
keyboard inputy
- Y position relative to gadget of the mouse event
having triggered this command; -1 if this command was triggered by a
keyboard inputpublic CommandResult executeCommand(Gadget gadget, String parameter, int x, int y)
Command
This method assumes that Command.prepareCommand(com.xmlmind.xmledit.gadget.Gadget, java.lang.String, int, int)
has been
successfully invoked immediately before its own invocation.
executeCommand
in interface Command
gadget
- the target of this commandparameter
- parameterizes the command (that is, modifies the
behavior of the command in a command specific way)x
- X position relative to gadget of the mouse event
having triggered this command; -1 if this command was triggered by a
keyboard inputy
- Y position relative to gadget of the mouse event
having triggered this command; -1 if this command was triggered by a
keyboard inputnull