public final class RemoveItemCmd extends Command
Constructor and Description |
---|
RemoveItemCmd(DiagramItem item)
Initializes a new RemoveItemCmd instance.
|
Modifier and Type | Method and Description |
---|---|
void |
execute()
Removes the item from the diagram.
|
void |
execute(boolean undoEnabled)
This method is called internally by JDiagram when removing an item.
|
DiagramItem |
getItem()
Gets the item removed 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 RemoveItemCmd(DiagramItem item)
item
- The DiagramItem
removed from the diagram by this command.public void execute()
public void execute(boolean undoEnabled)
public void undo()
UndoManager
when undoing actions.public void redo()
UndoManager
when redoing actions.public DiagramItem getItem()
DiagramItem
-derived object.