| Package | com.yworks.graph.model |
| Class | public class GraphObstacleProvider |
| Inheritance | GraphObstacleProvider Object |
| Implements | IObstacleProvider |
IObstacleProvider
that will use the edges and nodes collections
of an IGraph from the IPaintContext.
This class can be used to add bridge support via the BridgeManager
to a rendered IGraph.
See also
| Property | Defined By | ||
|---|---|---|---|
| queryEdges : Boolean
Whether to query the edges for an
IObstacleProvider implementation. | GraphObstacleProvider | ||
| queryNodes : Boolean
Whether to query the nodes for an
IObstacleProvider implementation. | GraphObstacleProvider | ||
| Method | Defined By | ||
|---|---|---|---|
Iterates over all edges and nodes to query
an IObstacleProvider from the IModelItem's lookup. | GraphObstacleProvider | ||
| Method | Defined By | ||
|---|---|---|---|
Helper method that retrieves the IGraph to use from the canvasContext. | GraphObstacleProvider | ||
| queryEdges | property |
queryEdges:Boolean
Whether to query the edges for an
IObstacleProvider implementation.
true if edges should be queried at all; otherwise, false.
The default value is true.
public function get queryEdges():Boolean public function set queryEdges(value:Boolean):void| queryNodes | property |
queryNodes:Boolean
Whether to query the nodes for an
IObstacleProvider implementation.
true if nodes should be queried at all; otherwise, false.
The default value is false.
public function get queryNodes():Boolean public function set queryNodes(value:Boolean):void| getGraph | () | method |
protected function getGraph(canvasContext:IPaintContext):IGraph
Helper method that retrieves the IGraph to use from the canvasContext.
This implementation uses the lookup of the IPaintContext.canvasComponent
to query the IGraph implementation.
Parameters
canvasContext:IPaintContext — The context to retrieve the implementation from.
|
IGraph — The IGraph instance to query or null.
|
| getObstacles | () | method |
public function getObstacles(canvasContext:IPaintContext):GeneralPath
Iterates over all edges and nodes to query
an IObstacleProvider from the IModelItem's lookup.
This method will depending on the queryEdges and queryNodes
property query the items for an implementation of IObstacleProvider
and concatenate all resulting GeneralPath obstacles into one path that
will then be returned.
Parameters
canvasContext:IPaintContext — The context where the obstacles are queried for.
|
GeneralPath — A path that is the concatenated path of all obstacles for the given context.
|