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.
|
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(Graph<V,E> graph)
setter for graph
|
void |
setInitializer(org.apache.commons.collections15.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 IterativeContextpublic void initialize()
Layoutinitialize in interface Layout<V,E>public void setInitializer(org.apache.commons.collections15.Transformer<V,java.awt.geom.Point2D> initializer)
LayoutsetInitializer in interface Layout<V,E>initializer - public void setLocation(V v, java.awt.geom.Point2D location)
LayoutsetLocation in interface Layout<V,E>v - location - public java.awt.Dimension getSize()
Layoutpublic Graph<V,E> getGraph()
Layoutpublic java.awt.geom.Point2D transform(V v)
transform in interface org.apache.commons.collections15.Transformer<V,java.awt.geom.Point2D>public boolean done()
IterativeContextdone in interface IterativeContextpublic void lock(V v, boolean state)
Layoutpublic boolean isLocked(V v)
Layouttrue if the position of vertex v
is locked.Copyright © 2021, 2022 Herve Girod. All Rights Reserved. Documentation and source under the BSD 3-Clause licence