Packagecom.yworks.graph.model
Classpublic class AbstractGraphWrapper
InheritanceAbstractGraphWrapper Inheritance flash.events.EventDispatcher
Implements IGraph
Subclasses FilteredGraphWrapper

An abstract IGraph implementation that delegates all of its work to an existing implementation.

Subclasses can override all of the methods to customize the behavior of this instance. Note that this instance will register listeners with the wrapped graph instance, so dispose() should be called if this instance is not used any more.

See also

dispose()


Public Properties
 PropertyDefined By
  bends : ICollectionModel
[read-only] A collection view over the bends of the edges contained in this graph.
AbstractGraphWrapper
  collectionModel : ICollectionModel
[read-only] Offers a view over all elements that make up the graph.
AbstractGraphWrapper
  defaultEdgeLabelModelParameter : ILabelModelParameter
Gets or sets the default ILabelModelParameter that will be used for newly created edge labels if no other parameter is specified.
AbstractGraphWrapper
  defaultEdgeLabelStyle : ILabelStyle
Gets or sets the default ILabelStyle that will be used for newly created edge labels if no other style is specified.
AbstractGraphWrapper
  defaultEdgeStyle : IEdgeStyle
Gets or sets the default IEdgeStyle that will be used for newly created edges if no other style is specified.
AbstractGraphWrapper
  defaultNodeLabelModelParameter : ILabelModelParameter
Gets or sets the default ILabelModelParameter that will be used for newly created node labels if no other parameter is specified.
AbstractGraphWrapper
  defaultNodeLabelStyle : ILabelStyle
Gets or sets the default ILabelStyle that will be used for newly created node labels if no other style is specified.
AbstractGraphWrapper
  defaultNodePortModelParameter : IPortLocationModelParameter
Gets or sets the default IPortLocationModelParameter that will be used for newly created node ports if no other parameter is specified.
AbstractGraphWrapper
  defaultNodeSize : ISize
Gets or sets the default node size.
AbstractGraphWrapper
  defaultNodeStyle : INodeStyle
Gets or sets the default INodeStyle that will be used for newly created nodes if no other style is specified.
AbstractGraphWrapper
  defaultPortStyle : IPortStyle
Gets or sets the default IPortStyle that will be used for newly created ports if no other style is specified.
AbstractGraphWrapper
  edgeLabels : ICollectionModel
[read-only] A collection view over the labels attached to edges contained in this graph.
AbstractGraphWrapper
  edges : ICollectionModel
[read-only] A collection view over the edges contained in this graph.
AbstractGraphWrapper
  mapperRegistry : IMapperRegistry
[read-only] A registry that can be used to store and retrieve arbitrary information for items in this graph.
AbstractGraphWrapper
  nodeLabels : ICollectionModel
[read-only] A collection view over the labels attached to nodes contained in this graph.
AbstractGraphWrapper
  nodes : ICollectionModel
[read-only] A collection view over the nodes contained in this graph.
AbstractGraphWrapper
  ports : ICollectionModel
[read-only] A collection view over the ports contained in this graph.
AbstractGraphWrapper
Protected Properties
 PropertyDefined By
  graph : IGraph
The wrapped graph instance.
AbstractGraphWrapper
Public Methods
 MethodDefined By
  
Creates a new instance that wraps a given IGraph.
AbstractGraphWrapper
  
addBend(edge:IEdge, index:int, x:Number, y:Number):IBend
Adds a bend at the given index to the given edge using the coordinates provided.
AbstractGraphWrapper
  
addLabel(item:ILabeledItem, text:String, labelModelParameter:ILabelModelParameter = null, style:ILabelStyle = null):ILabel
Add a label to the given item using the text as the initial label text and label model parameter and style.
AbstractGraphWrapper
  
addPort(portOwner:IPortOwner, x:Number, y:Number):IPort
Add a port to the given port owner using the coordinates as the new initial position of the port anchor.
AbstractGraphWrapper
  
