public final class AddItemCmd extends Command
Constructor and Description |
---|
AddItemCmd(DiagramItem item)
Initializes a new AddItemCmd instance.
|
Modifier and Type | Method and Description |
---|---|
void |
execute(boolean undoEnabled)
This method is called internally by JDiagram when creating
new items interactively or programmatically.
|
DiagramItem |
getItem()
Gets the item added to the flowchart by this command.
|
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 AddItemCmd(DiagramItem item)
item
- The item that is added to the diagram by this command.public void execute(boolean undoEnabled)
public void undo()
UndoManager
when undoing actions.public void redo()
UndoManager
when redoing actions.public DiagramItem getItem()
DiagramItem
-derived class.