| Package | com.yworks.graph.model |
| Class | public class FilteredGraphWrapper |
| Inheritance | FilteredGraphWrapper AbstractGraphWrapper flash.events.EventDispatcher |
IGraph
that represents a subset of the wrapped graph instance.
Note that this instance will register listeners with the wrapped graph, so
dispose() should be called if this instance is not used any more.
This implementation supports the filtering of grouped graphs.
See also
| Property | Defined By | ||
|---|---|---|---|
| bends : ICollectionModel [override] [read-only]
| FilteredGraphWrapper | ||
| collectionModel : ICollectionModel [override] [read-only]
| FilteredGraphWrapper | ||
![]() | 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 [override] [read-only]
| FilteredGraphWrapper | ||
| edgePredicate : Function [read-only]
The predicate function for the edges. | FilteredGraphWrapper | ||
| edges : ICollectionModel [override] [read-only]
| FilteredGraphWrapper | ||
![]() | mapperRegistry : IMapperRegistry [read-only]
A registry that can be used to store and retrieve arbitrary information for items in this graph. | AbstractGraphWrapper | |
| nodeLabels : ICollectionModel [override] [read-only]
| FilteredGraphWrapper | ||
| nodePredicate : Function [read-only]
The predicate function for the nodes. | FilteredGraphWrapper | ||
| nodes : ICollectionModel [override] [read-only]
| FilteredGraphWrapper | ||
| ports : ICollectionModel [override] [read-only]
| FilteredGraphWrapper | ||
| wrappedGraph : IGraph [read-only]
Returns the wrapped graph instance that was
passed upon creation of this instance. | FilteredGraphWrapper | ||
| Method | Defined By | ||
|---|---|---|---|
FilteredGraphWrapper(graph:IGraph, nodePredicate:Function, edgePredicate:Function)
Creates a new graph instance that wraps the original graph
and uses the passed predicate functions to determine which nodes and edges
should be contained in the graph. | FilteredGraphWrapper | ||
![]() |
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 | |
![]() |
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 [override]
Returns true if this collection contains the specified element. | FilteredGraphWrapper | ||
![]() |
Creates and returns an edge that connects to the given port instances. | AbstractGraphWrapper | |
![]() |
Convenience method that creates and returns an edge that connects to the given node instances using the
given style instance. | AbstractGraphWrapper | |
![]() |
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 [override]
Disposes this instance. | FilteredGraphWrapper | ||
edgePredicateChanged():void
Should be called by the client if the edge predicate function
changed for the edges in the graph. | FilteredGraphWrapper | ||
edgePredicateChangedForEdge(edge:IEdge):void
Should be called by clients if the edge predicate function
changed for the given edge. | FilteredGraphWrapper | ||
[override]
| FilteredGraphWrapper | ||
[override]
| FilteredGraphWrapper | ||
![]() |
Gets the lookup instance to use in lookup()
| AbstractGraphWrapper | |
![]() | invalidateDisplays():void
Causes the displaysInvalidated event to be triggered. | AbstractGraphWrapper | |
lookup(type:Class):Object [override]
| FilteredGraphWrapper | ||
nodePredicateChanged():void
Should be called by the client if the node predicate function
changed for the nodes in the graph. | FilteredGraphWrapper | ||
nodePredicateChangedForNode(node:INode):void
Should be called by clients if the node predicate function
changed for the given node. | FilteredGraphWrapper | ||
![]() | 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 | |
![]() |
Sets the bounds of the given node to the new values. | AbstractGraphWrapper | |
![]() |
Assigns the given style instance by reference to the edge. | AbstractGraphWrapper | |
![]() |
Sets the label model parameter for the given label. | AbstractGraphWrapper | |
![]() |
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 | |
![]() |
Sets the lookup instance to use in lookup()
| AbstractGraphWrapper | |
![]() |
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 | |
![]() |
Sets the ports of the given edge to the new values. | AbstractGraphWrapper | |
![]() |
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 | |
| bends | property |
bends:ICollectionModel [read-only] [override]
public function get bends():ICollectionModel| collectionModel | property |
collectionModel:ICollectionModel [read-only] [override]
public function get collectionModel():ICollectionModel| edgeLabels | property |
edgeLabels:ICollectionModel [read-only] [override]
public function get edgeLabels():ICollectionModel| edgePredicate | property |
edgePredicate:Function [read-only] The predicate function for the edges. The signature of this function should be:
function (edge:IEdge):Edge
public function get edgePredicate():Function| edges | property |
edges:ICollectionModel [read-only] [override]
public function get edges():ICollectionModel| nodeLabels | property |
nodeLabels:ICollectionModel [read-only] [override]
public function get nodeLabels():ICollectionModel| nodePredicate | property |
nodePredicate:Function [read-only] The predicate function for the nodes. The signature of this function should be:
function (node:INode):Boolean
public function get nodePredicate():Function| nodes | property |
nodes:ICollectionModel [read-only] [override]
public function get nodes():ICollectionModel| ports | property |
ports:ICollectionModel [read-only] [override]
public function get ports():ICollectionModel| wrappedGraph | property |
wrappedGraph:IGraph [read-only] Returns the wrapped graph instance that was passed upon creation of this instance.
public function get wrappedGraph():IGraph| FilteredGraphWrapper | () | Constructor |
public function FilteredGraphWrapper(graph:IGraph, nodePredicate:Function, edgePredicate:Function)Creates a new graph instance that wraps the original graph and uses the passed predicate functions to determine which nodes and edges should be contained in the graph.
Note that this instance will register listeners with the wrapped graph, so
dispose() should be called if this instance is not used any more.
graph:IGraph — The graph to wrap
| |
nodePredicate:Function — The predicate function that determines which nodes to keep.
A function with the signature function( node:INode):Boolean which returns
true if the node should be contained in the graph.
| |
edgePredicate:Function — The predicate function that determines which edges to keep.
A function with the signature function( edge:INode):Boolean which returns
true if the edge should be contained in the graph.
|
See also
| contains | () | method |
override public function contains(item:IModelItem):BooleanReturns true if this collection contains the specified element.
Parameters
item:IModelItem — element whose presence in this collection is to be tested
|
Boolean — true if this collection contains the specified element
|
| dispatchSingleItemEvents | () | method |
yworks_internal function dispatchSingleItemEvents(dispatcher:Function, origEvt:CollectionEvent, kind:String):voidParameters
dispatcher:Function | |
origEvt:CollectionEvent | |
kind:String |
| dispose | () | method |
override public function dispose():voidDisposes this instance.
| edgePredicateChanged | () | method |
public function edgePredicateChanged():voidShould be called by the client if the edge predicate function changed for the edges in the graph.
| edgePredicateChangedForEdge | () | method |
public function edgePredicateChangedForEdge(edge:IEdge):voidShould be called by clients if the edge predicate function changed for the given edge.
Parameters
edge:IEdge — The edge.
|
See also
| edgesAtPort | () | method |
| edgesAtPortOwner | () | method |
override public function edgesAtPortOwner(portOwner:IPortOwner):Iterable
Parameters
portOwner:IPortOwner |
Iterable |
| lookup | () | method |
override public function lookup(type:Class):Object
Parameters
type:Class |
Object |
| nodePredicateChanged | () | method |
public function nodePredicateChanged():voidShould be called by the client if the node predicate function changed for the nodes in the graph.
| nodePredicateChangedForNode | () | method |
public function nodePredicateChangedForNode(node:INode):voidShould be called by clients if the node predicate function changed for the given node.
Parameters
node:INode — The node.
|
See also