Add a port to the given port owner using the model parameter to determine the coordinates of the port.
AbstractGraphWrapper
  
clear():void
Clears this instance, removing all entities in proper order.
AbstractGraphWrapper
  
clearBends(edge:IEdge):void
Removes all bends from the given edge.
AbstractGraphWrapper
  
contains(item:IModelItem):Boolean
Determines whether this instance contains the given element.
AbstractGraphWrapper
  
createEdge(sourcePort:IPort, targetPort:IPort, style:IEdgeStyle = null):IEdge
Creates and returns an edge that connects to the given port instances.
AbstractGraphWrapper
  
createEdgeBetweenNodes(sourceNode:INode, targetNode:INode, style:IEdgeStyle = null):IEdge
Convenience method that creates and returns an edge that connects to the given node instances using the given style instance.
AbstractGraphWrapper
  
createNode(bounds:IRectangle = null, style:INodeStyle = null):INode
Creates and returns a node using default values for the style and the specified initial geometry.
AbstractGraphWrapper
  
createNodeAt(x:Number, y:Number):INode
Creates and returns a node using default values for the style and the specified initial geometry.
AbstractGraphWrapper
  
dispose():void
Disposes this instance.
AbstractGraphWrapper
  
Returns an Iterable for all edges that are adjacent to the given port as a IEdge.sourcePort or IEdge.targetPort.
AbstractGraphWrapper
  
Returns an Iterable for all edges that have the given port owner as their IEdge.targetPort's or IEdge.sourcePort's.
AbstractGraphWrapper
  
Gets the lookup instance to use in lookup()
AbstractGraphWrapper
  
Causes the displaysInvalidated event to be triggered.
AbstractGraphWrapper
  
lookup(type:Class):Object
Returns an instance that implements the given type or null.
AbstractGraphWrapper
  
removeBend(bend:IBend):void
Removes the given bend instance from its edge.
AbstractGraphWrapper
  
removeEdge(edge:IEdge):void
Removes the given edge instance from this graph.
AbstractGraphWrapper
  
removeLabel(label:ILabel):void
Removes the given label from its owner.
AbstractGraphWrapper
  
removeNode(node:INode):void
Removes the given node instance from this graph.
AbstractGraphWrapper
  
removePort(port:IPort):void
Removes the port from its owner.
AbstractGraphWrapper
  
setBendLocation(bend:IBend, x:Number, y:Number):void
Modifies the location of the given bend.
AbstractGraphWrapper
  
setBounds(node:INode, x:Number, y:Number, width:Number, height:Number):void
Sets the bounds of the given node to the new values.
AbstractGraphWrapper
  
setEdgeStyle(edge:IEdge, style:IEdgeStyle):void
Assigns the given style instance by reference to the edge.
AbstractGraphWrapper
  
Sets the label model parameter for the given label.
AbstractGraphWrapper
  
setLabelStyle(label:ILabel, style:ILabelStyle):void
Assigns the given style instance by reference to the label.
AbstractGraphWrapper
  
setLabelText(label:ILabel, text:String):void
Sets the label text of the given label.
AbstractGraphWrapper
  
setLookup(newLookup:ILookup):void
Sets the lookup instance to use in lookup()
AbstractGraphWrapper
  
setNodeStyle(node:INode, style:INodeStyle):void
Assigns the given style instance by reference to the node.
AbstractGraphWrapper
  
setPortLocation(port:IPort, x:Number, y:Number):void
Sets the coordinates of the given port to the given values.
AbstractGraphWrapper
  
Sets the location model parameter of the given port to the given value.
AbstractGraphWrapper
  
setPorts(edge:IEdge, sourcePort:IPort, targetPort:IPort):void
Sets the ports of the given edge to the new values.
AbstractGraphWrapper
  
setPortStyle(port:IPort, style:IPortStyle):void
Assigns the given style instance by reference to the port.
AbstractGraphWrapper
  
