|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.mindfusion.diagramming.Command com.mindfusion.diagramming.ModifyItemCmd
public final class ModifyItemCmd
Represents an action that changes the size or position of a diagram item.
Constructor Summary | |
---|---|
ModifyItemCmd(DiagramItem item)
Initializes a new instance of the ModifyItemCmd class. |
Method Summary | |
---|---|
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. |
Methods inherited from class com.mindfusion.diagramming.Command |
---|
addSubCmd, getContext, getSubCommands, getTitle, isContainerOf, setTitle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ModifyItemCmd(DiagramItem item)
item
- The item whose modification is represented by this command.Method Detail |
---|
public void execute(boolean undoEnabled)
execute
in class Command
undoEnabled
- true
if the undo manager is enabled
at this time, otherwise false
.public void undo()
UndoManager
when undoing actions.
undo
in class Command
public void redo()
UndoManager
when redoing actions.
redo
in class Command
protected boolean adopt(Command command)
Command
adopt
in class Command
command
- The Command that might be adopted by this command.
public DiagramItem getItem()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |