edu.uci.ics.jung.algorithms.layout
Class RadialTreeLayout<V,E>

java.lang.Object
  extended by edu.uci.ics.jung.algorithms.layout.RadialTreeLayout<V,E>
All Implemented Interfaces:
Layout<V,E>

public class RadialTreeLayout<V,E>
extends Object
implements Layout<V,E>

a radial layout for Tree or Forest graphs

Author:
Tom Nelson

Field Summary
protected  Map<V,Integer> basePositions
           
static int DEFAULT_DISTX
           
static int DEFAULT_DISTY
           
protected  Map<V,Point2D> locations
           
protected  Map<V,PolarPoint> polarLocations
           
 
Constructor Summary
RadialTreeLayout(Forest<V,E> g)
           
RadialTreeLayout(Forest<V,E> g, int distx)
           
RadialTreeLayout(Forest<V,E> g, int distx, int disty)
           
RadialTreeLayout(Tree<V,E> g)
           
 
Method Summary
 List<V> getAtomics(V p)
           
 Point2D getCenter()
           
 Dimension getCurrentSize()
           
 int getDepth(V v)
           
 Graph<V,E> getGraph()
          Returns the full graph (the one that was passed in at construction time) that this Layout refers to.
 Map<V,PolarPoint> getPolarLocations()
           
 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 setGraph(Graph<V,E> graph)
          setter for graph
 void setInitializer( initializer)
          provides initial locations for all vertices.
 void setLocation(V v, Point2D location)
          set the location of a vertex
 void setSize(Dimension size)
           
 Point2D transform(V v)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

basePositions

protected Map<V,Integer> basePositions

locations

protected Map<V,Point2D> locations

DEFAULT_DISTX

public static int DEFAULT_DISTX

DEFAULT_DISTY

public static int DEFAULT_DISTY

polarLocations

protected Map<V,PolarPoint> polarLocations
Constructor Detail

RadialTreeLayout

public RadialTreeLayout(Forest<V,E> g)

RadialTreeLayout

public RadialTreeLayout(Forest<V,E> g,
                        int distx)

RadialTreeLayout

public RadialTreeLayout(Forest<V,E> g,
                        int distx,
                        int disty)

RadialTreeLayout

public RadialTreeLayout(Tree<V,E> g)
Method Detail

getAtomics

public List<V> getAtomics(V p)

getCurrentSize

public Dimension getCurrentSize()

getDepth

public int getDepth(V v)

setSize

public void setSize(Dimension size)
Specified by:
setSize in interface Layout<V,E>

getGraph

public Graph<V,E> getGraph()
Description copied from interface: Layout
Returns the full graph (the one that was passed in at construction time) that this Layout refers to.

Specified by:
getGraph in interface Layout<V,E>

getSize

public Dimension getSize()
Description copied from interface: Layout
Returns the current size of the visualization's space.

Specified by:
getSize in interface Layout<V,E>

initialize

public void initialize()
Description copied from interface: Layout
Initializes fields in the node that may not have been set during the constructor. Must be called before the iterations begin.

Specified by:
initialize in interface Layout<V,E>

isLocked

public boolean isLocked(V v)
Description copied from interface: Layout
Returns true if the position of vertex v is locked.

Specified by:
isLocked in interface Layout<V,E>

lock

public void lock(V v,
                 boolean state)
Description copied from interface: Layout
Sets a flag which fixes this vertex in place.

Specified by:
lock in interface Layout<V,E>
Parameters:
v - vertex

reset

public void reset()
Specified by:
reset in interface Layout<V,E>

setGraph

public void setGraph(Graph<V,E> graph)
Description copied from interface: Layout
setter for graph

Specified by:
setGraph in interface Layout<V,E>

setInitializer

public void setInitializer( initializer)
Description copied from interface: Layout
provides initial locations for all vertices.

Specified by:
setInitializer in interface Layout<V,E>

getCenter

public Point2D getCenter()

setLocation

public void setLocation(V v,
                        Point2D location)
Description copied from interface: Layout
set the location of a vertex

Specified by:
setLocation in interface Layout<V,E>

getPolarLocations

public Map<V,PolarPoint> getPolarLocations()

transform

public Point2D transform(V v)


Copyright © 2008 null. All Rights Reserved.