BioLegato 0.7.3 Core API

org.biolegato.core.menu.variables
Class EZCommandButton

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by 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

Field Summary
 
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
 
Constructor Summary
EZCommandButton(EZRunWindow window, java.util.Map data)
          Creates a new instance of EZCommandButton
 
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
 

Constructor Detail

EZCommandButton

public EZCommandButton(EZRunWindow window,
                       java.util.Map data)
Creates a new instance of EZCommandButton

Method Detail

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

BioLegato 0.7.3 Core API

Copyright © 2008-2010 University of Manitoba.