setPreferredSize(label:ILabel, width:Number, height:Number):void
Sets the preferred size of the label.
AbstractGraphWrapper
Protected Methods
 MethodDefined By
  
Adds event handlers that propagate graph events from the provided graph to listeners on this instance.
AbstractGraphWrapper
  
Dispatches the GraphEvent.
AbstractGraphWrapper
  
Dispatches the GraphEvent.
AbstractGraphWrapper
  
Dispatches the GraphEvent.
AbstractGraphWrapper
  
Dispatches the GraphEvent.
AbstractGraphWrapper
  
Dispatches the GraphEvent.
AbstractGraphWrapper
  
Dispatches the GraphEvent.
AbstractGraphWrapper
  
Dispatches the InvalidateEvent.
AbstractGraphWrapper
  
Dispatches the GraphEvent.
AbstractGraphWrapper
  
Dispatches the GraphEvent.
AbstractGraphWrapper
  
Dispatches the GraphEvent.
AbstractGraphWrapper
  
Dispatches the GraphEvent.
AbstractGraphWrapper
  
Dispatches the GraphEvent.
AbstractGraphWrapper
  
Dispatches the GraphEvent.
AbstractGraphWrapper
  
Dispatches the GraphEvent.
AbstractGraphWrapper
  
Dispatches the GraphEvent.
AbstractGraphWrapper
  
Dispatches the GraphEvent.
AbstractGraphWrapper
  
Removes event handlers for the given graph that have been added with addEventHandlers.
AbstractGraphWrapper
Property Detail
bendsproperty
bends:ICollectionModel  [read-only]

A collection view over the bends of the edges contained in this graph.

This is a readonly live view of the entities, i.e. the same reference will be returned for each invocation, that always represents the current state of the graph.


Implementation
    public function get bends():ICollectionModel
collectionModelproperty 
collectionModel:ICollectionModel  [read-only]

Offers a view over all elements that make up the graph. This is a combined view of all nodes, edges, labels, ports, and bends.


Implementation
    public function get collectionModel():ICollectionModel
defaultEdgeLabelModelParameterproperty 
defaultEdgeLabelModelParameter:ILabelModelParameter

Gets or sets the default ILabelModelParameter that will be used for newly created edge labels if no other parameter is specified.

It is up to the implementation to decide whether to assign a clone of the current parameter to newly created elements or whether the instance will be shared.


Implementation
    public function get defaultEdgeLabelModelParameter():ILabelModelParameter
    public function set defaultEdgeLabelModelParameter(value:ILabelModelParameter):void
defaultEdgeLabelStyleproperty 
defaultEdgeLabelStyle:ILabelStyle

Gets or sets the default ILabelStyle that will be used for newly created edge labels if no other style is specified.

It is up to the implementation to decide whether to assign a clone of the current style to newly created elements or whether the style instance will be shared.


Implementation
    public function get defaultEdgeLabelStyle():ILabelStyle
    public function set defaultEdgeLabelStyle(value:ILabelStyle):void
defaultEdgeStyleproperty 
defaultEdgeStyle:IEdgeStyle

Gets or sets the default IEdgeStyle that will be used for newly created edges if no other style is specified.

It is up to the implementation to decide whether to assign a clone of the current style to newly created elements or whether the style instance will be shared.


Implementation
    public function get defaultEdgeStyle():IEdgeStyle
    public function set defaultEdgeStyle(value:IEdgeStyle):void
defaultNodeLabelModelParameterproperty 
defaultNodeLabelModelParameter:ILabelModelParameter

Gets or sets the default ILabelModelParameter that will be used for newly created node labels if no other parameter is specified.

It is up to the implementation to decide whether to assign a clone of the current parameter to newly created elements or whether the instance will be shared.


Implementation
    public function get defaultNodeLabelModelParameter():ILabelModelParameter
    public function set defaultNodeLabelModelParameter(value:ILabelModelParameter):void
