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 . |
Modifier and Type | Method and Description |
---|---|
boolean |
done() |
Layout<V,E> |
getDelegate() |
Graph<V,E> |
getGraph() |
Dimension |
getSize() |
void |
initialize()
Initializes fields in the node that may not have
been set during the constructor.
|
boolean |
isLocked(V v) |
void |
lock(V v,
boolean state)
Locks or unlocks the specified vertex.
|
void |
reset() |
void |
setDelegate(Layout<V,E> delegate) |
void |
setGraph(Graph<V,E> graph) |
void |
setInitializer(com.google.common.base.Function<V,Point2D> initializer) |
void |
setLocation(V v,
Point2D location)
Changes the layout coordinates of
v to location . |
void |
setSize(Dimension d) |
void |
step()
Advances one step.
|
Point2D |
transform(V v) |
public void step()
IterativeContext
step
in interface IterativeContext
public void initialize()
Layout
initialize
in interface Layout<V,E>
public void setInitializer(com.google.common.base.Function<V,Point2D> initializer)
setInitializer
in interface Layout<V,E>
initializer
- a function that specifies initial locations for all verticespublic void setLocation(V v, Point2D location)
Layout
v
to location
.setLocation
in interface Layout<V,E>
v
- the vertex whose location is to be specifiedlocation
- the coordinates of the specified locationpublic Dimension getSize()
public boolean done()
done
in interface IterativeContext
true
if this iterative process is finished, and false
otherwise.public void lock(V v, boolean state)
Layout
public boolean isLocked(V v)
public void setSize(Dimension d)
Copyright © 2015. All rights reserved.