com.mindfusion.diagramming
Class CompositeCmd

java.lang.Object
  extended by com.mindfusion.diagramming.Command
      extended by com.mindfusion.diagramming.CompositeCmd

public class CompositeCmd
extends Command

Represents a composite command object that contains other commands.


Constructor Summary
CompositeCmd(Diagram diagram, java.lang.String title)
          Initializes a new CompositeCmd instance.
CompositeCmd(Diagram diagram, java.lang.String title, boolean saveZOrder)
          Initializes a new CompositeCmd instance.
 
Method Summary
 void execute()
          Adds the composite command to the undo/redo history.
 void execute(boolean undoEnabled)
          This method is called internally by JDiagram when performing the action.
 void redo()
          This method is called by the UndoManager when redoing actions.
 void undo()
          This method is called by the UndoManager when undoing actions.
 
Methods inherited from class com.mindfusion.diagramming.Command
addSubCmd, adopt, getContext, getSubCommands, getTitle, isContainerOf, setTitle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeCmd

public CompositeCmd(Diagram diagram,
                    java.lang.String title)
Initializes a new CompositeCmd instance.

Parameters:
diagram - The Diagram upon which this command will be performed.
title - A String containing the command title.

CompositeCmd

public CompositeCmd(Diagram diagram,
                    java.lang.String title,
                    boolean saveZOrder)
Initializes a new CompositeCmd instance.

Parameters:
diagram - The Diagram upon which this command will be performed.
title - A String containing the command title.
Method Detail

execute

public void execute()
Adds the composite command to the undo/redo history.


execute

public void execute(boolean undoEnabled)
This method is called internally by JDiagram when performing the action.

Specified by:
execute in class Command
Parameters:
undoEnabled - true if the undo manager is enabled at this time, otherwise false.

undo

public void undo()
This method is called by the UndoManager when undoing actions.

Overrides:
undo in class Command

redo

public void redo()
This method is called by the UndoManager when redoing actions.

Overrides:
redo in class Command