public final class ExpandItemCmd extends Command
Constructor and Description |
---|
ExpandItemCmd(DiagramItem item)
Initializes a new
ExpandItemCmd instance. |
Modifier and Type | Method and Description |
---|---|
void |
execute(boolean undoEnabled)
This method is called internally by JDiagram when performing the action.
|
DiagramItem |
getItem()
Gets the root of the tree branch related to 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 ExpandItemCmd(DiagramItem item)
ExpandItemCmd
instance.item
- The DiagramItem
that will be expanded or collapsed
through 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 object.