public class IcicleDraw
extends java.lang.Object
SunburstTree.
Can draw the tree from any node within the tree.
| Modifier and Type | Field and Description |
|---|---|
protected double |
cx
Center of the sunburst tree.
|
protected double |
cy
Center of the sunburst tree.
|
protected double |
height
Inner and outer radius of the sunburst tree.
|
protected NodeInfo |
info |
protected SunburstNode |
root
Root of the sunburst tree.
|
protected int |
totalDepth
Maximal depth of the sunburst tree.
|
protected double |
width
Inner and outer radius of the sunburst tree.
|
| Constructor and Description |
|---|
IcicleDraw(SunburstNode root,
NodeInfo info) |
IcicleDraw(SunburstTree model)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
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,
SunburstNode node,
java.awt.Color color) |
void |
drawDescendants(java.awt.Graphics2D g,
SunburstNode node) |
void |
drawDescendantSubtreeBounds(java.awt.Graphics2D g,
SunburstNode node,
java.awt.Color color) |
void |
drawLabel(java.awt.Graphics2D g,
SunburstNode node) |
void |
drawNode(java.awt.Graphics2D g,
SunburstNode node) |
void |
drawNodeBounds(java.awt.Graphics2D g,
SunburstNode node,
java.awt.Color color) |
void |
drawSubtreeBounds(java.awt.Graphics2D g,
SunburstNode 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,
SunburstNode node) |
double |
getHeight() |
NodeInfo |
getInfo() |
SunburstNode |
getNodeAt(int x,
int y) |
SunburstNode |
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) |
protected double cx
protected double cy
protected double width
protected double height
protected SunburstNode root
protected int totalDepth
protected NodeInfo info
public IcicleDraw(SunburstTree model)
public IcicleDraw(SunburstNode root, NodeInfo info)
public SunburstNode getRoot()
public int getTotalDepth()
public double getX()
public void setX(double newValue)
public double getY()
public void setY(double newValue)
public double getWidth()
public void setWidth(double newValue)
public double getHeight()
public void setHeight(double newValue)
public SunburstNode getNodeAt(int x, int y)
public java.lang.String getToolTipText(int x,
int y)
public void drawNodeBounds(java.awt.Graphics2D g,
SunburstNode node,
java.awt.Color color)
public void drawSubtreeBounds(java.awt.Graphics2D g,
SunburstNode node,
java.awt.Color color)
public void drawDescendantSubtreeBounds(java.awt.Graphics2D g,
SunburstNode node,
java.awt.Color color)
public static java.awt.geom.Rectangle2D.Double createArc(double x,
double y,
double startAngle,
double arc,
double outerRadius,
double innerRadius)
public static void addSeg(java.awt.geom.GeneralPath mc,
double x,
double y,
double startAngle,
double arc,
double radius)
public void drawTree(java.awt.Graphics2D g)
public void drawTree(java.awt.Graphics2D g,
SunburstNode node)
public void drawContours(java.awt.Graphics2D g,
SunburstNode node,
java.awt.Color color)
public void drawDescendants(java.awt.Graphics2D g,
SunburstNode node)
public double getTheta(double x,
double y)
public void drawLabel(java.awt.Graphics2D g,
SunburstNode node)
public void drawNode(java.awt.Graphics2D g,
SunburstNode node)
public NodeInfo getInfo()