public class CompositeCmd extends Command
Constructor and Description |
---|
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. |
Modifier and Type | Method and Description |
---|---|
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. |
addSubCmd, adopt, getContext, getSubCommands, getTitle, isContainerOf, setTitle
public CompositeCmd(Diagram diagram, java.lang.String title)
CompositeCmd
instance.diagram
- The Diagram
upon which this command
will be performed.title
- A String
containing the command title.public void execute()
public void execute(boolean undoEnabled)
public void undo()
UndoManager
when undoing actions.public void redo()
UndoManager
when redoing actions.