defaultNodeLabelStyleproperty 
defaultNodeLabelStyle:ILabelStyle

Gets or sets the default ILabelStyle that will be used for newly created node labels if no other style is specified.

It is up to the implementation to decide whether to assign a clone of the current style to newly created elements or whether the style instance will be shared.


Implementation
    public function get defaultNodeLabelStyle():ILabelStyle
    public function set defaultNodeLabelStyle(value:ILabelStyle):void
defaultNodePortModelParameterproperty 
defaultNodePortModelParameter:IPortLocationModelParameter

Gets or sets the default IPortLocationModelParameter that will be used for newly created node ports if no other parameter is specified.

It is up to the implementation to decide whether to assign a clone of the current parameter to newly created elements or whether the instance will be shared.


Implementation
    public function get defaultNodePortModelParameter():IPortLocationModelParameter
    public function set defaultNodePortModelParameter(value:IPortLocationModelParameter):void
defaultNodeSizeproperty 
defaultNodeSize:ISize

Gets or sets the default node size.

The values of this size will be used by the createNode and createNodeAt methods.


Implementation
    public function get defaultNodeSize():ISize
    public function set defaultNodeSize(value:ISize):void
defaultNodeStyleproperty 
defaultNodeStyle:INodeStyle

Gets or sets the default INodeStyle that will be used for newly created nodes if no other style is specified.

It is up to the implementation to decide whether to assign a clone of the current style to newly created elements or whether the style instance will be shared.


Implementation
    public function get defaultNodeStyle():INodeStyle
    public function set defaultNodeStyle(value:INodeStyle):void
defaultPortStyleproperty 
defaultPortStyle:IPortStyle

Gets or sets the default IPortStyle that will be used for newly created ports if no other style is specified.

It is up to the implementation to decide whether to assign a clone of the current style to newly created elements or whether the style instance will be shared.


Implementation
    public function get defaultPortStyle():IPortStyle
    public function set defaultPortStyle(value:IPortStyle):void
edgeLabelsproperty 
edgeLabels:ICollectionModel  [read-only]

A collection view over the labels attached to edges contained in this graph.

This is a readonly live view of the entities, i.e. the same reference will be returned for each invocation, that always represents the current state if the graph.


Implementation
    public function get edgeLabels():ICollectionModel
edgesproperty 
edges:ICollectionModel  [read-only]

A collection view over the edges contained in this graph.

This is a readonly live view of the entities, i.e. the same reference will be returned for each invocation, that always represents the current state of the graph.


Implementation
    public function get edges():ICollectionModel
graphproperty 
graph:IGraph

The wrapped graph instance.


Implementation
    protected function get graph():IGraph
    protected function set graph(value:IGraph):void
mapperRegistryproperty 
mapperRegistry:IMapperRegistry  [read-only]

A registry that can be used to store and retrieve arbitrary information for items in this graph.


Implementation
    public function get mapperRegistry():IMapperRegistry
nodeLabelsproperty 
nodeLabels:ICollectionModel  [read-only]

A collection view over the labels attached to nodes contained in this graph.

This is a readonly live view of the entities, i.e. the same reference will be returned for each invocation, that always represents the current state if the graph.


Implementation
    public function get nodeLabels():ICollectionModel
nodesproperty 
nodes:ICollectionModel  [read-only]

A collection view over the nodes contained in this graph.

This is a readonly live view of the nodes, i.e. the same reference will be returned for each invocation, that always represents the current state of the graph.


Implementation
    public function get nodes():ICollectionModel
portsproperty 
ports:ICollectionModel  [read-only]

A collection view over the ports contained in this graph.

This is a readonly live view of the entities, i.e. the same reference will be returned for each invocation, that always represents the current state of the graph.


Implementation
    public function get ports():ICollectionModel
Constructor Detail
AbstractGraphWrapper()Constructor
public function AbstractGraphWrapper(graph:IGraph)

