public class SunburstDraw
extends java.lang.Object
SunburstTree.
Can draw the tree from any node within the tree.
| Constructor and Description |
|---|
SunburstDraw(SunburstNode root,
NodeInfo info) |
SunburstDraw(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.GeneralPath |
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,
ProgressObserver p) |
void |
drawDescendantSubtreeBounds(java.awt.Graphics2D g,
SunburstNode parent,
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 selectedNode,
java.awt.Color color) |
void |
drawSubtreeBounds(java.awt.Graphics2D g,
SunburstNode selectedNode,
java.awt.Color color) |
void |
drawTree(java.awt.Graphics2D g,
ProgressObserver p)
Draws the Sunburst tree onto
the supplied graphics object.
|
void |
drawTree(java.awt.Graphics2D g,
SunburstNode node,
ProgressObserver p) |
double |
getCX() |
double |
getCY() |
NodeInfo |
getInfo() |
double |
getInnerRadius() |
SunburstNode |
getNodeAt(int x,
int y) |
double |
getOuterRadius() |
SunburstNode |
getRoot() |
double |
getRotation() |
double |
getTheta(double x,
double y)
Converts screen coordinates to polar coordinates in degrees.
|
java.lang.String |
getToolTipText(int x,
int y) |
int |
getTotalDepth() |
void |
setCX(double newValue) |
void |
setCY(double newValue) |
void |
setInnerRadius(double newValue) |
void |
setOuterRadius(double newValue) |
void |
setRotation(double newValue) |
public SunburstDraw(SunburstTree model)
public SunburstDraw(SunburstNode root, NodeInfo info)
public NodeInfo getInfo()
public SunburstNode getRoot()
public double getRotation()
public void setRotation(double newValue)
public int getTotalDepth()
public double getCX()
public void setCX(double newValue)
public double getCY()
public void setCY(double newValue)
public double getInnerRadius()
public void setInnerRadius(double newValue)
public double getOuterRadius()
public void setOuterRadius(double newValue)
public double getTheta(double x,
double y)
public SunburstNode getNodeAt(int x, int y)
public java.lang.String getToolTipText(int x,
int y)
public void drawNodeBounds(java.awt.Graphics2D g,
SunburstNode selectedNode,
java.awt.Color color)
public void drawSubtreeBounds(java.awt.Graphics2D g,
SunburstNode selectedNode,
java.awt.Color color)
public void drawDescendantSubtreeBounds(java.awt.Graphics2D g,
SunburstNode parent,
java.awt.Color color)
public static java.awt.geom.GeneralPath 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,
ProgressObserver p)
public void drawTree(java.awt.Graphics2D g,
SunburstNode node,
ProgressObserver p)
public void drawContours(java.awt.Graphics2D g,
SunburstNode node,
java.awt.Color color)
public void drawDescendants(java.awt.Graphics2D g,
SunburstNode node,
ProgressObserver p)
public void drawLabel(java.awt.Graphics2D g,
SunburstNode node)
public void drawNode(java.awt.Graphics2D g,
SunburstNode node)