站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

UniversalGraph (Visual Library API) - NetBeans API Javadoc (Current Development Version)

org.netbeans.api.visual 2.2

org.netbeans.api.visual.graph.layout
Class UniversalGraph<N,E>

java.lang.Object
  extended by org.netbeans.api.visual.graph.layout.UniversalGraph<N,E>

public abstract class UniversalGraph<N,E>
extends Object

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
UniversalGraph()
           
 
Method Summary
abstract  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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UniversalGraph

public UniversalGraph()
Method Detail

getScene

public abstract ObjectScene getScene()
Returns a related scene as a ObjectScene.

Returns:
the related scene which is represented by the universal graph.

getNodes

public abstract Collection<N> getNodes()
Returns a collection of nodes in the graph.

Returns:
the collection of nodes

getEdges

public abstract Collection<E> 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 node
allowsOutputEdges - if true then it finds all edges that has the node as their source
allowsInputEdges - if true then it finds all edges that has the node as their target
Returns:
the collection of all found edges

getEdgeSource

public abstract N getEdgeSource(E edge)
Returns an edge source.

Parameters:
edge - the edge
Returns:
the edge source

getEdgeTarget

public abstract N getEdgeTarget(E edge)
Returns an edge target.

Parameters:
edge - the edge
Returns:
the edge target

org.netbeans.api.visual 2.2

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.