Creates a new instance that wraps a given IGraph.

Note that this instance will register listeners with the wrapped graph instance, so dispose() should be called if this instance is not used any more.

Parameters
graph:IGraph — The graph to wrap.

See also

Method Detail
addBend()method
public function addBend(edge:IEdge, index:int, x:Number, y:Number):IBend

Adds a bend at the given index to the given edge using the coordinates provided. The added instance will be returned.

Parameters

edge:IEdge — The edge to which the bend will be added.
 
index:int — The index for the newly added bend.
 
x:Number — The x-coordinate to use for the newly created bend.
 
y:Number — The y-coordinate to use for the newly created bend.

Returns
IBend — A newly created live bend.
addEventListeners()method 
protected function addEventListeners(graph:IGraph):void

Adds event handlers that propagate graph events from the provided graph to listeners on this instance.

Parameters

graph:IGraph — The graph for which event propagators should be created

addLabel()method 
public function addLabel(item:ILabeledItem, text:String, labelModelParameter:ILabelModelParameter = null, style:ILabelStyle = null):ILabel

Add a label to the given item using the text as the initial label text and label model parameter and style.

Parameters

item:ILabeledItem — The item to add the label to.
 
text:String — The initial text of the label
 
labelModelParameter:ILabelModelParameter (default = null) — The label model parameter instance to use. If null, default label model parameters will be used.
 
style:ILabelStyle (default = null) — The style to use for the label. If null a default label style will be used.

Returns
ILabel — The newly created label.
addPort()method 
public function addPort(portOwner:IPortOwner, x:Number, y:Number):IPort

Add a port to the given port owner using the coordinates as the new initial position of the port anchor.

Depending on the implementation this method may throw an IllegalOperationError if the type of the portOwner instance does not support adding of ports. If the port owner is an INode a new IPortLocationModelParameter is created using the model of the defaultNodePortLocationModelParameter and the specified coordinates. This will trigger the nodeChanged or edgeChanged event correspondingly.

Parameters

portOwner:IPortOwner — The owner to add the port instance to.
 
x:Number — the new absolute x coordinate in the world coordinate system.
 
y:Number — the new absolute y coordinate in the world coordinate system.

Returns
IPort — the newly created port
addPortWithParameter()method 
public function addPortWithParameter(portOwner:IPortOwner, modelParameter:IPortLocationModelParameter):IPort

Add a port to the given port owner using the model parameter to determine the coordinates of the port.

Depending on the implementation this method may throw an IllegalOperationError if the type of the portOwner instance does not support adding of ports. This will trigger the nodeChanged or edgeChanged event correspondingly.

Parameters

portOwner:IPortOwner — The owner to add the port instance to.
 
modelParameter:IPortLocationModelParameter — The model parameter to determine the location of the port.

Returns
IPort — the newly created port
clear()method 
public function clear():void

Clears this instance, removing all entities in proper order.

clearBends()method 
public function clearBends(edge:IEdge):void

Removes all bends from the given edge.

The edge must be part of this graph at the time of the incovation. This will trigger the corresponding events.

Parameters

edge:IEdge — The edge whose bends will be removed.

contains()method 
public function contains(item:IModelItem):Boolean

Determines whether this instance contains the given element.

Parameters

item:IModelItem — the element.

Returns
Booleantrue if this instance contains the element.
createEdge()method 
public function createEdge(sourcePort:IPort, targetPort:IPort, style:IEdgeStyle = null):IEdge

Creates and returns an edge that connects to the given port instances.

The ports must be part of this graph at the time of the invocation. The edge will be a part of this graph after the method returns. This will trigger the corresponding events.

Parameters

sourcePort:IPort — The source port the created edge will connect to.
 
targetPort:IPort — The target port the created edge will connect to.
 
style:IEdgeStyle (default = null) — The style instance that will be assigned to the newly created instance. If null, a default style will be used.

