org.biolegato.core.menu.variables
Class EZCommandButton
java.lang.Object
javax.swing.AbstractAction
org.biolegato.core.menu.variables.EZCommandButton
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.lang.Runnable, java.util.EventListener, javax.swing.Action, EZVariable
public class EZCommandButton
- extends javax.swing.AbstractAction
- implements java.lang.Runnable, EZVariable
- Author:
- alvare
- See Also:
- Serialized Form
| Fields inherited from class javax.swing.AbstractAction |
changeSupport, enabled |
| Fields inherited from interface javax.swing.Action |
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON |
|
Method Summary |
void |
actionPerformed(java.awt.event.ActionEvent e)
|
void |
close()
Notifies the variable that the program has now completed successfully, and it can
perform any closing operations |
java.lang.String |
getName()
|
java.lang.Object |
getValue()
Returns the value of the variable. |
protected java.lang.String |
replaceArguments(java.lang.String run)
Replaces the variables in the command string with their corresponding values. |
void |
run()
Used for running the command. |
| Methods inherited from class javax.swing.AbstractAction |
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EZCommandButton
public EZCommandButton(EZRunWindow window,
java.util.Map data)
- Creates a new instance of EZCommandButton
run
public void run()
- Used for running the command.
This function gathers all of the parameter settings from the widgets
in the window, then generates and executes the corresponding command
string.
- Specified by:
run in interface java.lang.Runnable
replaceArguments
protected java.lang.String replaceArguments(java.lang.String run)
- Replaces the variables in the command string with their corresponding values.
- Parameters:
run - the command to do the replacements on.widgets - the widget variables to use for string replacement.files - the file variables to use for string replacement.
- Returns:
- the altered command string.
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
- Specified by:
actionPerformed in interface java.awt.event.ActionListener
getValue
public java.lang.Object getValue()
- Description copied from interface:
EZVariable
- Returns the value of the variable.
- Specified by:
getValue in interface EZVariable
- Returns:
- the value of the variable
getName
public java.lang.String getName()
close
public void close()
- Description copied from interface:
EZVariable
- Notifies the variable that the program has now completed successfully, and it can
perform any closing operations
- Specified by:
close in interface EZVariable
Copyright © 2008-2010 University of Manitoba.