public abstract class LayoutDecorator<V,E> extends java.lang.Object implements Layout<V,E>, IterativeContext
| Constructor and Description |
|---|
LayoutDecorator(Layout<V,E> delegate)
Creates an instance backed by the specified delegate layout.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
done()
Returns true if this iterative process is finished, and false otherwise.
|
Layout<V,E> |
getDelegate()
Returns the backing (delegate) layout.
|
edu.uci.ics.jung.graph.Graph<V,E> |
getGraph()
Returns the full graph (the one that was passed in at
construction time) that this Layout refers to.
|
java.awt.Dimension |
getSize()
Returns the current size of the visualization's space.
|
void |
initialize()
Initializes fields in the node that may not have
been set during the constructor.
|
boolean |
isLocked(V v)
Returns
true if the position of vertex v
is locked. |
void |
lock(V v,
boolean state)
Sets a flag which fixes this vertex in place.
|
void |
reset() |
void |
setDelegate(Layout<V,E> delegate)
Sets the backing (delegate) layout.
|
void |
setGraph(edu.uci.ics.jung.graph.Graph<V,E> graph)
setter for graph
|
void |
setInitializer(org.apache.commons.collections4.Transformer<V,java.awt.geom.Point2D> initializer)
provides initial locations for all vertices.
|
void |
setLocation(V v,
java.awt.geom.Point2D location)
set the location of a vertex
|
void |
setSize(java.awt.Dimension d) |
void |
step()
Advances one step.
|
java.awt.geom.Point2D |
transform(V v) |
public void step()
IterativeContextstep in interface IterativeContextIterativeContext.done()public void initialize()
Layoutinitialize in interface Layout<V,E>Layout.initialize()public void setInitializer(org.apache.commons.collections4.Transformer<V,java.awt.geom.Point2D> initializer)
LayoutsetInitializer in interface Layout<V,E>initializer - Layout.setInitializer(org.apache.commons.collections4.Transformer)public void setLocation(V v, java.awt.geom.Point2D location)
LayoutsetLocation in interface Layout<V,E>v - location - Layout.setLocation(java.lang.Object, java.awt.geom.Point2D)public java.awt.Dimension getSize()
LayoutgetSize in interface Layout<V,E>Layout.getSize()public edu.uci.ics.jung.graph.Graph<V,E> getGraph()
LayoutgetGraph in interface Layout<V,E>Layout.getGraph()public java.awt.geom.Point2D transform(V v)
transform in interface org.apache.commons.collections4.Transformer<V,java.awt.geom.Point2D>Transformer.transform(Object)public boolean done()
IterativeContextdone in interface IterativeContextIterativeContext.done()public void lock(V v, boolean state)
Layoutlock in interface Layout<V,E>v - vertexLayout.lock(Object, boolean)public boolean isLocked(V v)
Layouttrue if the position of vertex v
is locked.isLocked in interface Layout<V,E>Layout.isLocked(Object)public void setSize(java.awt.Dimension d)
setSize in interface Layout<V,E>Layout.setSize(Dimension)public void reset()
reset in interface Layout<V,E>Layout.reset()