Returns
IEdge — A newly created edge instance
createEdgeBetweenNodes()method 
public function createEdgeBetweenNodes(sourceNode:INode, targetNode:INode, style:IEdgeStyle = null):IEdge

Convenience method that creates and returns an edge that connects to the given node instances using the given style instance.

The nodes must be part of this graph at the time of the invocation, and the implementation will choose the instances to which the edge will be connected. The edge will be a part of this graph after the method returns. This will trigger the corresponding events.

Parameters

sourceNode:INode — The source node the created edge will connect to. It is up to the implementation to decide which port to use at the given node. The implementation may create a new port of the edge.
 
targetNode:INode — he target node the created edge will connect to. It is up to the implementation to decide which port to use at the given node. The implementation may create a new port of the edge.
 
style:IEdgeStyle (default = null) — The style instance that will be assigned to the newly created instance. If null, a default style will be used.

Returns
IEdge — the newly created edge instance
createNode()method 
public function createNode(bounds:IRectangle = null, style:INodeStyle = null):INode

Creates and returns a node using default values for the style and the specified initial geometry.

The node will be a part of this graph after the method returns. This will trigger the corresponding events.

Parameters

bounds:IRectangle (default = null) — The bounds to use initially. If null, some default bounds will be used.
 
style:INodeStyle (default = null) — The style instance that will be assigned to the newly created instance. If null, a default style will be used.

Returns
INode — A newly created node instance
createNodeAt()method 
public function createNodeAt(x:Number, y:Number):INode

Creates and returns a node using default values for the style and the specified initial geometry.

The node will be a part of this graph after the method returns. This will trigger the corresponding events.

Parameters

x:Number — the initial x coordinate of the center of the node's layout field
 
y:Number — the initial y coordinate of the center of the node's layout field

Returns
INode — A newly created node instance
dispose()method 
public function dispose():void

Disposes this instance.

edgesAtPort()method 
public function edgesAtPort(port:IPort):Iterable

Returns an Iterable for all edges that are adjacent to the given port as a IEdge.sourcePort or IEdge.targetPort.

Parameters

port:IPort — The port to check.

Returns
Iterable — An iterable of all adjacent edges.
edgesAtPortOwner()method 
public function edgesAtPortOwner(portOwner:IPortOwner):Iterable

Returns an Iterable for all edges that have the given port owner as their IEdge.targetPort's or IEdge.sourcePort's.

Parameters

portOwner:IPortOwner — The port owner to check

Returns
Iterable — Iterable of all adjacent edges
getLookup()method 
public function getLookup():ILookup

Gets the lookup instance to use in lookup()

Returns
ILookup

See also

invalidateDisplays()method 
public function invalidateDisplays():void

Causes the displaysInvalidated event to be triggered.

This method may be called by client code to invalidate all views of the graph that have registerd with the displaysInvalidated event. Views that need to be informed if non-structural changes have been made to the graph should register with the corresponding event.

lookup()method 
public function lookup(type:Class):Object

Returns an instance that implements the given type or null.

Typically, this method will be called in order to obtain a different view or aspect of the current instance. This is quite similar to casting or using a super type or interface of this instance, but is not limited to inheritance or compile time constraints. An instance implementing this method is not required to return non-null implementations for the types, nor does it have to return the same instance any time. Also it depends on the type and context whether the instance returned stays up to date or needs to be reobtained for subsequent use.

Parameters

type:Class — the type for which an instance shall be returned

Returns
Object — an instance that is assignable to type or null
onBendAdded()method 
protected function onBendAdded(evt:GraphEvent):void

Dispatches the GraphEvent.

Parameters

evt:GraphEvent — The GraphEvent

onBendChanged()method 
protected function onBendChanged(evt:GraphEvent):void

Dispatches the GraphEvent.

Parameters

evt:GraphEvent — The GraphEvent

onBendRemoved()method 
protected function onBendRemoved(evt:GraphEvent):void

