cage.viewer.jmol
Class ViewAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by cage.viewer.jmol.JmolAction
          extended by cage.viewer.jmol.ViewAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

public class ViewAction
extends JmolAction

Action that allows to change the view of a given JmolViewer.

See Also:
Serialized Form

Field Summary
static java.lang.String BACK
           
static java.lang.String BOTTOM
           
static java.lang.String FRONT
           
static java.lang.String LEFT
           
static java.lang.String RIGHT
           
static java.lang.String TOP
           
 
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
ViewAction(java.lang.String name, org.jmol.api.JmolViewer viewer, java.lang.String view)
          Creates a ViewAction that changes the given JmolViewer to the given view.
 
Method Summary
 java.lang.String getCommand()
           
 
Methods inherited from class cage.viewer.jmol.JmolAction
actionPerformed, getViewer, setViewer
 
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

FRONT

public static final java.lang.String FRONT
See Also:
Constant Field Values

LEFT

public static final java.lang.String LEFT
See Also:
Constant Field Values

RIGHT

public static final java.lang.String RIGHT
See Also:
Constant Field Values

TOP

public static final java.lang.String TOP
See Also:
Constant Field Values

BOTTOM

public static final java.lang.String BOTTOM
See Also:
Constant Field Values

BACK

public static final java.lang.String BACK
See Also:
Constant Field Values
Constructor Detail

ViewAction

public ViewAction(java.lang.String name,
                  org.jmol.api.JmolViewer viewer,
                  java.lang.String view)
Creates a ViewAction that changes the given JmolViewer to the given view. It is adviced to pass in one of the constants defined in this class as view.

Parameters:
name - The name for this action
viewer - The viewer to which this action applies
view - The view that is to be shown
Method Detail

getCommand

public java.lang.String getCommand()
Specified by:
getCommand in class JmolAction