Treeviz 0.37 2010-10-17

ch.randelshofer.tree.circlemap
Class CirclemapDraw

java.lang.Object
  extended by ch.randelshofer.tree.circlemap.CirclemapDraw

public class CirclemapDraw
extends java.lang.Object

CirclemapDraw draws a CirclemapTree.

Can draw a subtree from any node within the tree.

Author:
Werner Randelshofer  @version 1.2 2009-02-04 If we prune on the depth of the tree, fill the composite node only by an amount which visualizes its weight.
1.1 2009-01-30 Added maxDepth property.
1.0 Jan 16, 2008 Created.

Constructor Summary
CirclemapDraw(CirclemapNode root, NodeInfo info)
           
CirclemapDraw(CirclemapTree model)
           
 
Method Summary
 void drawContours(java.awt.Graphics2D g, CirclemapNode node, java.awt.Color color)
           
 void drawDescendantSubtreeBounds(java.awt.Graphics2D g, CirclemapNode parent, java.awt.Color color)
           
 void drawLabel(java.awt.Graphics2D g, CirclemapNode node, int depth, double px, double py, double sf)
           
 void drawNode(java.awt.Graphics2D g, CirclemapNode node, int depth, double px, double py, double sf)
           
 void drawNodeBounds(java.awt.Graphics2D g, CirclemapNode selectedNode, java.awt.Color color)
           
 void drawSubtreeBounds(java.awt.Graphics2D g, CirclemapNode selectedNode, java.awt.Color color)
           
 void drawTree(java.awt.Graphics2D g, ProgressObserver p)
          Draws the tree onto the supplied graphics object.
 void drawTree0(java.awt.Graphics2D g, CirclemapNode node, int depth, double px, double py, double sf, java.awt.Rectangle clipBounds, ProgressObserver p)
           
 double getCX()
           
 double getCY()
           
 CirclemapNode getDrawRoot()
           
 NodeInfo getInfo()
           
 int getMaxDepth()
           
 CirclemapNode getNodeAt(double px, double py)
          Returns the node at the specified draw coordinates.
 CirclemapNode getNodeAt(int px, int py)
          Returns the node at the specified view coordinates.
 double getRadius()
           
 CirclemapNode getRoot()
           
 void setCX(double newValue)
           
 void setCY(double newValue)
           
 void setDrawRoot(CirclemapNode newValue)
           
 void setMaxDepth(int newValue)
           
 void setRadius(double newValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CirclemapDraw

public CirclemapDraw(CirclemapTree model)

CirclemapDraw

public CirclemapDraw(CirclemapNode root,
                     NodeInfo info)
Method Detail

getCX

public double getCX()

setCX

public void setCX(double newValue)

getCY

public double getCY()

setCY

public void setCY(double newValue)

getRadius

public double getRadius()

setRadius

public void setRadius(double newValue)

drawTree

public void drawTree(java.awt.Graphics2D g,
                     ProgressObserver p)
Draws the tree onto the supplied graphics object.


drawTree0

public void drawTree0(java.awt.Graphics2D g,
                      CirclemapNode node,
                      int depth,
                      double px,
                      double py,
                      double sf,
                      java.awt.Rectangle clipBounds,
                      ProgressObserver p)

drawNode

public void drawNode(java.awt.Graphics2D g,
                     CirclemapNode node,
                     int depth,
                     double px,
                     double py,
                     double sf)

drawLabel

public void drawLabel(java.awt.Graphics2D g,
                      CirclemapNode node,
                      int depth,
                      double px,
                      double py,
                      double sf)

drawContours

public void drawContours(java.awt.Graphics2D g,
                         CirclemapNode node,
                         java.awt.Color color)

getInfo

public NodeInfo getInfo()

getRoot

public CirclemapNode getRoot()

getDrawRoot

public CirclemapNode getDrawRoot()

setDrawRoot

public void setDrawRoot(CirclemapNode newValue)

drawNodeBounds

public void drawNodeBounds(java.awt.Graphics2D g,
                           CirclemapNode selectedNode,
                           java.awt.Color color)

drawSubtreeBounds

public void drawSubtreeBounds(java.awt.Graphics2D g,
                              CirclemapNode selectedNode,
                              java.awt.Color color)

drawDescendantSubtreeBounds

public void drawDescendantSubtreeBounds(java.awt.Graphics2D g,
                                        CirclemapNode parent,
                                        java.awt.Color color)

getNodeAt

public CirclemapNode getNodeAt(int px,
                               int py)
Returns the node at the specified view coordinates.


getNodeAt

public CirclemapNode getNodeAt(double px,
                               double py)
Returns the node at the specified draw coordinates.


setMaxDepth

public void setMaxDepth(int newValue)

getMaxDepth

public int getMaxDepth()

Copyright 2007-2008 (c) Werner Randelshofer.
All rights reserved.