Dispatches the GraphEvent.

Parameters

evt:GraphEvent — The GraphEvent

onEdgeChanged()method 
protected function onEdgeChanged(evt:GraphEvent):void

Dispatches the GraphEvent.

Parameters

evt:GraphEvent — The GraphEvent

onEdgeCreated()method 
protected function onEdgeCreated(evt:GraphEvent):void

Dispatches the GraphEvent.

Parameters

evt:GraphEvent — The GraphEvent

onEdgeRemoved()method 
protected function onEdgeRemoved(evt:GraphEvent):void

Dispatches the GraphEvent.

Parameters

evt:GraphEvent — The GraphEvent

onInvalidateDisplays()method 
protected function onInvalidateDisplays(evt:InvalidateEvent):void

Dispatches the InvalidateEvent.

Parameters

evt:InvalidateEvent — The InvalidateEvent

onLabelAdded()method 
protected function onLabelAdded(evt:GraphEvent):void

Dispatches the GraphEvent.

Parameters

evt:GraphEvent — The GraphEvent

onLabelChanged()method 
protected function onLabelChanged(evt:GraphEvent):void

Dispatches the GraphEvent.

Parameters

evt:GraphEvent — The GraphEvent

onLabelRemoved()method 
protected function onLabelRemoved(evt:GraphEvent):void

Dispatches the GraphEvent.

Parameters

evt:GraphEvent — The GraphEvent

onNodeChanged()method 
protected function onNodeChanged(evt:GraphEvent):void

Dispatches the GraphEvent.

Parameters

evt:GraphEvent — The GraphEvent

onNodeCreated()method 
protected function onNodeCreated(evt:GraphEvent):void

Dispatches the GraphEvent.

Parameters

evt:GraphEvent — The GraphEvent

onNodeRemoved()method 
protected function onNodeRemoved(evt:GraphEvent):void

Dispatches the GraphEvent.

Parameters

evt:GraphEvent — The GraphEvent

onPortAdded()method 
protected function onPortAdded(evt:GraphEvent):void

Dispatches the GraphEvent.

Parameters

evt:GraphEvent — The GraphEvent

onPortChanged()method 
protected function onPortChanged(evt:GraphEvent):void

Dispatches the GraphEvent.

Parameters

evt:GraphEvent — The GraphEvent

onPortRemoved()method 
protected function onPortRemoved(evt:GraphEvent):void

Dispatches the GraphEvent.

Parameters

evt:GraphEvent — The GraphEvent

removeBend()method 
public function removeBend(bend:IBend):void

Removes the given bend instance from its edge.

The edge must be part of this graph at the time of the incovation. This will trigger the corresponding events.

Parameters

bend:IBend — The bend to remove.

removeEdge()method 
public function removeEdge(edge:IEdge):void

Removes the given edge instance from this graph.

The edge must be a part of this graph. This will trigger the corresponding event. The implementation may decide to remove the corresponding ports from the node if no other edge connects to them after the given edge has been removed. Also this will trigger the removal of all labels and bends owned by this instance.

Parameters

edge:IEdge — The live edge to be removed from this graph instance

removeEventListeners()method 
protected function removeEventListeners(graph:IGraph):void

Removes event handlers for the given graph that have been added with addEventHandlers.

Parameters

graph:IGraph — The graph for which event propagators should be removed

removeLabel()method 
public function removeLabel(label:ILabel):void

Removes the given label from its owner.

This will trigger the corresponding event.

Parameters

label:ILabel — The label to be removed.

removeNode()method 
public function removeNode(node:INode):void

Removes the given node instance from this graph.

The node must be a part of this graph. This will trigger the corresponding event. This method will remove all adjacent edges and their corresponding ports in proper order before the node will be removed. Also this will trigger the removal of all labels owned by this instance.

Parameters

node:INode — The live node to be removed from this graph instance

removePort()method 
public function removePort(port:IPort):void

