public final class ModifyItemCmd extends Command
| Constructor and Description |
|---|
ModifyItemCmd(DiagramItem item)
Initializes a new instance of the ModifyItemCmd class.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
adopt(Command command)
Merges adjacent commands in the history queue if they are related.
|
void |
execute(boolean undoEnabled)
This method is called internally by JDiagram when saving item position
and size for later undo/redo.
|
DiagramItem |
getItem()
Gets a reference to the modified item.
|
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, getContext, getSubCommands, getTitle, isContainerOf, setTitlepublic ModifyItemCmd(DiagramItem item)
item - The item whose modification is represented by this command.public void execute(boolean undoEnabled)
public void undo()
UndoManager when undoing actions.public void redo()
UndoManager when redoing actions.protected boolean adopt(Command command)
Commandpublic DiagramItem getItem()