Treeviz 0.37 2010-10-17

ch.randelshofer.tree.sunray
Class IcerayDraw

java.lang.Object
  extended by ch.randelshofer.tree.sunray.IcerayDraw

public class IcerayDraw
extends java.lang.Object

IcerayDraw draws a linear version of a SunrayTree.

Can draw the tree from any node within the tree.

Version:
1.0 September 18, 2007 Created.
Author:
Werner Randelshofer

Constructor Summary
IcerayDraw(SunrayNode root, NodeInfo info)
           
IcerayDraw(SunrayTree model)
          Creates a new instance.
 
Method Summary
static void addSeg(java.awt.geom.GeneralPath mc, double x, double y, double startAngle, double arc, double radius)
           
static java.awt.geom.Rectangle2D.Double createArc(double x, double y, double startAngle, double arc, double outerRadius, double innerRadius)
           
 void drawContours(java.awt.Graphics2D g, SunrayNode node, java.awt.Color color)
           
 void drawDescendants(java.awt.Graphics2D g, SunrayNode node)
           
 void drawDescendantSubtreeBounds(java.awt.Graphics2D g, SunrayNode node, java.awt.Color color)
           
 void drawLabel(java.awt.Graphics2D g, SunrayNode node)
           
 void drawNode(java.awt.Graphics2D g, SunrayNode node)
           
 void drawNodeBounds(java.awt.Graphics2D g, SunrayNode node, java.awt.Color color)
           
 void drawSubtreeBounds(java.awt.Graphics2D g, SunrayNode node, java.awt.Color color)
           
 void drawTree(java.awt.Graphics2D g)
          Draws the Sunburst tree onto the supplied graphics object.
 void drawTree(java.awt.Graphics2D g, SunrayNode node)
           
 double getHeight()
           
 NodeInfo getInfo()
           
 SunrayNode getNodeAt(int x, int y)
           
 SunrayNode getRoot()
           
 double getTheta(double x, double y)
          Converts screen coordinates to polar coordinates in degrees.
 java.lang.String getToolTipText(int x, int y)
           
 int getTotalDepth()
           
 double getWidth()
           
 double getX()
           
 double getY()
           
 void setHeight(double newValue)
           
 void setWidth(double newValue)
           
 void setX(double newValue)
           
 void setY(double newValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IcerayDraw

public IcerayDraw(SunrayTree model)
Creates a new instance.


IcerayDraw

public IcerayDraw(SunrayNode root,
                  NodeInfo info)
Method Detail

getRoot

public SunrayNode getRoot()

getInfo

public NodeInfo getInfo()

getTotalDepth

public int getTotalDepth()

getX

public double getX()

setX

public void setX(double newValue)

getY

public double getY()

setY

public void setY(double newValue)

getWidth

public double getWidth()

setWidth

public void setWidth(double newValue)

getHeight

public double getHeight()

setHeight

public void setHeight(double newValue)

getNodeAt

public SunrayNode getNodeAt(int x,
                            int y)

getToolTipText

public java.lang.String getToolTipText(int x,
                                       int y)

drawNodeBounds

public void drawNodeBounds(java.awt.Graphics2D g,
                           SunrayNode node,
                           java.awt.Color color)

drawSubtreeBounds

public void drawSubtreeBounds(java.awt.Graphics2D g,
                              SunrayNode node,
                              java.awt.Color color)

drawDescendantSubtreeBounds

public void drawDescendantSubtreeBounds(java.awt.Graphics2D g,
                                        SunrayNode node,
                                        java.awt.Color color)

createArc

public static java.awt.geom.Rectangle2D.Double createArc(double x,
                                                         double y,
                                                         double startAngle,
                                                         double arc,
                                                         double outerRadius,
                                                         double innerRadius)

addSeg

public static void addSeg(java.awt.geom.GeneralPath mc,
                          double x,
                          double y,
                          double startAngle,
                          double arc,
                          double radius)

drawTree

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


drawTree

public void drawTree(java.awt.Graphics2D g,
                     SunrayNode node)

drawContours

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

drawDescendants

public void drawDescendants(java.awt.Graphics2D g,
                            SunrayNode node)

getTheta

public double getTheta(double x,
                       double y)
Converts screen coordinates to polar coordinates in degrees.


drawLabel

public void drawLabel(java.awt.Graphics2D g,
                      SunrayNode node)

drawNode

public void drawNode(java.awt.Graphics2D g,
                     SunrayNode node)

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