Packagecom.yworks.graph.model
Interfacepublic interface IGraphUndoUnitSupport

Support interface that is used by DefaultGraph to create the IUndoUnits for structural graph changes.

An implementation of this interface can be found in DefaultGraph's ILookup.lookup. If the undoability mechanism needs customization, client code can wrap the existing support instance and do the necessary adjustments.

See also

com.yworks.graph.model.DefaultGraph.undoEngineEnabled
ILookupDecorator
IUndoUnit


Public Methods
 MethodDefined By
  
Creates the bend creation UndoUnit for the given bend.
IGraphUndoUnitSupport
  
Creates the label creation UndoUnit for the given label.
IGraphUndoUnitSupport
  
Creates the port creation UndoUnit for the given port.
IGraphUndoUnitSupport
  
Creates the change ports UndoUnit for the given edge.
IGraphUndoUnitSupport
  
Creates the edge creation UndoUnit for the given edge.
IGraphUndoUnitSupport
  
Creates the node creation UndoUnit for the given node.
IGraphUndoUnitSupport
  
Creates the bend removal UndoUnit for the given bend.
IGraphUndoUnitSupport
  
Creates the edge removal UndoUnit for the given edge.
IGraphUndoUnitSupport
  
Creates the label removal UndoUnit for the given label.
IGraphUndoUnitSupport
  
Creates the node removal UndoUnit for the given node.
IGraphUndoUnitSupport
Method Detail
createAddBendUndoUnit()method
public function createAddBendUndoUnit(bend:IBend, index:int):IUndoUnit

Creates the bend creation UndoUnit for the given bend.

Parameters

bend:IBend — The bend that has been created.
 
index:int — The index at which the bend has been added.

Returns
IUndoUnit — The unit that can be used to undo and redo the creation.
createAddLabelUndoUnit()method 
public function createAddLabelUndoUnit(label:ILabel):IUndoUnit

Creates the label creation UndoUnit for the given label.

Parameters

label:ILabel — The label that has been created.

Returns
IUndoUnit — The unit that can be used to undo and redo the creation.
createAddPortUndoUnit()method 
public function createAddPortUndoUnit(port:IPort):IUndoUnit

Creates the port creation UndoUnit for the given port.

Parameters

port:IPort — The port that has been created.

Returns
IUndoUnit — The unit that can be used to undo and redo the creation.
createChangePortsUndoUnit()method 
public function createChangePortsUndoUnit(edge:IEdge, oldSource:IPort, oldTarget:IPort):IUndoUnit

Creates the change ports UndoUnit for the given edge.

Parameters

edge:IEdge — The edge that has been reconnected to other ports.
 
oldSource:IPort — The old source port the edge connected to before the change.
 
oldTarget:IPort — The old target port the edge connected to before the change.

Returns
IUndoUnit — The unit that can be used to undo and redo the port change operation.
createCreateEdgeUndoUnit()method 
public function createCreateEdgeUndoUnit(edge:IEdge):IUndoUnit

Creates the edge creation UndoUnit for the given edge.

Parameters

edge:IEdge — The edge that has been created.

Returns
IUndoUnit — The unit that can be used to undo and redo the creation.
createCreateNodeUndoUnit()method 
public function createCreateNodeUndoUnit(node:INode):IUndoUnit

Creates the node creation UndoUnit for the given node.

Parameters

node:INode — The node that has been created.

Returns
IUndoUnit — The unit that can be used to undo and redo the creation.
createRemoveBendUndoUnit()method 
public function createRemoveBendUndoUnit(bend:IBend):IUndoUnit

Creates the bend removal UndoUnit for the given bend.

Parameters

bend:IBend — The bend that will be removed.

Returns
IUndoUnit — The unit that can be used to undo and redo the removal.
createRemoveEdgeUndoUnit()method 
public function createRemoveEdgeUndoUnit(edge:IEdge):IUndoUnit

Creates the edge removal UndoUnit for the given edge.

Parameters

edge:IEdge — The edge that will be removed.

Returns
IUndoUnit — The unit that can be used to undo and redo the removal.
createRemoveLabelUndoUnit()method 
public function createRemoveLabelUndoUnit(label:ILabel):IUndoUnit

Creates the label removal UndoUnit for the given label.

Parameters

label:ILabel — The label that will be removed.

Returns
IUndoUnit — The unit that can be used to undo and redo the removal.
createRemoveNodeUndoUnit()method 
public function createRemoveNodeUndoUnit(node:INode):IUndoUnit

Creates the node removal UndoUnit for the given node.

Parameters

node:INode — The node that will be removed.

Returns
IUndoUnit — The unit that can be used to undo and redo the removal.