Removes the port from its owner.

The port must be part of this graph at the time of invocation. This will trigger the corresponding GraphEvents.

Parameters

port:IPort

setBendLocation()method 
public function setBendLocation(bend:IBend, x:Number, y:Number):void

Modifies the location of the given bend.

Parameters

bend:IBend — The bend whose location is to be modified.
 
x:Number — The new x-coordinate of the bend.
 
y:Number — Tthe new y-coordinate of the bend.

setBounds()method 
public function setBounds(node:INode, x:Number, y:Number, width:Number, height:Number):void

Sets the bounds of the given node to the new values.

Parameters

node:INode — A live node that belongs to this graph
 
x:Number — The new absolute x-coordinate of the upper left corner of the node
 
y:Number — The new absolute y-coordinate of the upper left corner of the node
 
width:Number — The new width of the node
 
height:Number — The new height of the node

setEdgeStyle()method 
public function setEdgeStyle(edge:IEdge, style:IEdgeStyle):void

Assigns the given style instance by reference to the edge.

Style instances can be shared.

Parameters

edge:IEdge — The edge that will be assigned the new style.
 
style:IEdgeStyle — The style instance that will be assigned to the edge.

setLabelModelParameter()method 
public function setLabelModelParameter(label:ILabel, parameter:ILabelModelParameter):void

Sets the label model parameter for the given label.

Parameters

label:ILabel — The label.
 
parameter:ILabelModelParameter — The new parameter.

setLabelStyle()method 
public function setLabelStyle(label:ILabel, style:ILabelStyle):void

Assigns the given style instance by reference to the label.

Style instances can be shared.

Parameters

label:ILabel — The label that will be assigned the new style.
 
style:ILabelStyle — The style instance that will be assigned to the label.

setLabelText()method 
public function setLabelText(label:ILabel, text:String):void

Sets the label text of the given label.

Parameters

label:ILabel — The label to modify.
 
text:String — The new text of the label.

setLookup()method 
public function setLookup(newLookup:ILookup):void

Sets the lookup instance to use in lookup()

Parameters

newLookup:ILookup

See also

setNodeStyle()method 
public function setNodeStyle(node:INode, style:INodeStyle):void

Assigns the given style instance by reference to the node.

Style instances can be shared.

Parameters

node:INode — The node that will be assigned the new style.
 
style:INodeStyle — The style instance that will be assigned to the node.

setPortLocation()method 
public function setPortLocation(port:IPort, x:Number, y:Number):void

Sets the coordinates of the given port to the given values.

Parameters

port:IPort — The port to modify.
 
x:Number — The new x coordinate of the port.
 
y:Number — The new y coordinate of the port

setPortLocationModelParameter()method 
public function setPortLocationModelParameter(port:IPort, modelParameter:IPortLocationModelParameter):void

Sets the location model parameter of the given port to the given value.

Parameters

port:IPort — The port to modify.
 
modelParameter:IPortLocationModelParameter — The new location model parameter for the given port.

setPorts()method 
public function setPorts(edge:IEdge, sourcePort:IPort, targetPort:IPort):void

Sets the ports of the given edge to the new values. This will trigger an EdgeChanged event if source or target ports differ from the current ones. Both ports and the edge must belong to the current graph instance.

Parameters

edge:IEdge — The edge to change the ports.
 
sourcePort:IPort — The new source port instance.
 
targetPort:IPort — The new target port instance.

setPortStyle()method 
public function setPortStyle(port:IPort, style:IPortStyle):void

Assigns the given style instance by reference to the port.

Style instances can be shared.

Parameters

port:IPort — The port that will be assigned the new style.
 
style:IPortStyle — The style instance that will be assigned to the port.

setPreferredSize()method 
public function setPreferredSize(label:ILabel, width:Number, height:Number):void

Sets the preferred size of the label.

Parameters

label:ILabel — The label.
 
width:Number — The new width.
 
height:Number — The new height.