org.tigris.gef.base
Class CmdSequence

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by org.tigris.gef.base.Cmd
          extended by org.tigris.gef.base.CmdSequence
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

public class CmdSequence
extends Cmd

Cmd to execute a sequence of Cmd's. Needs-More-Work: Not done yet. This could be part of a user macro recording feature. Or an easy way for programmers to define new Cmds that are basically sequence of existing Cmds.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.tigris.gef.base.Cmd
_args, _resource
 
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
CmdSequence()
          Construct a new CmdSequence
CmdSequence(Cmd a1, Cmd a2, Cmd a3, java.lang.String name)
           
CmdSequence(Cmd a1, Cmd a2, java.lang.String name)
           
CmdSequence(Cmd a1, java.lang.String name)
           
CmdSequence(java.lang.String name)
           
 
Method Summary
 void add(Cmd a)
           
 java.lang.String dbgString()
           
 void doIt()
          Call the undoIt method of each subCmd.
 void undoIt()
          Call the undoIt method of each subCmd, in reverse order!
 
Methods inherited from class org.tigris.gef.base.Cmd
about, actionPerformed, cmdAtIndex, containsArg, getArg, getArg, getName, getResource, register, registeredCmds, setArg, setName, setResource, shouldBeEnabled, updateEnabled
 
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

CmdSequence

public CmdSequence()
Construct a new CmdSequence


CmdSequence

public CmdSequence(java.lang.String name)

CmdSequence

public CmdSequence(Cmd a1,
                   java.lang.String name)

CmdSequence

public CmdSequence(Cmd a1,
                   Cmd a2,
                   java.lang.String name)

CmdSequence

public CmdSequence(Cmd a1,
                   Cmd a2,
                   Cmd a3,
                   java.lang.String name)
Method Detail

add

public void add(Cmd a)

dbgString

public java.lang.String dbgString()

doIt

public void doIt()
Call the undoIt method of each subCmd.

Specified by:
doIt in class Cmd

undoIt

public void undoIt()
Call the undoIt method of each subCmd, in reverse order!

Specified by:
undoIt in class Cmd