public final class ChangeItemCmd extends Command
Constructor and Description |
---|
ChangeItemCmd(DiagramItem item,
java.lang.String title)
Initializes a new
ChangeItemCmd instance. |
Modifier and Type | Method and Description |
---|---|
void |
execute()
Saves the property changes.
|
void |
execute(boolean undoEnabled)
This method is called internally by JDiagram when saving item properties
for later undo/redo of the property changes.
|
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 ChangeItemCmd(DiagramItem item, java.lang.String title)
ChangeItemCmd
instance.item
- The DiagramItem
whose properties will be changed
through this command.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.