|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.uci.ics.jung.algorithms.layout.AggregateLayout<V,E>
V
- the vertex typeE
- the edge typepublic class AggregateLayout<V,E>
A Layout
implementation that combines
multiple other layouts so that they may be manipulated
as one layout. The relaxer thread will step each layout
in sequence.
Field Summary | |
---|---|
protected Layout<V,E> |
delegate
|
protected Map<Layout<V,E>,Point2D> |
layouts
|
Constructor Summary | |
---|---|
AggregateLayout(Layout<V,E> delegate)
Creates an instance backed by the specified delegate . |
Method Summary | |
---|---|
boolean |
done()
Check all sublayouts.keySet() and the delegate layout, returning done == true iff all are done. |
Point2D |
get(Layout<V,E> layout)
Returns the center of the passed layout. |
Layout<V,E> |
getDelegate()
|
Graph<V,E> |
getGraph()
Returns the graph for which this layout is defined. |
Map<Layout<V,E>,Point2D> |
getLayouts()
Returns a map from each Layout instance to its center point. |
Dimension |
getSize()
Returns the size of the underlying layout. |
void |
initialize()
Initializes fields in the node that may not have been set during the constructor. |
boolean |
isLocked(V v)
Override to test if the passed vertex is locked in any of the layouts. |
void |
lock(V v,
boolean state)
override to lock or unlock this vertex in any layout with a subgraph containing it |
void |
put(Layout<V,E> layout,
Point2D center)
adds the passed layout as a sublayout, also specifying the center of where this sublayout should appear |
void |
remove(Layout<V,E> layout)
Removes layout from this instance. |
void |
removeAll()
Removes all layouts from this instance. |
void |
reset()
|
void |
setDelegate(Layout<V,E> delegate)
|
void |
setGraph(Graph<V,E> graph)
setter for graph |
void |
setInitializer(org.apache.commons.collections15.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()
call step on any sublayout that is also an IterativeContext and is not done |
Point2D |
transform(V v)
Returns the location of the vertex. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Layout<V,E> delegate
protected Map<Layout<V,E>,Point2D> layouts
Constructor Detail |
---|
public AggregateLayout(Layout<V,E> delegate)
delegate
.
delegate
- Method Detail |
---|
public Layout<V,E> getDelegate()
public void setDelegate(Layout<V,E> delegate)
delegate
- the delegate to setpublic void put(Layout<V,E> layout, Point2D center)
layout
- center
- public Point2D get(Layout<V,E> layout)
layout
-
public void remove(Layout<V,E> layout)
layout
from this instance.
public void removeAll()
public Graph<V,E> getGraph()
getGraph
in interface Layout<V,E>
Layout.getGraph()
public Dimension getSize()
getSize
in interface Layout<V,E>
Layout.getSize()
public void initialize()
Layout
initialize
in interface Layout<V,E>
Layout.initialize()
public boolean isLocked(V v)
isLocked
in interface Layout<V,E>
v
-
Layout.isLocked(java.lang.Object)
public void lock(V v, boolean state)
lock
in interface Layout<V,E>
v
- state
- Layout.lock(java.lang.Object, boolean)
public void reset()
reset
in interface Layout<V,E>
Layout.reset()
public void setGraph(Graph<V,E> graph)
Layout
setGraph
in interface Layout<V,E>
graph
- Layout.setGraph(edu.uci.ics.jung.graph.Graph)
public void setInitializer(org.apache.commons.collections15.Transformer<V,Point2D> initializer)
Layout
setInitializer
in interface Layout<V,E>
initializer
- Layout.setInitializer(org.apache.commons.collections15.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 void setSize(Dimension d)
setSize
in interface Layout<V,E>
d
- Layout.setSize(java.awt.Dimension)
public Map<Layout<V,E>,Point2D> getLayouts()
Layout
instance to its center point.
public Point2D transform(V v)
transform
in interface org.apache.commons.collections15.Transformer<V,Point2D>
Transformer.transform(java.lang.Object)
public boolean done()
done
in interface IterativeContext
public void step()
step
in interface IterativeContext
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |