com.mindfusion.diagramming
Class ChangeItemCmd

java.lang.Object
  extended by com.mindfusion.diagramming.Command
      extended by com.mindfusion.diagramming.ChangeItemCmd

public final class ChangeItemCmd
extends Command

AdjustmentHandles undo / redo of property changes.


Constructor Summary
ChangeItemCmd(DiagramItem item, java.lang.String title)
          Initializes a new ChangeItemCmd instance.
 
Method Summary
 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.
 
Methods inherited from class com.mindfusion.diagramming.Command
addSubCmd, adopt, 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

ChangeItemCmd

public ChangeItemCmd(DiagramItem item,
                     java.lang.String title)
Initializes a new ChangeItemCmd instance.

Parameters:
item - The DiagramItem whose properties will be changed through this command.
title - A String containing the command title.
Method Detail

execute

public void execute()
Saves the property changes.


execute

public void execute(boolean undoEnabled)
This method is called internally by JDiagram when saving item properties for later undo/redo of the property changes.

Specified by:
execute in class Command
Parameters:
undoEnabled - true if the undo manager is enabled at this time, otherwise false.

undo

public void undo()
This method is called by the UndoManager when undoing actions.

Overrides:
undo in class Command

redo

public void redo()
This method is called by the UndoManager when redoing actions.

Overrides:
redo in class Command