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

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

org.netbeans.api.visual 2.2

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

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

public class TreeGraphLayout<N,E>
extends Object

This class supplies the tree graph-oriented layout for a GraphScene.


Constructor Summary
TreeGraphLayout(GraphScene<N,E> scene, int originX, int originY, int verticalGap, int horizontalGap, boolean vertical)
          Creates a graph-oriented tree layout.
 
Method Summary
 void layout(N rootNode)
          Invokes the layout for a specified root node.
protected  Collection<N> resolveChildren(N node)
          Collects a collection of children nodes of a specified node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeGraphLayout

public TreeGraphLayout(GraphScene<N,E> scene,
                       int originX,
                       int originY,
                       int verticalGap,
                       int horizontalGap,
                       boolean vertical)
Creates a graph-oriented tree layout.

Parameters:
scene - the GraphScene where the layout is used
originX - the x-axis origin
originY - the y-axis origin
verticalGap - the vertical gap between cells
horizontalGap - the horizontal gap between cells
vertical - if true, then layout organizes the graph vertically; if false, then horizontally
Method Detail

layout

public final void layout(N rootNode)
Invokes the layout for a specified root node.

Parameters:
rootNode - the root node

resolveChildren

protected Collection<N> resolveChildren(N node)
Collects a collection of children nodes of a specified node.

Parameters:
node - the node
Returns:
the collection of children

org.netbeans.api.visual 2.2

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