public class TreeGraphLayout<N,E> extends GraphLayout
| Constructor | Description |
|---|---|
TreeGraphLayout(GraphScene<N,E> scene,
int originX,
int originY,
int verticalGap,
int horizontalGap,
boolean vertical) |
Creates a graph-oriented tree layout.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
layout(N rootNode) |
Invokes the layout for a specified root node.
|
protected void |
performGraphLayout(UniversalGraph graph) |
Implements and performs particular graph-oriented algorithm of a UniversalGraph.
|
protected void |
performNodesLayout(UniversalGraph graph,
java.util.Collection nodes) |
Implements and performs particular location resolution of a collection of nodes in a UniversalGraph.
|
protected java.util.Collection<N> |
resolveChildren(N node) |
Collects a collection of children nodes of a specified node.
|
addGraphLayoutListener, isAnimated, layoutGraph, layoutGraph, layoutNodes, layoutNodes, removeGraphLayoutListener, setAnimated, setResolvedNodeLocationpublic TreeGraphLayout(GraphScene<N,E> scene, int originX, int originY, int verticalGap, int horizontalGap, boolean vertical)
scene - the GraphScene where the layout is usedoriginX - the x-axis originoriginY - the y-axis originverticalGap - the vertical gap between cellshorizontalGap - the horizontal gap between cellsvertical - if true, then layout organizes the graph vertically; if false, then horizontallypublic final void layout(N rootNode)
rootNode - the root nodeprotected java.util.Collection<N> resolveChildren(N node)
node - the nodeprotected void performGraphLayout(UniversalGraph graph)
GraphLayoutGraphLayout.setResolvedNodeLocation method for setting the resolved node location.performGraphLayout in class GraphLayoutgraph - the universal graph on which the layout should be performedprotected void performNodesLayout(UniversalGraph graph, java.util.Collection nodes)
GraphLayoutGraphLayout.setResolvedNodeLocation method for setting the resolved node location.performNodesLayout in class GraphLayoutgraph - the universal graph on which the nodes should be resolvednodes - the collection of nodes to be resolvedBuilt on April 24 2018. | Portions Copyright 1997-2018 Oracle. All rights reserved.