public abstract class LayoutDecorator<V,E> extends 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.
|
Graph<V,E> |
getGraph()
Returns the full graph (the one that was passed in at
construction time) that this Layout refers to.
|
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(Graph<V,E> graph)
setter for graph
|
void |
setInitializer(org.apache.commons.collections4.Transformer<V,Point2D> initializer)
provides initial locations for all vertices.
|
void |
setLocation(V v,
Point2D location)
set the location of a vertex
|
void |
setSize(Dimension d) |
void |
step()
Advances one step.
|
Point2D |
transform(V v) |
public void step()
IterativeContext
step
in interface IterativeContext
IterativeContext.done()
public void initialize()
Layout
initialize
in interface Layout<V,E>
Layout.initialize()
public void setInitializer(org.apache.commons.collections4.Transformer<V,Point2D> initializer)
Layout
setInitializer
in interface Layout<V,E>
initializer
- Layout.setInitializer(org.apache.commons.collections4.Transformer)
public void setLocation(V v, Point2D location)
Layout
setLocation
in interface Layout<V,E>
v
- location
- Layout.setLocation(java.lang.Object, java.awt.geom.Point2D)
public Dimension getSize()
Layout
getSize
in interface Layout<V,E>
Layout.getSize()
public Graph<V,E> getGraph()
Layout
getGraph
in interface Layout<V,E>
Layout.getGraph()
public boolean done()
IterativeContext
done
in interface IterativeContext
IterativeContext.done()
public void lock(V v, boolean state)
Layout
lock
in interface Layout<V,E>
v
- vertexLayout.lock(Object, boolean)
public boolean isLocked(V v)
Layout
true
if the position of vertex v
is locked.isLocked
in interface Layout<V,E>
Layout.isLocked(Object)
public void setSize(Dimension d)
setSize
in interface Layout<V,E>
Layout.setSize(Dimension)
public void reset()
reset
in interface Layout<V,E>
Layout.reset()
Copyright © 2015. All rights reserved.