|
||||||||||
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.TreeLayout<V,E>
public class TreeLayout<V,E>
Field Summary | |
---|---|
protected Set<V> |
alreadyDone
|
protected Map<V,Integer> |
basePositions
|
static int |
DEFAULT_DISTX
The default horizontal vertex spacing. |
static int |
DEFAULT_DISTY
The default vertical vertex spacing. |
protected int |
distX
The horizontal vertex spacing. |
protected int |
distY
The vertical vertex spacing. |
protected Forest<V,E> |
graph
|
protected Map<V,Point2D> |
locations
|
protected Point |
m_currentPoint
|
protected Dimension |
size
|
Constructor Summary | |
---|---|
TreeLayout(Forest<V,E> g)
Creates an instance for the specified graph with default X and Y distances. |
|
TreeLayout(Forest<V,E> g,
int distx)
Creates an instance for the specified graph and X distance with default Y distance. |
|
TreeLayout(Forest<V,E> g,
int distx,
int disty)
Creates an instance for the specified graph, X distance, and Y distance. |
Method Summary | |
---|---|
protected void |
buildTree()
|
protected void |
buildTree(V v,
int x)
|
Point2D |
getCenter()
Returns the center of this layout's area. |
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()
|
protected void |
setCurrentPositionFor(V vertex)
|
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 size)
This method is not supported by this class. |
Point2D |
transform(V v)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Dimension size
protected Forest<V,E> graph
protected Map<V,Integer> basePositions
protected Map<V,Point2D> locations
protected transient Set<V> alreadyDone
public static int DEFAULT_DISTX
public static int DEFAULT_DISTY
protected int distX
DEFAULT_XDIST
.
protected int distY
DEFAULT_YDIST
.
protected transient Point m_currentPoint
Constructor Detail |
---|
public TreeLayout(Forest<V,E> g)
public TreeLayout(Forest<V,E> g, int distx)
public TreeLayout(Forest<V,E> g, int distx, int disty)
Method Detail |
---|
protected void buildTree()
protected void buildTree(V v, int x)
public void setSize(Dimension size)
setSize
in interface Layout<V,E>
protected void setCurrentPositionFor(V vertex)
public Graph<V,E> getGraph()
Layout
getGraph
in interface Layout<V,E>
public Dimension getSize()
Layout
getSize
in interface Layout<V,E>
public void initialize()
Layout
initialize
in interface Layout<V,E>
public boolean isLocked(V v)
Layout
true
if the position of vertex v
is locked.
isLocked
in interface Layout<V,E>
public void lock(V v, boolean state)
Layout
lock
in interface Layout<V,E>
v
- vertexpublic void reset()
reset
in interface Layout<V,E>
public void setGraph(Graph<V,E> graph)
Layout
setGraph
in interface Layout<V,E>
public void setInitializer(org.apache.commons.collections15.Transformer<V,Point2D> initializer)
Layout
setInitializer
in interface Layout<V,E>
public Point2D getCenter()
public void setLocation(V v, Point2D location)
Layout
setLocation
in interface Layout<V,E>
public Point2D transform(V v)
transform
in interface org.apache.commons.collections15.Transformer<V,Point2D>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |