gui
Class JavaScriptAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by gui.JavaScriptAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

public class JavaScriptAction
extends javax.swing.AbstractAction

Class to execute JavaScript code when a button or a menu item is clicked

See Also:
Serialized Form

Field Summary
 java.lang.String javascriptCode
          The actual JavaScript code, that will be executed when the action is performed
 
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
JavaScriptAction()
          Default constructor
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent arg0)
          Executes the JavaScript code
 java.lang.String getJavascriptCode()
          Method that returns the JavaScript code
 void setJavascriptCode(java.lang.String code)
          Method to set the JavaScript code
 
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
 

Field Detail

javascriptCode

public java.lang.String javascriptCode
The actual JavaScript code, that will be executed when the action is performed

Constructor Detail

JavaScriptAction

public JavaScriptAction()
Default constructor

Method Detail

getJavascriptCode

public java.lang.String getJavascriptCode()
Method that returns the JavaScript code


setJavascriptCode

public void setJavascriptCode(java.lang.String code)
Method to set the JavaScript code


actionPerformed

public void actionPerformed(java.awt.event.ActionEvent arg0)
Executes the JavaScript code