An IGraph that contains a live subgraph of another IGraph.
Remarks
FilteredGraphWrapper is a decorator for another IGraph instance and can be used to retain only a subset of nodes and edges of the original graph. The properties nodePredicate and edgePredicate control which nodes and edges are retained in the filtered graph. Edges adjacent to filtered nodes are also filtered automatically (as their source or target would not be in the graph anyway).
Note that FilteredGraphWrapper has to listen to events raised by the wrapped graph to keep itself updated, so dispose should be called if this instance is not used any more. Otherwise the wrapped graph may be kept alive for longer than necessary.
Ports at IEdges (i.e. edge-to-edge connections) are not fully supported.
Related Programming Samples
- Organization Chart
- An interactive viewer for organization charts with adaptive styles and automatic layout.
- Collapsible Trees
- Shows interactive collapsing and expanding of subtrees of a graph.
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.graph.FilteredGraphWrapper
See Also
Constructors
FilteredGraphWrapper
(graph: IGraph, nodePredicate: function(INode):boolean, edgePredicate?: function(IEdge):boolean)Creates a new graph instance that wraps the original graph and uses the predicates to determine which nodes and edges should be contained in the graph.
Remarks
graph
, so dispose should be called if this instance is not used any more.Parameters
A map of options to pass to the method.
- graph - IGraph
- The graph to wrap
- nodePredicate - function(INode):boolean
- The predicate that determines which nodes to keep.
Signature Details
function(obj: INode) : boolean
Represents the method that defines a set of criteria and determines whether the specified object meets those criteria.Parameters
- obj - INode
- The object to compare against the criteria defined within the method represented by this delegate.
Returns
- boolean
true
if obj meets the criteria defined within the method represented by this delegate; otherwise,false
.
- edgePredicate - function(IEdge):boolean
- The optional predicate that determines which edges to keep. If omitted, all edges are kept, unless connected to filtered nodes.
Signature Details
function(obj: IEdge) : boolean
Represents the method that defines a set of criteria and determines whether the specified object meets those criteria.Parameters
- obj - IEdge
- The object to compare against the criteria defined within the method represented by this delegate.
Returns
- boolean
true
if obj meets the criteria defined within the method represented by this delegate; otherwise,false
.
Throws
- Exception({ name: 'ArgumentError' })
- if
graph
,nodePredicate
, oredgePredicate
isnull
.
Properties
Gets a live view of all bends contained in this IGraph.
Gets a GraphDecorator instance for use with this graph.
Gets or sets the defaults for edges.
Remarks
See Also
Implements
Gets a live view of all edge labels contained in this IGraph.
Overrides
Gets the predicate function for the edges.
Signature Details
function(obj: IEdge) : boolean
Parameters
- obj - IEdge
- The object to compare against the criteria defined within the method represented by this delegate.
Returns
- boolean
true
if obj meets the criteria defined within the method represented by this delegate; otherwise,false
.
See Also
Gets a view of the edges contained in this graph.
Remarks
This is a live view of the edges that always represents the current state of the graph. The same reference will be returned for each invocation.
Note that even though edges can be accessed via index, the underlying graph structure in the default IGraph implementation is a linked list and indexed access can be slow. In those cases it is recommended to store the edges in your own list, if possible. This is not necessary for the first or last element or when iterating over the edges via a foreach
loop.
See Also
Overrides
Gets the folding view instance associated with this IGraph or null
if none is associated with it.
Remarks
See Also
Overrides
Creates a GroupingSupport instance for the graph.
Remarks
See Also
Overrides
Gets or sets the defaults for group nodes.
Remarks
See Also
Implements
Gets a view of the labels contained in this graph.
Remarks
This is a live view of the labels that always represents the current state of the graph. The same reference will be returned for each invocation.
Note that even though labels can be accessed via index, the underlying graph structure in the default IGraph implementation is a linked list and indexed access can be slow. In those cases it is recommended to store the labels in your own list, if possible. This is not necessary for the first or last element or when iterating over the labels via a foreach
loop.
See Also
Overrides
Gets the mapper registry that is associated with this graph instance.
Remarks
See Also
Implements
Gets or sets the defaults for normal nodes.
Remarks
See Also
Implements
Gets a live view of all node labels contained in this IGraph.
Overrides
Gets the predicate function for the nodes.
Signature Details
function(obj: INode) : boolean
Parameters
- obj - INode
- The object to compare against the criteria defined within the method represented by this delegate.
Returns
- boolean
true
if obj meets the criteria defined within the method represented by this delegate; otherwise,false
.
See Also
Gets a view of the nodes contained in this graph.
Remarks
This is a live view of the nodes that always represents the current state of the graph. The same reference will be returned for each invocation.
Note that even though nodes can be accessed via index, the underlying graph structure in the default IGraph implementation is a linked list and indexed access can be slow. In those cases it is recommended to store the nodes in your own list, if possible. This is not necessary for the first or last element or when iterating over the nodes via a foreach
loop.
See Also
Overrides
Gets a live view of all port labels contained in this IGraph.
Overrides
Gets a view of the ports contained in this graph.
Remarks
This is a live view of the ports that always represents the current state of the graph. The same reference will be returned for each invocation.
Note that even though ports can be accessed via index, the underlying graph structure in the default IGraph implementation is a linked list and indexed access can be slow. In those cases it is recommended to store the ports in your own list, if possible. This is not necessary for the first or last element or when iterating over the ports via a foreach
loop.
Overrides
Gets or sets the tag associated with this instance.
Remarks
See Also
Implements
Gets the UndoEngine instance associated with this IGraph or null
if none is associated with it.
Remarks
See Also
Overrides
Gets or sets whether or not the UndoEngine used for this instance should be enabled.
Gets the graph that has been wrapped by this instance.
Methods
Adds a bend at the given index to the given edge using the coordinates provided.
Remarks
The added instance will be returned.
To retrieve the current bends of an edge, use bends
Parameters
A map of options to pass to the method.
- edge - IEdge
- The edge to which the bend will be added.
- location - Point
- the coordinates to use for the newly created bend. To change the location after the bend has been added, use setBendLocation.
- index - number
- The index for the newly added bend; a negative value (which is the default) indicates that the bend should be appended to the end of the list of bends.
Returns
- ↪IBend
- a newly created live bend
Throws
- Exception({ name: 'ArgumentError' })
edge
is not in this graph, orlocation
contains one or more NaN values.
See Also
Implements
Adds bends with the given locations to the end of the bend list of the given edge.
Parameters
A map of options to pass to the method.
- edge - IEdge
- The edge to add the bends to.
- locations - IEnumerable<Point>
- The locations of the bends.
Throws
- Exception({ name: 'ArgumentError' })
edge
is not in this graph.- Exception({ name: 'ArgumentError' })
locations
contains one or more NaN values.
See Also
Overrides
Adds event handlers that propagate graph events from graph
to listeners on this instance.
Parameters
A map of options to pass to the method.
- graph - IGraph
- The graph for which event propagators should be created
Overrides
addLabel
(owner: ILabelOwner, text: string, layoutParameter?: ILabelModelParameter, style?: ILabelStyle, preferredSize?: Size, tag?: Object) : ILabelAdd a label to the given node or edge using the text as the initial label text and label model parameter, style and tag.
Parameters
A map of options to pass to the method.
- owner - ILabelOwner
- The node, edge or port to add the label to. Note that the owner cannot be changed after the label has been added.
- text - string
- The initial text of the label. To change the text after the label has been added, use setLabelText.
- layoutParameter - ILabelModelParameter
- The label model parameter instance to use. If omitted the default parameter will be set. To change the parameter after the label has been added, use setLabelLayoutParameter.
- style - ILabelStyle
- The style to use for the label. If omitted the default style will be set. To change the style after the label has been added, use setStyle.
- preferredSize - Size
- The initial values to use for the preferredSize. If omitted size will be determined automatically. To change the preferred size after the label has been added, use setLabelPreferredSize.
- tag - Object
- The initial tag to assign.
Returns
- ↪ILabel
- the newly created label
Throws
- Exception({ name: 'ArgumentError' })
owner
is not in this graph orpreferredSize
contains one or more NaN values.
See Also
Implements
addPort
(owner: IPortOwner, locationParameter?: IPortLocationModelParameter, style?: IPortStyle, tag?: Object) : IPortAdd a port to the given port owner using the location model parameter, style and tag.
Remarks
The locationParameter
determines the location of the port.
An implementation may throw an NotSupportedError if the type of the owner
instance does not support adding of ports.
Parameters
A map of options to pass to the method.
- owner - IPortOwner
- the owner to add the port instance to.
- locationParameter - IPortLocationModelParameter
- the parameter to use for the port to determine its location. If omitted the default parameter will be set. To change the parameter after the port has been added, use setPortLocationParameter.
- style - IPortStyle
- the style to initially assign to the style property. If omitted the default style will be set, e.g. INSTANCE. To change the style after the port has been added, use setStyle.
- tag - Object
- the initial tag to assign.
Returns
- ↪IPort
- the newly created port
Throws
- Exception({ name: 'NotSupportedError' })
- If this instance cannot add a port to
owner
. - Exception({ name: 'ArgumentError' })
owner
is not in this graph.
See Also
Implements
Add a port to the given port owner using the absolute coordinates as the new initial position of the port anchor.
Parameters
A map of options to pass to the method.
- owner - IPortOwner
- the owner to add the port instance to.
- location - Point
- the location to use for the port to determine its location. This is passed to the createDefaultPortLocationParameter method to determine the initial IPortLocationModelParameter to use.
- style - IPortStyle
- tag - Object
- the initial tag to assign.
Returns
- ↪IPort
- the newly created port
Throws
- Exception({ name: 'NotSupportedError' })
- If this instance cannot add a port to
owner
. - Exception({ name: 'ArgumentError' })
owner
is not in this graph.- Exception({ name: 'ArgumentError' })
location
contains one or more NaN values.
See Also
Overrides
Adds a new port to the graph at the node using a location that is relative to the center of the node.
Remarks
Parameters
A map of options to pass to the method.
- node - INode
- The owner of the port.
- relativeLocation - Point
- The offset of the port relative to the center of the layout.
Returns
- ↪IPort
- The newly added port instance.
Throws
- Exception({ name: 'ArgumentError' })
node
is not in this graph.- Exception({ name: 'ArgumentError' })
relativeLocation
contains one or more NaN values.
See Also
Overrides
Convenience method that uses the UndoEngine from the IGraph's ILookup to add a unit.
Parameters
A map of options to pass to the method.
- undoName - string
- The name of the undo operation.
- redoName - string
- The name of the redo operation.
- undo - function():void
- The undo action.
Signature Details
function()
Encapsulates a method that has no parameters and does not return a value.Parameters
- redo - function():void
- The redo action.
Signature Details
function()
Encapsulates a method that has no parameters and does not return a value.Parameters
See Also
Overrides
Method to adjust the size of a group node.
Remarks
groupNode
.Parameters
A map of options to pass to the method.
- groupNode - INode
- The group node to adjust the size of.
Throws
- Exception({ name: 'ArgumentError' })
groupNode
is not in this graph.
Examples
AdjustGroupNodeLayout
only affects the node it is called for. To properly adjust all of its ancestors, too, one has to adjust all of them from the given node to the root:for (const nodeToAdjust of graph.groupingSupport.getPathToRoot(
innermostGroup
)) {
graph.adjustGroupNodeLayout(nodeToAdjust)
}
See Also
Overrides
Adjusts the preferredSize property of a label to fit the suggested size of its ILabelStyleRenderer.
Remarks
Parameters
A map of options to pass to the method.
- label - ILabel
- The label to adjust the size for.
See Also
Overrides
applyLayout
(layout: ILayoutAlgorithm, layoutData?: LayoutData, updateContentRect?: boolean, automaticEdgeGrouping?: boolean, configureTableLayout?: boolean, considerViewportLimiter?: boolean, fixPorts?: boolean, hideEdgesAtEdges?: boolean, portAdjustmentPolicy?: PortAdjustmentPolicy, portLabelPolicies?: ItemMapping<ILabel,PortLabelPolicy>, targetBoundsInsets?: Insets, labelPreferredPlacementPolicy?: LabelPreferredPlacementPolicy)Runs an ILayoutAlgorithm synchronously on the given graph.
Remarks
Parameters
A map of options to pass to the method.
- layout - ILayoutAlgorithm
- The layout.
- layoutData - LayoutData
- The layout data.
- updateContentRect - boolean
- A value indicating whether the content rectangle property of the CanvasComponent
- automaticEdgeGrouping - boolean
- A value indicating whether edge groups are automatically created for edges that are connected to the same port.
- configureTableLayout - boolean
- considerViewportLimiter - boolean
- A value that controls whether strong port constraints are automatically created.
- fixPorts - boolean
- A value that controls whether strong port constraints are automatically created.
- hideEdgesAtEdges - boolean
- A value that controls whether edges at other edges will be hidden from the layout graph or included.
- portAdjustmentPolicy - PortAdjustmentPolicy
- The policy that specifies how port locations should be adjusted after a layout has been calculated.
- portLabelPolicies - ItemMapping<ILabel,PortLabelPolicy>
- targetBoundsInsets - Insets
- the insets (in world coordinates) that will be added to the content rectangle when calculating the target viewport.
- labelPreferredPlacementPolicy - LabelPreferredPlacementPolicy
- The policy that specifies how edge labels should be treated by the layout algorithm.
See Also
Class.ensure(LayoutExecutor)
More information.Overrides
beginEdit
<T>(undoName: string, redoName: string, items: IEnumerable<T>, provider?: function(T):IMementoSupport) : ICompoundEditStarts an ICompoundEdit that uses the memento design pattern to record changes to the items in the given items
collection.
Remarks
This method uses the IMementoSupport returned by the provider
to record the state of an item at the beginning of the edit and when commit is called to create an IUndoUnit that can revert the item to the recorded state and back. If no provider
is given, this method uses the IMementoSupport returned by the lookup implementation of the items to record the state of an item at the beginning of the edit and when commit is called to create an IUndoUnit that can revert the item to the recorded state and back.
Calling this method will immediately enqueue an IUndoUnit into the undo queue. Subsequent additions to the queue will be added after the created instance, even if they are added to the queue before the commit method has been called.
Type Parameters
- T
- The type of the items that will be modified subsequently.
Parameters
A map of options to pass to the method.
- undoName - string
- redoName - string
- items - IEnumerable<T>
- The items that will be changed after this call and before the call to commit.
- provider - function(T):IMementoSupport
- The provider for the IMementoSupport of the
items
. if the provider returnsnull
for a given item, changes to this item are not being recorded.Signature Details
function(item: T) : IMementoSupport
A function that is used to retrieve an IMementoSupport for any given object.Parameters
- item - T
- The item to provide the
for.
Returns
Returns
- ↪ICompoundEdit
- An implementation of the ICompoundEdit interface whose commit or cancel methods need to be called after the items have been modified.
Examples
The following is an example implementation of an item that is being managed using IMementoSupport:
A collection of items from this type can then be watched using the following code snippet:
Alternatively, when using a specific provider, consider the following examples. The following is an example implementation of an item that is being managed using IMementoSupport:
A collection of items from this type can then be watched using the following code snippet, using the provider
to return an appropriate IMementoSupport implementation:
Implementing the IMementoSupport interface is quite unrestrained, the type of the state returned by getState method can by anything as long as the applyState and stateEquals methods can deal with it:
In summary, use this concept when you want to track the state of items during certain operations for undo/redo. This is efficient if it's easier to handle an item's state than the changes to the item themselves. If you want to focus on the changes or on certain events, you should use custom IUndoUnit
See Also
Overrides
Starts an ICompoundEdit that records graph changes and custom undo units in a single compound unit.
Remarks
This method can be used to bracket several undo units. All edits added to the queue after this call and before a call to cancel or commit will be placed into the queue as a single block.
Client code needs to make sure that either the cancel or commit method is called on the returned instance.
Parameters
A map of options to pass to the method.
- undoName - string
- The undo name for the compound edit.
- redoName - string
- The redo name for the compound edit.
Returns
See Also
Overrides
calculateLabelPreferredSize
(owner: ILabelOwner, text: string, layoutParameter?: ILabelModelParameter, style?: ILabelStyle, tag?: Object) : SizeCalculates the preferred size of a label with the given properties.
Parameters
A map of options to pass to the method.
- owner - ILabelOwner
- The item that will own the label.
- text - string
- The text.
- layoutParameter - ILabelModelParameter
- The label model parameter.
- style - ILabelStyle
- The label style.
- tag - Object
- The tag for the label.
Returns
- ↪Size
- The size as calculated by the ILabelStyleRenderer.
See Also
Overrides
Clears the graph, removing all items in proper order.
Removes all bends from the given edge.
Remarks
Parameters
A map of options to pass to the method.
- edge - IEdge
- the edge whose bends will be removed
Throws
- Exception({ name: 'ArgumentError' })
edge
is not in this graph.
See Also
Overrides
Determines whether this graph contains the specified item.
Parameters
A map of options to pass to the method.
- item - IModelItem
- The item.
Returns
- ↪boolean
true
if this graph contains the specified item; otherwise,false
.
Overrides
Creates the label layout parameter for a given ILabelOwner.
Remarks
Parameters
A map of options to pass to the method.
- owner - ILabelOwner
- The item that is the owner of the label in question.
Returns
- ↪ILabelModelParameter
- The default label layout parameter to use for newly created labels at the item.
See Also
Overrides
createDefaultPortLocationParameter
(owner: IPortOwner, location?: Point) : IPortLocationModelParameterCreates a location model parameter for a newly created IPort at the owner
that matches the location
.
Remarks
location
is null
, this method uses the port defaults for the owner
to obtain the location parameter.Parameters
A map of options to pass to the method.
- owner - IPortOwner
- The owner of the port.
- location - Point
- The location in the world coordinate system where the port should be added.
Returns
- ↪IPortLocationModelParameter
- Either a location model parameter that matches the location, or the default parameter to use for the IPortOwner as returned by getLocationParameterInstance.
Throws
- Exception({ name: 'ArgumentError' })
location
contains one or more NaN values.
See Also
Overrides
Creates and returns an edge that connects to the given port instances.
Remarks
Parameters
A map of options to pass to the method.
- sourcePort - IPort
- The source port the created edge will connect to. To change the source port after the edge has been created, use setEdgePorts.
- targetPort - IPort
- The target port the created edge will connect to. To change the target port after the edge has been created, use setEdgePorts.
- style - IEdgeStyle
- The style instance that will be assigned to the newly created instance. This is done by reference. If omitted the default style will be set. To change the style after the edge has been created, use setStyle.
- tag - Object
- The initial value of the tag that will be assigned to the new edge.
- labels - string[]
- An array of labels to add to the newly created node. Each item will be passed to the addLabel method.
- ports - IPortLocationModelParameter[]
- An array of ports to add to the newly created node. Each item will be passed to the addPort method.
- bends - Point[]
- An array of bends to add to the newly created edge. Each item will be passed to the addBend method.
- labels - string[]
- An array of labels to add to the newly created node. Each item will be passed to the addLabel method.
- ports - IPortLocationModelParameter[]
- An array of ports to add to the newly created node. Each item will be passed to the addPort method.
- bends - Point[]
- An array of bends to add to the newly created edge. Each item will be passed to the addBend method.
Returns
- ↪IEdge
- the newly created edge instance
See Also
Implements
Creates and returns an edge that connects to the given node instances using the given style instance.
Remarks
Parameters
A map of options to pass to the method.
- source - 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. An implementation may create a new port of the edge. To change the source port after the edge has been created, use setEdgePorts.
- target - INode
- The target node the created edge will connect to. It is up to the implementation to decide which port to use at the given node. An implementation may create a new port of the edge. To change the target port after the edge has been created, use setEdgePorts.
- style - IEdgeStyle
- The style instance that will be assigned to the newly created instance. This is done by reference. If omitted the default style will be set. To change the style after the edge has been created, use setStyle.
- tag - Object
- The initial value of the tag that will be assigned to the new edge.
- labels - string[]
- An array of labels to add to the newly created node. Each item will be passed to the addLabel method.
- ports - IPortLocationModelParameter[]
- An array of ports to add to the newly created node. Each item will be passed to the addPort method.
- bends - Point[]
- An array of bends to add to the newly created edge. Each item will be passed to the addBend method.
- labels - string[]
- An array of labels to add to the newly created node. Each item will be passed to the addLabel method.
- ports - IPortLocationModelParameter[]
- An array of ports to add to the newly created node. Each item will be passed to the addPort method.
- bends - Point[]
- An array of bends to add to the newly created edge. Each item will be passed to the addBend method.
Returns
- ↪IEdge
- the newly created edge instance
See Also
Implements
Creates a new group node using the provided style and layout as a child of parent
.
Remarks
The group node will be a direct descendant of parent
.
To create group nodes interactively use the GraphEditorInputMode as input mode and enable the grouping operations.
Parameters
A map of options to pass to the method.
- parent - INode
- layout - Rect
- The initial layout to use for the new node. If omitted the node will be placed with its top left corner at 0,0 and the default size. To change the layout after the group node has been created, use setNodeLayout.
- style - INodeStyle
- The style to use for the new node. If omitted the default style will be set. To change the style after the group node has been created, use setStyle.
- tag - Object
- labels - string[]
- An array of labels to add to the newly created node. Each item will be passed to the addLabel method.
- ports - IPortLocationModelParameter[]
- An array of ports to add to the newly created node. Each item will be passed to the addPort method.
- children - Rect[]
- An array of nodes to create as child nodes of this group node. Each item will be passed to the createNode method.
- labels - string[]
- An array of labels to add to the newly created node. Each item will be passed to the addLabel method.
- ports - IPortLocationModelParameter[]
- An array of ports to add to the newly created node. Each item will be passed to the addPort method.
- children - Rect[]
- An array of nodes to create as child nodes of this group node. Each item will be passed to the createNode method.
Returns
- ↪INode
- The newly created group node.
Throws
- Exception({ name: 'ArgumentError' })
- The
layout
contains one or more NaN values.
See Also
Overrides
Creates a new ordinary node as a direct descendant of parent
using the given layout and style.
Parameters
A map of options to pass to the method.
- parent - INode
- The node to use as the parent in the grouping hierarchy or
null
if the new node should become a top-level node. To change the parent after group node has been created, use setParent. - layout - Rect
- The layout to use initially. The values will be copied to the node's Layout field. If omitted the default size will be set and the node's top left corner will be placed at 0,0. To change the layout after the group node has been created, use setNodeLayout.
- style - INodeStyle
- The style instance that will be assigned to the newly created instance. This is done by reference. If omitted the default style will be set.
- tag - Object
- labels - string[]
- An array of labels to add to the newly created node. Each item will be passed to the addLabel method.
- ports - IPortLocationModelParameter[]
- An array of ports to add to the newly created node. Each item will be passed to the addPort method.
- labels - string[]
- An array of labels to add to the newly created node. Each item will be passed to the addLabel method.
- ports - IPortLocationModelParameter[]
- An array of ports to add to the newly created node. Each item will be passed to the addPort method.
Returns
- ↪INode
- The newly created node.
Throws
- Exception({ name: 'ArgumentError' })
parent
is not in this graph, orlayout
contains one or more NaN values.
See Also
Overrides
Creates and returns a node using the specified values for the initial geometry, style, and tag.
Remarks
Parameters
A map of options to pass to the method.
- layout - Rect
- The layout to use initially. The values will be copied to the node's Layout field. To change the layout after the node has been created, use setNodeLayout.
- style - INodeStyle
- The style instance that will be assigned to the newly created instance. This is done by reference. If omitted the default style will be set. To change the style after the node has been added, use setStyle.
- tag - Object
- The initial value of the tag that will be assigned to the new node.
- labels - string[]
- An array of labels to add to the newly created node. Each item will be passed to the addLabel method.
- ports - IPortLocationModelParameter[]
- An array of ports to add to the newly created node. Each item will be passed to the addPort method.
- labels - string[]
- An array of labels to add to the newly created node. Each item will be passed to the addLabel method.
- ports - IPortLocationModelParameter[]
- An array of ports to add to the newly created node. Each item will be passed to the addPort method.
Returns
- ↪INode
- A newly created node instance
Throws
- Exception({ name: 'ArgumentError' })
layout
contains one or more NaN values.
See Also
Implements
Creates and returns a node using the specified initial center location and style, as well as the tag.
Remarks
Parameters
A map of options to pass to the method.
- location - Point
- the initial coordinates of the center of the node's Layout property
- style - INodeStyle
- The style instance that will be assigned to the newly created instance. This is done by reference.
- tag - Object
- The initial value of the tag that will be assigned to the new node.
- labels - string[]
- An array of labels to add to the newly created node. Each item will be passed to the addLabel method.
- ports - IPortLocationModelParameter[]
- An array of ports to add to the newly created node. Each item will be passed to the addPort method.
- labels - string[]
- An array of labels to add to the newly created node. Each item will be passed to the addLabel method.
- ports - IPortLocationModelParameter[]
- An array of ports to add to the newly created node. Each item will be passed to the addPort method.
Returns
- ↪INode
- A newly created node instance
Throws
- Exception({ name: 'ArgumentError' })
location
contains one or more NaN values.
See Also
Overrides
Calculates the number of edges at the given IPortOwner for this graph.
Remarks
Parameters
A map of options to pass to the method.
- owner - IPortOwner
- The port owner to count the degree of.
Returns
- ↪number
- The number of edges that are incident to the port owner.
Throws
- Exception({ name: 'ArgumentError' })
owner
is not in this graph.
See Also
Overrides
Calculates the number of edges at the given IPort for this graph.
Remarks
Parameters
A map of options to pass to the method.
- port - IPort
- The port owner to count the degree of.
Returns
- ↪number
- The number of edges that are incident to the port.
Throws
- Exception({ name: 'ArgumentError' })
port
is not in this graph.
See Also
Overrides
Clears the internal state of this instance and released memory and bound listeners.
Remarks
Overrides
Should be called by the client if the edgePredicate changed for the given edge in the graph.
See Also
Should be called by the client if the edgePredicate changed for the edge in the graph.
See Also
Returns an IEnumerable<T> for all edges that are adjacent to the given port as a sourcePort or targetPort.
Remarks
foreach
loop.Parameters
A map of options to pass to the method.
- port - IPort
- the port to check
- type - AdjacencyTypes
- The type of adjacency to consider.
Returns
- ↪IListEnumerable<IEdge>
- An enumeration of all adjacent edges of the given type.
Throws
- Exception({ name: 'ArgumentError' })
port
is not in this graph.
See Also
Overrides
Returns an IListEnumerable<T> for all edges that have the given port owner as their target port's or source port's owner depending on the AdjacencyTypes
Remarks
foreach
loop.Parameters
A map of options to pass to the method.
- owner - IPortOwner
- the port owner to check
- type - AdjacencyTypes
- The type of adjacency to consider.
Returns
- ↪IListEnumerable<IEdge>
- An enumeration of all adjacent edges of the given type.
Throws
- Exception({ name: 'ArgumentError' })
owner
is not in this graph.
See Also
Overrides
Returns an enumerable over the children of the provided node.
Remarks
This method returns the direct children, i.e. all nodes that have node
as their parent. To get all descendants method getDescendants can be used.
To make a node a child of node
, use setParent or create the node directly as a child with createNode
Parameters
A map of options to pass to the method.
- node - INode
- The node for which to return the children or
null
if the top-level nodes should be returned.
Returns
- ↪IListEnumerable<INode>
- All nodes that have
node
as their parent.
Throws
- Exception({ name: 'ArgumentError' })
node
is not in this graph.
See Also
Overrides
Finds an edge that connects from
and to
in the given graph.
Parameters
A map of options to pass to the method.
- from - IPortOwner
- The sourcePort owner of the edge to find.
- to - IPortOwner
- The targetPort owner of the edge to find.
Returns
- ↪IEdge
- An edge that satisfies the constraints or
null
, if none was found.
Throws
- Exception({ name: 'ArgumentError' })
from
orto
are not in this graph.
See Also
Overrides
Finds an edge that connects sourcePort
and targetPort
in the given graph.
Parameters
A map of options to pass to the method.
- sourcePort - IPort
- The sourcePort of the edge to find.
- targetPort - IPort
- The targetPort of the edge to find.
Returns
- ↪IEdge
- An edge that satisfies the constraints or
null
, if none was found.
Throws
- Exception({ name: 'ArgumentError' })
sourcePort
ortargetPort
are not in this graph.
See Also
Overrides
Gets the label defaults for a given ILabelOwner in the context of the graph
.
Parameters
A map of options to pass to the method.
- owner - ILabelOwner
- The item that the label defaults are returned for. If this is a group node, the groupNodeDefaults's label defaults will be returned, otherwise the nodeDefaults or edgeDefaults labels will be returned.
Returns
- ↪ILabelDefaults
- Appropriate ILabelDefaults for the provided
owner
.
Overrides
Gets the lookup instance to use in lookup
Defined in
Returns the parent node of the node or null
if node
is a top-level node.
Gets the port defaults for a given IPortOwner in the context of the graph
.
Parameters
A map of options to pass to the method.
- owner - IPortOwner
- The item that the label defaults are returned for. If this is a group node, the groupNodeDefaults's port defaults will be returned, otherwise the nodeDefaults or edgeDefaults ports will be returned.
Returns
- ↪IPortDefaults
- Appropriate IPortDefaults for the provided
owner
.
Overrides
Groups the nodes in children
into the provided group node.
Remarks
parent
needs to be a group node at the time of the invocation. This operation is basically the same as calling setParent for each node in children
whose parent is not part of the set.Parameters
A map of options to pass to the method.
- parent - INode
- The node to use as the parent in the grouping hierarchy.
- children - IEnumerable<INode>
- The children to group into the group node.
Throws
- Exception({ name: 'ArgumentError' })
parent
or one ofchildren
is not in this graph.
See Also
Overrides
Groups the nodes in children
into a newly created group node.
Remarks
children
.Parameters
A map of options to pass to the method.
- children - IEnumerable<INode>
- The children to group into the new group node.
- labels - string[]
- An array of labels to add to the newly created node. Each item will be passed to the addLabel method.
- ports - IPortLocationModelParameter[]
- An array of ports to add to the newly created node. Each item will be passed to the addPort method.
- labels - string[]
- An array of labels to add to the newly created node. Each item will be passed to the addLabel method.
- ports - IPortLocationModelParameter[]
- An array of ports to add to the newly created node. Each item will be passed to the addPort method.
Returns
- ↪INode
- The newly created group node.
Throws
- Exception({ name: 'ArgumentError' })
- One of
children
is not in this graph.
See Also
Overrides
Calculates the number of incoming edges at the given IPortOwner for this graph.
Parameters
A map of options to pass to the method.
- owner - IPortOwner
- The port owner to count the incoming edges of.
Returns
- ↪number
- The number of edges that have the port owner as their target port's owner.
Throws
- Exception({ name: 'ArgumentError' })
owner
is not in this graph.
See Also
Overrides
Calculates the number of incoming edges at the given IPort for this graph.
Convenience method that yields the incoming edges at the given owner.
Remarks
This method delegates to edgesAt using INCOMING.
Note that even though edges can be accessed via index, the underlying graph structure in the default IGraph implementation is a linked list and indexed access can be slow. In those cases it is recommended to store the edges in your own list, if possible. This is not necessary for the first or last element or when iterating over the incoming edges via a foreach
loop.
Parameters
A map of options to pass to the method.
- owner - IPortOwner
- The owner of the edges.
Returns
- ↪IListEnumerable<IEdge>
- An enumerable for the edges.
Throws
- Exception({ name: 'ArgumentError' })
owner
is not in this graph.
See Also
Overrides
Convenience method that yields the incoming edges at the given port.
Remarks
This method delegates to edgesAt using INCOMING.
Note that even though edges can be accessed via index, the underlying graph structure in the default IGraph implementation is a linked list and indexed access can be slow. In those cases it is recommended to store the edges in your own list, if possible. This is not necessary for the first or last element or when iterating over the incoming edges via a foreach
loop.
Parameters
A map of options to pass to the method.
- port - IPort
- The port of the edges.
Returns
- ↪IListEnumerable<IEdge>
- An enumerable for the edges.
Throws
- Exception({ name: 'ArgumentError' })
port
is not in this graph.
See Also
Overrides
Causes the DisplaysInvalidated event to be triggered.
Remarks
Implements
Returns whether the given node is a group node.
Remarks
Parameters
A map of options to pass to the method.
- node - INode
- The node to check.
Returns
- ↪boolean
- Whether the node is considered a group node.
Throws
- Exception({ name: 'ArgumentError' })
node
is not in this graph.
See Also
Overrides
Returns an instance that implements the given type or null
.
Remarks
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.Type Parameters
- T: any
Parameters
A map of options to pass to the method.
- type - Class<T>
- The type for which an instance shall be returned.
Returns
- ↪T
- an instance that is assignable to type or
null
See Also
Implements
Enumerates the neighbors of a given INode.
Remarks
Parameters
A map of options to pass to the method.
- node - INode
- The node.
Returns
- ↪IEnumerable<INode>
- An enumerable over all neighbors.
Throws
- Exception({ name: 'ArgumentError' })
node
is not in this graph.
See Also
Overrides
Should be called by clients if the nodePredicate changed for the given node.
Should be called by the client if the nodePredicate changed for the nodes in the graph.
See Also
Raises the BendAdded event
Parameters
A map of options to pass to the method.
- evt - ItemEventArgs<IBend>
- The parameters for the event
Defined in
Raises the BendLocationChanged event
Parameters
A map of options to pass to the method.
Defined in
Raises the BendRemoved event
Parameters
A map of options to pass to the method.
- evt - BendEventArgs
- The parameters for the event
Defined in
Raises the BendTagChanged event
Parameters
A map of options to pass to the method.
- evt - ItemChangedEventArgs<IBend,Object>
- The parameters for the event
Defined in
Raises the EdgeCreated event
Parameters
A map of options to pass to the method.
- evt - ItemEventArgs<IEdge>
- The parameters for the event
Defined in
Raises the EdgePortsChanged event
Parameters
A map of options to pass to the method.
- evt - EdgeEventArgs
- The parameters for the event
Defined in
Raises the EdgeRemoved event
Parameters
A map of options to pass to the method.
- evt - EdgeEventArgs
- The parameters for the event
Defined in
Raises the EdgeStyleChanged event
Parameters
A map of options to pass to the method.
- evt - ItemChangedEventArgs<IEdge,IEdgeStyle>
- The parameters for the event
Defined in
Raises the EdgeTagChanged event
Parameters
A map of options to pass to the method.
- evt - ItemChangedEventArgs<IEdge,Object>
- The parameters for the event
Defined in
Called when the wrappedGraph property value changes and after initialization of the field.
Remarks
Parameters
A map of options to pass to the method.
Overrides
Raises the GraphTagChanged event
Parameters
A map of options to pass to the method.
- evt - ItemChangedEventArgs<IGraph,Object>
- The parameters for the event
Defined in
Raises the DisplaysInvalidated event
Parameters
A map of options to pass to the method.
- evt - EventArgs
- The parameters for the event
Defined in
Dispatches the IsGroupNodeChanged event.
Parameters
A map of options to pass to the method.
- evt - NodeEventArgs
- The event args to dispatch.
Defined in
Raises the LabelAdded event
Parameters
A map of options to pass to the method.
- evt - ItemEventArgs<ILabel>
- The parameters for the event
Defined in
Raises the LabelLayoutParameterChanged event
Parameters
A map of options to pass to the method.
- evt - ItemChangedEventArgs<ILabel,ILabelModelParameter>
- The parameters for the event
Defined in
Raises the LabelPreferredSizeChanged event
Parameters
A map of options to pass to the method.
- evt - ItemChangedEventArgs<ILabel,Size>
- The parameters for the event
Defined in
Raises the LabelRemoved event
Parameters
A map of options to pass to the method.
- evt - LabelEventArgs
- The parameters for the event
Defined in
Raises the LabelStyleChanged event
Parameters
A map of options to pass to the method.
- evt - ItemChangedEventArgs<ILabel,ILabelStyle>
- The parameters for the event
Defined in
Raises the LabelTagChanged event
Parameters
A map of options to pass to the method.
- evt - ItemChangedEventArgs<ILabel,Object>
- The parameters for the event
Defined in
Raises the LabelTextChanged event
Parameters
A map of options to pass to the method.
- evt - ItemChangedEventArgs<ILabel,string>
- The parameters for the event
Defined in
Raises the NodeCreated event
Parameters
A map of options to pass to the method.
- evt - ItemEventArgs<INode>
- The parameters for the event
Defined in
Raises the NodeLayoutChanged event
Parameters
A map of options to pass to the method.
Defined in
Raises the NodeRemoved event
Parameters
A map of options to pass to the method.
- evt - NodeEventArgs
- The parameters for the event
Overrides
Raises the NodeStyleChanged event
Parameters
A map of options to pass to the method.
- evt - ItemChangedEventArgs<INode,INodeStyle>
- The parameters for the event
Defined in
Raises the NodeTagChanged event
Parameters
A map of options to pass to the method.
- evt - ItemChangedEventArgs<INode,Object>
- The parameters for the event
Defined in
Dispatches the ParentChanged event.
Parameters
A map of options to pass to the method.
- evt - NodeEventArgs
- The event args to dispatch.
Defined in
Raises the PortAdded event
Parameters
A map of options to pass to the method.
- evt - ItemEventArgs<IPort>
- The parameters for the event
Defined in
Raises the PortLocationParameterChanged event
Parameters
A map of options to pass to the method.
- evt - ItemChangedEventArgs<IPort,IPortLocationModelParameter>
- The parameters for the event
Defined in
Raises the PortRemoved event
Parameters
A map of options to pass to the method.
- evt - PortEventArgs
- The parameters for the event
Defined in
Raises the PortStyleChanged event
Parameters
A map of options to pass to the method.
- evt - ItemChangedEventArgs<IPort,IPortStyle>
- The parameters for the event
Defined in
Raises the PortTagChanged event
Parameters
A map of options to pass to the method.
- evt - ItemChangedEventArgs<IPort,Object>
- The parameters for the event
Defined in
Calculates the number of outgoing edges at the given IPortOwner for this graph.
Parameters
A map of options to pass to the method.
- owner - IPortOwner
- The port owner to count the outgoing edges of.
Returns
- ↪number
- The number of edges that have the port owner as their source port's owner.
Throws
- Exception({ name: 'ArgumentError' })
owner
is not in this graph.
See Also
Overrides
Calculates the number of outgoing edges at the given IPort for this graph.
Convenience method that yields the outgoing edges at the given owner.
Remarks
This method delegates to edgesAt using OUTGOING.
Note that even though edges can be accessed via index, the underlying graph structure in the default IGraph implementation is a linked list and indexed access can be slow. In those cases it is recommended to store the edges in your own list, if possible. This is not necessary for the first or last element or when iterating over the outgoing edges via a foreach
loop.
Parameters
A map of options to pass to the method.
- owner - IPortOwner
- The owner of the edges.
Returns
- ↪IListEnumerable<IEdge>
- An enumerable for the edges.
Throws
- Exception({ name: 'ArgumentError' })
owner
is not in this graph.
See Also
Overrides
Convenience method that yields the outgoing edges at the given port.
Remarks
This method delegates to edgesAt using OUTGOING.
Note that even though edges can be accessed via index, the underlying graph structure in the default IGraph implementation is a linked list and indexed access can be slow. In those cases it is recommended to store the edges in your own list, if possible. This is not necessary for the first or last element or when iterating over the outgoing edges via a foreach
loop.
Parameters
A map of options to pass to the method.
- port - IPort
- The owner of the edges.
Returns
- ↪IListEnumerable<IEdge>
- An enumerable for the edges.
Throws
- Exception({ name: 'ArgumentError' })
port
is not in this graph.
See Also
Overrides
Enumerates the predecessors of a given INode.
Remarks
Parameters
A map of options to pass to the method.
- node - INode
- The node.
Returns
- ↪IEnumerable<INode>
- An enumerable over all predecessors.
Throws
- Exception({ name: 'ArgumentError' })
node
is not in this graph.
See Also
Overrides
Removes the given item from this graph.
Remarks
The item must be a part of this graph.
If the item is a node the NodeRemoved event will be triggered. This 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.
If the item is an edge the EdgeRemoved event will be triggered. Also this will trigger the removal of all labels and bends owned by this instance. An 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. The implementations provided by yFiles do so according to the value set to autoCleanUp in their IPortDefaults.
If the item is a bend the BendRemoved event will be triggered.
If the item is a port the PortRemoved event will be triggered. This will also remove all edges that are currently connected to the port and all labels and bends owned by this instance.
If the item is a label the LabelRemoved event will be triggered.
Parameters
A map of options to pass to the method.
- item - IModelItem
- the item to be removed from this graph instance
Throws
- Exception({ name: 'ArgumentError' })
item
is not in this graph.
See Also
Implements
Removes event handlers for graph
that have been added with addEventHandlers.
Parameters
A map of options to pass to the method.
- graph - IGraph
- The graph for which event propagators should be removed
Overrides
Reverses an edge by setting source and target port to targetPort and sourcePort.
Remarks
Parameters
A map of options to pass to the method.
- edge - IEdge
- The edge to reverse.
Throws
- Exception({ name: 'ArgumentError' })
edge
is not in this graph.
See Also
Overrides
Sets the source and target ports of the given edge to the new values.
Remarks
This will trigger an EdgePortsChanged event if source or target ports differ from the current ones. Both ports and the edge must belong to the current graph instance.
An implementation may decide to remove the corresponding ports if no other edge connects to them after the given edge has its source or target port changed. The implementations provided by yFiles do so according to the value set to autoCleanUp in their IPortDefaults.
To query the current source and target ports, you can use the sourcePort and targetPort properties.
Parameters
A map of options to pass to the method.
- edge - IEdge
- The edge to change the ports.
- sourcePort - IPort
- The new source port instance.
- targetPort - IPort
- The new target port instance.
Throws
- Exception({ name: 'ArgumentError' })
- Either
edge
,sourcePort
, ortargetPort
are not in this graph.
See Also
Implements
Changes whether the given node is a group node or not.
Remarks
Group nodes are nodes which can have children. They may not necessarily have to, however.
Attempting to set a node to the non-group-node-status while it has children at the same time will result in an InvalidOperationError.
Parameters
A map of options to pass to the method.
- node - INode
- The node to set the group node status for.
- isGroupNode - boolean
- Whether to make the node a group node.
Throws
- Exception({ name: 'ArgumentError' })
node
is not in this graph.- Exception({ name: 'InvalidOperationError' })
node
isnull
or currently has children andisGroupNode
isfalse
.
See Also
Overrides
Sets the label model parameter for the given label.
Remarks
Parameters
A map of options to pass to the method.
- label - ILabel
- The label.
- layoutParameter - ILabelModelParameter
- The new parameter.
Throws
- Exception({ name: 'ArgumentError' })
label
is not in this graph, orlayoutParameter
cannot be used forlabel
.
See Also
Implements
Sets the preferred size of the label.
Remarks
Parameters
A map of options to pass to the method.
Throws
- Exception({ name: 'ArgumentError' })
label
is not in this graph orpreferredSize
contains one or more NaN values.
See Also
Implements
Sets the label text of the given label.
Sets the lookup instance to use in lookup
Defined in
Sets the center of a node to the given world coordinates.
Remarks
Parameters
A map of options to pass to the method.
- node - INode
- The node to recenter.
- center - Point
- The new center coordinates of the node in the world coordinate system.
Throws
- Exception({ name: 'ArgumentError' })
center
contains one or more NaN values.
See Also
Overrides
Sets the layout of the given node to the new value.
Remarks
Parameters
A map of options to pass to the method.
- node - INode
- a live node that belongs to this graph
- layout - Rect
- The new layout of the node to assign to its layout.
Throws
- Exception({ name: 'ArgumentError' })
node
is not in this graph, orlayout
contains one or more NaN values.
See Also
Implements
Sets the parent node for a given node.
Remarks
Use null
as parent
to make node
a top-level node for this graph.
This method does not move or enlarge the parent
to enclose its new node
. Developers have to take care to adjust the node layout after grouping, e.g. by calling adjustGroupNodeLayout.
If parent
is not a group node before the call it will be converted into one.
To query the parent of a node, use getParent.
Parameters
A map of options to pass to the method.
- node - INode
- The node to assign a new parent.
- parent - INode
- The parent group node to assign to
node
ornull
to makenode
a top-level node.
Throws
- Exception({ name: 'ArgumentError' })
- Either
node
orparent
are not in this graph.
See Also
Overrides
Convenience method that tries to set the absolute coordinates of the given port to the given values.
Remarks
Parameters
A map of options to pass to the method.
Throws
- Exception({ name: 'ArgumentError' })
port
is not in this graph.- Exception({ name: 'ArgumentError' })
location
contains one or more NaN values.
See Also
Overrides
Sets a new IPortLocationModelParameter for the given port.
Remarks
Parameters
A map of options to pass to the method.
- port - IPort
- The port to modify
- locationParameter - IPortLocationModelParameter
- the new parameter that determines the coordinates of the port
Throws
- Exception({ name: 'ArgumentError' })
port
is not in this graph, orlocationParameter
cannot be used forport
.
See Also
Implements
Tries to set the location of the port relative to its owner if the owner is a node.
Remarks
Parameters
A map of options to pass to the method.
- port - IPort
- the port
- relativeLocation - Point
- the new coordinate offsets relative to the center of the node's layout's center.
Throws
- Exception({ name: 'ArgumentError' })
port
is not in this graph or has no owner.- Exception({ name: 'ArgumentError' })
relativeLocation
contains one or more NaN values.
See Also
Overrides
Assigns the given style instance by reference to the node.
Remarks
Style instances can be shared.
To query the node style, use style.
Parameters
A map of options to pass to the method.
- node - INode
- The node that will be assigned the new style
- style - INodeStyle
- The style instance that will be assigned to the node.
Throws
- Exception({ name: 'ArgumentError' })
node
is not in this graph.
See Also
Implements
Assigns the given style instance by reference to the label.
Remarks
Style instances can be shared.
To query the label style, use style.
Parameters
A map of options to pass to the method.
- label - ILabel
- The label that will be assigned the new style
- style - ILabelStyle
- The style instance that will be assigned to the label.
Throws
- Exception({ name: 'ArgumentError' })
label
is not in this graph.
See Also
Implements
Assigns the given style instance by reference to the edge.
Remarks
Style instances can be shared.
To query the edge style, use style.
Parameters
A map of options to pass to the method.
- edge - IEdge
- The edge that will be assigned the new style
- style - IEdgeStyle
- The style instance that will be assigned to the edge.
Throws
- Exception({ name: 'ArgumentError' })
edge
is not in this graph.
See Also
Implements
Assigns the given style instance by reference to the port.
Remarks
Style instances can be shared.
To query the port style, use style.
Parameters
A map of options to pass to the method.
- port - IPort
- The port that will be assigned the new style
- style - IPortStyle
- The style instance that will be assigned to the port.
Throws
- Exception({ name: 'ArgumentError' })
port
is not in this graph.
See Also
Implements
Enumerates the successors of a given INode.
Remarks
Parameters
A map of options to pass to the method.
- node - INode
- The node.
Returns
- ↪IEnumerable<INode>
- An enumerable over all successors.
Throws
- Exception({ name: 'ArgumentError' })
node
is not in this graph.
See Also
Overrides
Events
Occurs when a bend has been added to an edge in this graph.
Remarks
See Also
Overrides
Event Registration
addBendAddedListener(function(this, ItemEventArgs<IBend>):void)
Event Deregistration
removeBendAddedListener(function(this, ItemEventArgs<IBend>):void)
Signature Details
function(sender: this, evt: ItemEventArgs<IBend>)
Parameters
- sender - this
- The source of the event.
- evt - ItemEventArgs<IBend>
- An object that contains the event data.
Occurs when the location of a bend has been changed.
Remarks
See Also
Overrides
Event Registration
Event Deregistration
Occurs when a bend has been removed from an edge in this graph.
Remarks
This event will be triggered, too, if an edge has been removed from the graph, for each of the bends that belonged to the edge.
This event is intended to provide notification of low level changes in the graph structure. Please use the DeletedItem event if you are interested only in bend removal events that result from user interaction.
See Also
Overrides
Event Registration
addBendRemovedListener(function(this, BendEventArgs):void)
Event Deregistration
removeBendRemovedListener(function(this, BendEventArgs):void)
Signature Details
function(sender: this, evt: BendEventArgs)
Parameters
- sender - this
- The source of the event.
- evt - BendEventArgs
- An object that contains the event data.
Occurs when the tag of a bend has been replaced.
Remarks
See Also
Overrides
Event Registration
addBendTagChangedListener(function(this, ItemChangedEventArgs<IBend,Object>):void)
Event Deregistration
removeBendTagChangedListener(function(this, ItemChangedEventArgs<IBend,Object>):void)
Signature Details
function(sender: this, evt: ItemChangedEventArgs<IBend,Object>)
Parameters
- sender - this
- The source of the event.
- evt - ItemChangedEventArgs<IBend,Object>
- An object that contains the event data.
Occurs when the graph has changed visually and the display should be updated to reflect the changes.
Occurs when an edge has been created.
Remarks
See Also
Overrides
Event Registration
addEdgeCreatedListener(function(this, ItemEventArgs<IEdge>):void)
Event Deregistration
removeEdgeCreatedListener(function(this, ItemEventArgs<IEdge>):void)
Signature Details
function(sender: this, evt: ItemEventArgs<IEdge>)
Parameters
- sender - this
- The source of the event.
- evt - ItemEventArgs<IEdge>
- An object that contains the event data.
Occurs when an edge had its sourcePort or targetPort changed.
Remarks
See Also
Overrides
Event Registration
addEdgePortsChangedListener(function(this, EdgeEventArgs):void)
Event Deregistration
removeEdgePortsChangedListener(function(this, EdgeEventArgs):void)
Signature Details
function(sender: this, evt: EdgeEventArgs)
Parameters
- sender - this
- The source of the event.
- evt - EdgeEventArgs
- An object that contains the event data.
Occurs when an edge has been removed.
Remarks
This event will be triggered, too, prior to a node removal.
This event is intended to provide notification of low level changes in the graph structure. Please use the DeletedItem event if you are interested only in edge removal events that result from user interaction.
See Also
Overrides
Event Registration
addEdgeRemovedListener(function(this, EdgeEventArgs):void)
Event Deregistration
removeEdgeRemovedListener(function(this, EdgeEventArgs):void)
Signature Details
function(sender: this, evt: EdgeEventArgs)
Parameters
- sender - this
- The source of the event.
- evt - EdgeEventArgs
- An object that contains the event data.
Occurs when an edge style has been replaced.
Remarks
See Also
Overrides
Event Registration
addEdgeStyleChangedListener(function(this, ItemChangedEventArgs<IEdge,IEdgeStyle>):void)
Event Deregistration
removeEdgeStyleChangedListener(function(this, ItemChangedEventArgs<IEdge,IEdgeStyle>):void)
Signature Details
function(sender: this, evt: ItemChangedEventArgs<IEdge,IEdgeStyle>)
Parameters
- sender - this
- The source of the event.
- evt - ItemChangedEventArgs<IEdge,IEdgeStyle>
- An object that contains the event data.
Occurs when the tag of an edge has been replaced.
Remarks
See Also
Overrides
Event Registration
addEdgeTagChangedListener(function(this, ItemChangedEventArgs<IEdge,Object>):void)
Event Deregistration
removeEdgeTagChangedListener(function(this, ItemChangedEventArgs<IEdge,Object>):void)
Signature Details
function(sender: this, evt: ItemChangedEventArgs<IEdge,Object>)
Parameters
- sender - this
- The source of the event.
- evt - ItemChangedEventArgs<IEdge,Object>
- An object that contains the event data.
Occurs when the tag of the graph has been replaced.
Remarks
See Also
Overrides
Event Registration
addGraphTagChangedListener(function(this, ItemChangedEventArgs<IGraph,Object>):void)
Event Deregistration
removeGraphTagChangedListener(function(this, ItemChangedEventArgs<IGraph,Object>):void)
Signature Details
function(sender: this, evt: ItemChangedEventArgs<IGraph,Object>)
Parameters
- sender - this
- The source of the event.
- evt - ItemChangedEventArgs<IGraph,Object>
- An object that contains the event data.
Occurs if the group node status of a node has changed.
See Also
Overrides
Event Registration
addIsGroupNodeChangedListener(function(this, NodeEventArgs):void)
Event Deregistration
removeIsGroupNodeChangedListener(function(this, NodeEventArgs):void)
Signature Details
function(sender: this, evt: NodeEventArgs)
Parameters
- sender - this
- The source of the event.
- evt - NodeEventArgs
- An object that contains the event data.
Occurs when a label has been added to this graph instance.
Remarks
See Also
Overrides
Event Registration
addLabelAddedListener(function(this, ItemEventArgs<ILabel>):void)
Event Deregistration
removeLabelAddedListener(function(this, ItemEventArgs<ILabel>):void)
Signature Details
function(sender: this, evt: ItemEventArgs<ILabel>)
Parameters
- sender - this
- The source of the event.
- evt - ItemEventArgs<ILabel>
- An object that contains the event data.
Occurs when the model parameter of a label has been changed.
Remarks
See Also
Overrides
Event Registration
addLabelLayoutParameterChangedListener(function(this, ItemChangedEventArgs<ILabel,ILabelModelParameter>):void)
Event Deregistration
removeLabelLayoutParameterChangedListener(function(this, ItemChangedEventArgs<ILabel,ILabelModelParameter>):void)
Signature Details
function(sender: this, evt: ItemChangedEventArgs<ILabel,ILabelModelParameter>)
Parameters
- sender - this
- The source of the event.
- evt - ItemChangedEventArgs<ILabel,ILabelModelParameter>
- An object that contains the event data.
Occurs when the preferred size of a label has been changed.
Remarks
See Also
Overrides
Event Registration
addLabelPreferredSizeChangedListener(function(this, ItemChangedEventArgs<ILabel,Size>):void)
Event Deregistration
removeLabelPreferredSizeChangedListener(function(this, ItemChangedEventArgs<ILabel,Size>):void)
Signature Details
function(sender: this, evt: ItemChangedEventArgs<ILabel,Size>)
Parameters
- sender - this
- The source of the event.
- evt - ItemChangedEventArgs<ILabel,Size>
- An object that contains the event data.
Occurs when a label has been removed from this graph instance.
Remarks
This event will also be triggered, prior to the removal of the owner of the label.
This event is intended to provide notification of low level changes in the graph structure. Please use the DeletedItem event if you are interested only in label removal events that result from user interaction.
See Also
Overrides
Event Registration
addLabelRemovedListener(function(this, LabelEventArgs):void)
Event Deregistration
removeLabelRemovedListener(function(this, LabelEventArgs):void)
Signature Details
function(sender: this, evt: LabelEventArgs)
Parameters
- sender - this
- The source of the event.
- evt - LabelEventArgs
- An object that contains the event data.
Occurs when a label style has been replaced.
Remarks
See Also
Overrides
Event Registration
addLabelStyleChangedListener(function(this, ItemChangedEventArgs<ILabel,ILabelStyle>):void)
Event Deregistration
removeLabelStyleChangedListener(function(this, ItemChangedEventArgs<ILabel,ILabelStyle>):void)
Signature Details
function(sender: this, evt: ItemChangedEventArgs<ILabel,ILabelStyle>)
Parameters
- sender - this
- The source of the event.
- evt - ItemChangedEventArgs<ILabel,ILabelStyle>
- An object that contains the event data.
Occurs when the tag of a label has been replaced.
Remarks
See Also
Overrides
Event Registration
addLabelTagChangedListener(function(this, ItemChangedEventArgs<ILabel,Object>):void)
Event Deregistration
removeLabelTagChangedListener(function(this, ItemChangedEventArgs<ILabel,Object>):void)
Signature Details
function(sender: this, evt: ItemChangedEventArgs<ILabel,Object>)
Parameters
- sender - this
- The source of the event.
- evt - ItemChangedEventArgs<ILabel,Object>
- An object that contains the event data.
Occurs when the text of a label has been changed.
Remarks
See Also
Overrides
Event Registration
addLabelTextChangedListener(function(this, ItemChangedEventArgs<ILabel,string>):void)
Event Deregistration
removeLabelTextChangedListener(function(this, ItemChangedEventArgs<ILabel,string>):void)
Signature Details
function(sender: this, evt: ItemChangedEventArgs<ILabel,string>)
Parameters
- sender - this
- The source of the event.
- evt - ItemChangedEventArgs<ILabel,string>
- An object that contains the event data.
Occurs when a node has been created.
Remarks
See Also
Overrides
Event Registration
addNodeCreatedListener(function(this, ItemEventArgs<INode>):void)
Event Deregistration
removeNodeCreatedListener(function(this, ItemEventArgs<INode>):void)
Signature Details
function(sender: this, evt: ItemEventArgs<INode>)
Parameters
- sender - this
- The source of the event.
- evt - ItemEventArgs<INode>
- An object that contains the event data.
Occurs when a node layout has been changed.
Remarks
See Also
Overrides
Event Registration
Event Deregistration
Occurs when a node has been removed.
Remarks
See Also
Overrides
Event Registration
addNodeRemovedListener(function(this, NodeEventArgs):void)
Event Deregistration
removeNodeRemovedListener(function(this, NodeEventArgs):void)
Signature Details
function(sender: this, evt: NodeEventArgs)
Parameters
- sender - this
- The source of the event.
- evt - NodeEventArgs
- An object that contains the event data.
Occurs when a node style has been replaced.
Remarks
See Also
Overrides
Event Registration
addNodeStyleChangedListener(function(this, ItemChangedEventArgs<INode,INodeStyle>):void)
Event Deregistration
removeNodeStyleChangedListener(function(this, ItemChangedEventArgs<INode,INodeStyle>):void)
Signature Details
function(sender: this, evt: ItemChangedEventArgs<INode,INodeStyle>)
Parameters
- sender - this
- The source of the event.
- evt - ItemChangedEventArgs<INode,INodeStyle>
- An object that contains the event data.
Occurs when the tag of a node has been replaced.
Remarks
See Also
Overrides
Event Registration
addNodeTagChangedListener(function(this, ItemChangedEventArgs<INode,Object>):void)
Event Deregistration
removeNodeTagChangedListener(function(this, ItemChangedEventArgs<INode,Object>):void)
Signature Details
function(sender: this, evt: ItemChangedEventArgs<INode,Object>)
Parameters
- sender - this
- The source of the event.
- evt - ItemChangedEventArgs<INode,Object>
- An object that contains the event data.
Occurs if a node has been reparented in the model.
See Also
Overrides
Event Registration
addParentChangedListener(function(this, NodeEventArgs):void)
Event Deregistration
removeParentChangedListener(function(this, NodeEventArgs):void)
Signature Details
function(sender: this, evt: NodeEventArgs)
Parameters
- sender - this
- The source of the event.
- evt - NodeEventArgs
- An object that contains the event data.
Occurs when a port has been added to this graph instance.
Remarks
See Also
Overrides
Event Registration
addPortAddedListener(function(this, ItemEventArgs<IPort>):void)
Event Deregistration
removePortAddedListener(function(this, ItemEventArgs<IPort>):void)
Signature Details
function(sender: this, evt: ItemEventArgs<IPort>)
Parameters
- sender - this
- The source of the event.
- evt - ItemEventArgs<IPort>
- An object that contains the event data.
Occurs when the location model parameter of a port has been changed.
Remarks
See Also
Overrides
Event Registration
addPortLocationParameterChangedListener(function(this, ItemChangedEventArgs<IPort,IPortLocationModelParameter>):void)
Event Deregistration
removePortLocationParameterChangedListener(function(this, ItemChangedEventArgs<IPort,IPortLocationModelParameter>):void)
Signature Details
function(sender: this, evt: ItemChangedEventArgs<IPort,IPortLocationModelParameter>)
Parameters
- sender - this
- The source of the event.
- evt - ItemChangedEventArgs<IPort,IPortLocationModelParameter>
- An object that contains the event data.
Occurs when a port has been removed from its owner.
Remarks
This event will also be triggered prior to the removal of the corresponding owner of the port.
This event is intended to provide notification of low level changes in the graph structure. Please use the DeletedItem event if you are interested only in port removal events that result from user interaction.
See Also
Overrides
Event Registration
addPortRemovedListener(function(this, PortEventArgs):void)
Event Deregistration
removePortRemovedListener(function(this, PortEventArgs):void)
Signature Details
function(sender: this, evt: PortEventArgs)
Parameters
- sender - this
- The source of the event.
- evt - PortEventArgs
- An object that contains the event data.
Occurs when a port style has been replaced.
Remarks
See Also
Overrides
Event Registration
addPortStyleChangedListener(function(this, ItemChangedEventArgs<IPort,IPortStyle>):void)
Event Deregistration
removePortStyleChangedListener(function(this, ItemChangedEventArgs<IPort,IPortStyle>):void)
Signature Details
function(sender: this, evt: ItemChangedEventArgs<IPort,IPortStyle>)
Parameters
- sender - this
- The source of the event.
- evt - ItemChangedEventArgs<IPort,IPortStyle>
- An object that contains the event data.
Occurs when the tag of a port has been replaced.
Remarks
See Also
Overrides
Event Registration
addPortTagChangedListener(function(this, ItemChangedEventArgs<IPort,Object>):void)
Event Deregistration
removePortTagChangedListener(function(this, ItemChangedEventArgs<IPort,Object>):void)
Signature Details
function(sender: this, evt: ItemChangedEventArgs<IPort,Object>)
Parameters
- sender - this
- The source of the event.
- evt - ItemChangedEventArgs<IPort,Object>
- An object that contains the event data.