|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The DrawingTree interface extends Tree because all Drawing Trees must also be Trees.
The interface simply inforces the defining of numerous methods which allow for the drawing of
the Tree
onto a given Graphics2D. The interface also defines many mutator and accesor
methods for information concerning the drawing of the DrawingTree
Method Summary | |
void |
drawNode()
Draws the node of the tree to the previously defined Graphics2D. |
void |
drawNode(java.awt.Graphics2D g2)
Draws the node of the tree to the given Graphics2D. |
void |
drawNode(java.awt.Graphics2D g2,
java.awt.geom.AffineTransform a)
Draws the node of the tree to the given Graphics2D, using the AffineTransform . |
void |
drawNodeAndLink()
Draws the node and link of the tree to the previously defined Graphics2D. |
void |
drawNodeAndLink(java.awt.Graphics2D g2)
Draws the node and link of the tree to the given Graphics2D. |
void |
drawNodeAndLink(java.awt.Graphics2D g2,
double sectionHeight,
java.awt.geom.AffineTransform a,
double drawingLevel,
double powerLevel)
Draws the node and link of the tree to the given Graphics2D. |
java.awt.geom.AffineTransform |
getCurrentTransform()
Gets the AffineTransform defined within the tree. |
double |
getDrawingLevel()
Gets the drawing level for the current DrawingTree . |
java.awt.geom.Rectangle2D |
getScreenBounds()
Gets the bounds of the screen to which the tree is drawing. |
double |
getSectionHeight()
Gets the height of the section for the DrawingTree . |
NodeSettings |
getSettings()
Gets the NodeSettings of the tree. |
void |
setScreenBounds(java.awt.geom.Rectangle2D bounds)
Sets the bounds of the screen to which the tree is drawing. |
void |
setSettings(NodeSettings s)
Sets the NodeSettings of the tree. |
Methods inherited from interface Tree |
getChildren, getKey, getLevel, getParentTree, getValue, isEmpty, size |
Method Detail |
public double getDrawingLevel()
DrawingTree
. This is a necessary method for allowing
intermidiary drawing between two levels, because the param is a double, not an integer.
public double getSectionHeight()
DrawingTree
. The section height is generally
used to determine link length and node height when drawing the tree.
public java.awt.geom.AffineTransform getCurrentTransform()
AffineTransform
defined within the tree. The current transform
is used when calling draw
without the AffineTransform
value.
public java.awt.geom.Rectangle2D getScreenBounds()
public void setScreenBounds(java.awt.geom.Rectangle2D bounds)
getClipBounds
on the Graphics2D passed, however, the bounds
can be set in any way.
bounds
- the rectangle representing the bounds of the screen.public void setSettings(NodeSettings s)
NodeSettings
of the tree.
These settings are used for drawing the node and the links of the given tree.
s
- NodeSettings
for use in drawing the tree.public NodeSettings getSettings()
NodeSettings
of the tree.
These settings are used for drawing the node and the links of the given tree.
NodeSettings
for use in drawing the tree.public void drawNode()
AffineTransform
.
public void drawNode(java.awt.Graphics2D g2)
AffineTransform
.
g2
- graphics to which the node is drawn.public void drawNode(java.awt.Graphics2D g2, java.awt.geom.AffineTransform a)
AffineTransform
.
The drawing uses the AffineTransform
to determine the exact way to draw the
node.
g2
- graphics to which the node is drawn.a
- transform to draw the node.public void drawNodeAndLink()
AffineTransform
,
section height, drawing level, and power level.
public void drawNodeAndLink(java.awt.Graphics2D g2)
AffineTransform
,
section height, drawing level, and power level.
g2
- graphics to which the node is drawn.public void drawNodeAndLink(java.awt.Graphics2D g2, double sectionHeight, java.awt.geom.AffineTransform a, double drawingLevel, double powerLevel)
AffineTransform
, section height,
drawing level, and power level to render the node and its links.
g2
- graphics to which the node and links are drawn.a
- transfrom to draw the node and links.drawingLevel
- the level in the tree to which the node is currently being drawn.powerLevel
- the power to which the links extend, depending on how many links are present.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |