N
- The type of the Nodes in the graph, which must implement PositionableNodeE
- The type of the Edges in the graphpublic abstract class Layout<N extends PositionableNode,E>
extends java.lang.Object
new Layout l = Layout.factory ("layout_name", graph, bound_dimension, 10);
while (l.layout (time_passed));
<do whatever other work>
In order to be able to apply a layout algorithm to a graph, the graph's N-type
nodes must implement the PositionableNode
interface.
Constructor and Description |
---|
Layout(Graph<N,E> graph,
java.awt.Dimension bound) |
Layout(Graph<N,E> graph,
java.awt.Dimension bound,
int maxiterations) |
Modifier and Type | Method and Description |
---|---|
static <N extends PositionableNode,L> |
factory(java.lang.String algname,
Graph<N,L> graph,
java.awt.Dimension bound,
int maxiterations) |
static boolean |
isaLayout(java.lang.String name)
Query whether the given string is an implemented layout algorithm.
|
boolean |
layout(float interval)
returns true if layout can still change.
|
int |
maxiterations() |
Layout<N,E> |
maxiterations(int maxiterations) |
public int maxiterations()
public boolean layout(float interval)
public static boolean isaLayout(java.lang.String name)
name
- Layout algorith namepublic static final <N extends PositionableNode,L> Layout<N,L> factory(java.lang.String algname, Graph<N,L> graph, java.awt.Dimension bound, int maxiterations)