Class UniversalGraph<N,E>
java.lang.Object
org.netbeans.api.visual.graph.layout.UniversalGraph<N,E>
This interface represents an universal graph.
It unifies a view on a GraphScene and GraphPinScene as a nodes-edges only graph.
This is commonly used by graph-oriented layout algorithms.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Collection
<E> findNodeEdges
(N node, boolean allowsOutputEdges, boolean allowsInputEdges) Returns edges that are attached to a specified node.abstract Collection
<E> getEdges()
Returns a collection of edges in the graph.abstract N
getEdgeSource
(E edge) Returns an edge source.abstract N
getEdgeTarget
(E edge) Returns an edge target.abstract Collection
<N> getNodes()
Returns a collection of nodes in the graph.abstract ObjectScene
getScene()
Returns a related scene as a ObjectScene.
-
Constructor Details
-
UniversalGraph
public UniversalGraph()
-
-
Method Details
-
getScene
Returns a related scene as a ObjectScene.- Returns:
- the related scene which is represented by the universal graph.
-
getNodes
Returns a collection of nodes in the graph.- Returns:
- the collection of nodes
-
getEdges
Returns a collection of edges in the graph.- Returns:
- the collection of edges
-
findNodeEdges
public abstract Collection<E> findNodeEdges(N node, boolean allowsOutputEdges, boolean allowsInputEdges) Returns edges that are attached to a specified node.- Parameters:
node
- the nodeallowsOutputEdges
- if true then it finds all edges that has the node as their sourceallowsInputEdges
- if true then it finds all edges that has the node as their target- Returns:
- the collection of all found edges
-
getEdgeSource
-
getEdgeTarget
-