V - The vertex typeE - The edge typepublic class Layouter<V extends Vertex,E extends Edge<V>>
extends java.lang.Object
| Constructor and Description |
|---|
Layouter()
Constructs the layouter without populating list of edges and vertices
|
Layouter(java.util.List<V> vertices,
java.util.List<E> edges,
LayoutAlgorithms algorithm)
Constructs the layouter and sets lists of vertices and edges, as well
as the layout algorithm which should be used
|
Layouter(java.util.List<V> vertices,
java.util.List<E> edges,
LayoutAlgorithms algorithm,
GraphLayoutProperties layoutProperties)
Constructs the layouter and sets lists of vertices and edges, as well
as the layout algorithm which should be used and its properties
|
| Modifier and Type | Method and Description |
|---|---|
LayoutAlgorithms |
getAlgorithm() |
java.util.List<E> |
getEdges() |
GraphLayoutProperties |
getLayoutProperties() |
java.util.List<V> |
getVertices() |
Drawing<V,E> |
layout()
Lays out the graph and returns an instance of the drawing object
|
void |
setAlgorithm(LayoutAlgorithms algorithm) |
void |
setEdges(java.util.List<E> edges) |
void |
setLayoutProperties(GraphLayoutProperties layoutProperties) |
void |
setVertices(java.util.List<V> vertices) |
public Layouter()
public Layouter(java.util.List<V> vertices, java.util.List<E> edges, LayoutAlgorithms algorithm)
vertices - A list of verticesedges - A list of edgesalgorithm - Layout algorithmpublic Layouter(java.util.List<V> vertices, java.util.List<E> edges, LayoutAlgorithms algorithm, GraphLayoutProperties layoutProperties)
vertices - A list of verticesedges - A list of edgesalgorithm - Layout algorithmlayoutProperties - Algorithm's proeprtiespublic Drawing<V,E> layout() throws CannotBeAppliedException
CannotBeAppliedException - If the specified layout algorithm cannot be appliedpublic java.util.List<E> getEdges()
public void setEdges(java.util.List<E> edges)
edges - the edges to setpublic java.util.List<V> getVertices()
public void setVertices(java.util.List<V> vertices)
vertices - the vertices to setpublic LayoutAlgorithms getAlgorithm()
public void setAlgorithm(LayoutAlgorithms algorithm)
algorithm - the algorithm to setpublic GraphLayoutProperties getLayoutProperties()
public void setLayoutProperties(GraphLayoutProperties layoutProperties)
layoutProperties - properties of the layout algorithm to set