artisynth.core.gui.editorManager
Class AddComponentsCommand

java.lang.Object
  extended by artisynth.core.gui.editorManager.AddComponentsCommand
All Implemented Interfaces:
Command

public class AddComponentsCommand
extends java.lang.Object
implements Command


Constructor Summary
AddComponentsCommand(java.lang.String name, java.util.LinkedList<? extends ModelComponent> comps, MutableCompositeComponent<?> parent)
           
AddComponentsCommand(java.lang.String name, java.util.LinkedList<ModelComponent> comps, java.util.LinkedList<MutableCompositeComponent<?>> parents)
           
AddComponentsCommand(java.lang.String name, ModelComponent comp, MutableCompositeComponent<?> parent)
           
 
Method Summary
 void execute()
          Executes this command.
 java.util.LinkedList<ModelComponent> getComponents()
          Returns the components added by this command.
 java.lang.String getName()
          Gets the name associated with this command.
 void undo()
          Undoes the result of executing this command.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AddComponentsCommand

public AddComponentsCommand(java.lang.String name,
                            java.util.LinkedList<ModelComponent> comps,
                            java.util.LinkedList<MutableCompositeComponent<?>> parents)

AddComponentsCommand

public AddComponentsCommand(java.lang.String name,
                            java.util.LinkedList<? extends ModelComponent> comps,
                            MutableCompositeComponent<?> parent)

AddComponentsCommand

public AddComponentsCommand(java.lang.String name,
                            ModelComponent comp,
                            MutableCompositeComponent<?> parent)
Method Detail

execute

public void execute()
Description copied from interface: Command
Executes this command.

Specified by:
execute in interface Command

undo

public void undo()
Description copied from interface: Command
Undoes the result of executing this command.

Specified by:
undo in interface Command

getName

public java.lang.String getName()
Description copied from interface: Command
Gets the name associated with this command. This name will be used in creating entries in the undo menu.

Specified by:
getName in interface Command
Returns:
name associated with this command

getComponents

public java.util.LinkedList<ModelComponent> getComponents()
Returns the components added by this command.

Returns:
added components (read-only)