public class RectmapDraw
extends java.lang.Object
RectmapTree.
Can draw a subtree from any node within the tree.
| Modifier and Type | Field and Description |
|---|---|
protected double |
cx
Top left corner of the draw root.
|
protected double |
cy
Top left corner of the draw root.
|
protected NodeInfo |
info |
protected int |
maxDepth
Maximal depth of the tree that will be drawn, starting from
the draw root.
|
| Constructor and Description |
|---|
RectmapDraw(RectmapNode root,
NodeInfo info) |
RectmapDraw(RectmapTree model) |
| Modifier and Type | Method and Description |
|---|---|
void |
drawContours(java.awt.Graphics2D g,
RectmapNode node,
java.awt.Color color) |
void |
drawLabel(java.awt.Graphics2D g,
RectmapNode node,
int depth,
double px,
double py,
double sfh,
double sfv) |
void |
drawNode(java.awt.Graphics2D g,
RectmapNode node,
int depth,
double px,
double py,
double sfh,
double sfv) |
void |
drawNodeBounds(java.awt.Graphics2D g,
RectmapNode 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,
RectmapNode node,
int depth,
double px,
double py,
double pwidth,
double pheight,
ProgressObserver p)
Recursive part of the drawing routine.
|
RectmapNode |
getDrawRoot() |
double |
getHeight() |
NodeInfo |
getInfo() |
int |
getMaxDepth() |
RectmapNode |
getNodeAt(double px,
double py)
Returns the node at the specified draw coordinates.
|
RectmapNode |
getNodeAt(int px,
int py)
Returns the node at the specified view coordinates.
|
RectmapNode |
getRoot() |
double |
getWidth() |
double |
getX() |
double |
getY() |
void |
setDrawRoot(RectmapNode newValue) |
void |
setHeight(double newValue) |
void |
setMaxDepth(int newValue) |
void |
setWidth(double newValue) |
void |
setX(double newValue) |
void |
setY(double newValue) |
protected NodeInfo info
protected double cx
protected double cy
protected int maxDepth
public RectmapDraw(RectmapTree model)
public RectmapDraw(RectmapNode root, NodeInfo info)
public double getX()
public void setX(double newValue)
public int getMaxDepth()
public void setMaxDepth(int 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 void drawTree(java.awt.Graphics2D g,
ProgressObserver p)
public void drawTree0(java.awt.Graphics2D g,
RectmapNode node,
int depth,
double px,
double py,
double pwidth,
double pheight,
ProgressObserver p)
public void drawNode(java.awt.Graphics2D g,
RectmapNode node,
int depth,
double px,
double py,
double sfh,
double sfv)
public void drawLabel(java.awt.Graphics2D g,
RectmapNode node,
int depth,
double px,
double py,
double sfh,
double sfv)
public void drawContours(java.awt.Graphics2D g,
RectmapNode node,
java.awt.Color color)
public NodeInfo getInfo()
public RectmapNode getRoot()
public RectmapNode getDrawRoot()
public void setDrawRoot(RectmapNode newValue)
public void drawNodeBounds(java.awt.Graphics2D g,
RectmapNode selectedNode,
java.awt.Color color)
public RectmapNode getNodeAt(int px, int py)
px - py - public RectmapNode getNodeAt(double px, double py)