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

java.lang.Object
  extended by edu.uci.ics.jung.algorithms.layout.TreeLayout<V,E>
      extended by edu.uci.ics.jung.algorithms.layout.RadialTreeLayout<V,E>
All Implemented Interfaces:
Layout<V,E>, org.apache.commons.collections15.Transformer<V,Point2D>

public class RadialTreeLayout<V,E>
extends TreeLayout<V,E>

A radial layout for Tree or Forest graphs.

Author:
Tom Nelson

Field Summary
protected  Map<V,PolarPoint> polarLocations
           
 
Fields inherited from class edu.uci.ics.jung.algorithms.layout.TreeLayout
alreadyDone, basePositions, DEFAULT_DISTX, DEFAULT_DISTY, distX, distY, graph, locations, m_currentPoint, size
 
Constructor Summary
RadialTreeLayout(Forest<V,E> g)
          Creates an instance for the specified graph with default X and Y distances.
RadialTreeLayout(Forest<V,E> g, int distx)
          Creates an instance for the specified graph and X distance with default Y distance.
RadialTreeLayout(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()
           
 Map<V,PolarPoint> getPolarLocations()
          Returns the map from vertices to their locations in polar coordinates.
protected  void setCurrentPositionFor(V vertex)
           
 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 edu.uci.ics.jung.algorithms.layout.TreeLayout
buildTree, getCenter, getGraph, getSize, initialize, isLocked, lock, reset, setGraph, setInitializer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

polarLocations

protected Map<V,PolarPoint> polarLocations
Constructor Detail

RadialTreeLayout

public RadialTreeLayout(Forest<V,E> g)
Creates an instance for the specified graph with default X and Y distances.


RadialTreeLayout

public RadialTreeLayout(Forest<V,E> g,
                        int distx)
Creates an instance for the specified graph and X distance with default Y distance.


RadialTreeLayout

public RadialTreeLayout(Forest<V,E> g,
                        int distx,
                        int disty)
Creates an instance for the specified graph, X distance, and Y distance.

Method Detail

buildTree

protected void buildTree()
Overrides:
buildTree in class TreeLayout<V,E>

setSize

public void setSize(Dimension size)
Description copied from class: TreeLayout
This method is not supported by this class. The size of the layout is determined by the topology of the tree, and by the horizontal and vertical spacing (optionally set by the constructor).

Specified by:
setSize in interface Layout<V,E>
Overrides:
setSize in class TreeLayout<V,E>

setCurrentPositionFor

protected void setCurrentPositionFor(V vertex)
Overrides:
setCurrentPositionFor in class TreeLayout<V,E>

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>
Overrides:
setLocation in class TreeLayout<V,E>

getPolarLocations

public Map<V,PolarPoint> getPolarLocations()
Returns the map from vertices to their locations in polar coordinates.


transform

public Point2D transform(V v)
Specified by:
transform in interface org.apache.commons.collections15.Transformer<V,Point2D>
Overrides:
transform in class TreeLayout<V,E>


Copyright © 2009. All Rights Reserved.