Package org.jboss.as.cli.gui.metacommand
Class ScriptAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- org.jboss.as.cli.gui.metacommand.ScriptAction
-
- All Implemented Interfaces:
ActionListener,Serializable,Cloneable,EventListener,Action
- Direct Known Subclasses:
ChooseScriptAction,OpenScriptAction
public abstract class ScriptAction extends AbstractAction
Abstract action that runs scripts.- Author:
- ssilvert
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classScriptAction.ScriptRunnerUse a SwingWorker to run the script in the background.
-
Field Summary
Fields Modifier and Type Field Description protected CliGuiContextcliGuiCtx-
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
-
Fields inherited from interface javax.swing.Action
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 Summary
Constructors Constructor Description ScriptAction(ScriptMenu menu, String name, CliGuiContext cliGuiCtx)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidactionPerformed(ActionEvent e)Subclasses should override this method and then call runScript() when a script File is determined.protected voidrunScript(File script)Run a CLI script from a File.-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Field Detail
-
cliGuiCtx
protected CliGuiContext cliGuiCtx
-
-
Constructor Detail
-
ScriptAction
public ScriptAction(ScriptMenu menu, String name, CliGuiContext cliGuiCtx)
-
-
Method Detail
-
actionPerformed
public abstract void actionPerformed(ActionEvent e)
Subclasses should override this method and then call runScript() when a script File is determined.
-
runScript
protected void runScript(File script)
Run a CLI script from a File.- Parameters:
script- The script file.
-
-