Public Member Functions | |
BaumAnsicht (BaumModell baumModell) | |
void | paint (Graphics g) |
void | zeichneBaum (JTree einBaum, Graphics2D g2D) |
void | zeichneEbene (Enumeration einEnum, float distanz, Graphics2D g2D) |
void | zeichneKinder (BaumKnoten wurzel, float distanz, Graphics2D g2D) |
void | zeichnePunkt (Point2D.Double position, Graphics2D g2D) |
Protected Member Functions | |
void | zeichneVerbindungen (JTree einBaum, Graphics2D g2D) |
Protected Attributes | |
BaumModell | m_BaumModell |
Static Protected Attributes | |
static double | beta = 0.5 |
static float | alpha = 0.5f |
Package Attributes | |
double[] | knotenVekt |
Static Package Attributes | |
static double | aufloesung = 30.0 |
ansicht.BaumAnsicht.BaumAnsicht | ( | BaumModell | baumModell | ) |
Constructor
baumModell | the tree model to be drawn in the derived classes |
void ansicht.BaumAnsicht.paint | ( | Graphics | g | ) |
Invoked by Swing to draw components
g | the Graphics context in which to paint |
Reimplemented in ansicht.BalloonBaumAnsicht, ansicht.RadialBaumAnsicht, and ansicht.StandardBaumAnsicht.
void ansicht.BaumAnsicht.zeichneVerbindungen | ( | JTree | einBaum, | |
Graphics2D | g2D | |||
) | [protected] |
Draws the connections between the leaves as specified in the tree einBaum.
We used open uniform cubic B-Splines to draw the connections.
einBaum | the tree whose connections are to be drawn | |
g2D | the Graphics context in which to paint |
void ansicht.BaumAnsicht.zeichneBaum | ( | JTree | einBaum, | |
Graphics2D | g2D | |||
) |
Draws the tree einBaum. The type of the tree determines the tree layout.
einBaum | the tree to be drawn | |
g2D | the Graphics context in which to paint |
Reimplemented in ansicht.BalloonBaumAnsicht, and ansicht.StandardBaumAnsicht.
void ansicht.BaumAnsicht.zeichneEbene | ( | Enumeration | einEnum, | |
float | distanz, | |||
Graphics2D | g2D | |||
) |
Iterates recursively through the levels of the tree using depth-first traversal and draws all nodes of the tree.
This method draws the children of all nodes specified in einEnum and calls the method for each of the children.
einEnum | the Enumeration used to iterate through. | |
distanz | represents the distance between the different levels of the radial tree | |
g2D | the Graphics context in which to paint |
void ansicht.BaumAnsicht.zeichneKinder | ( | BaumKnoten | wurzel, | |
float | distanz, | |||
Graphics2D | g2D | |||
) |
Draws the children of the node wurzel.
The method calculates the position and the limits of each node to be drawn. The limits are used to determine the correct position of the node.
wurzel | represents the parent node whose children are drawn | |
distanz | represents the distance between the different levels of the radial tree | |
g2D | the Graphics context in which to paint |
Reimplemented in ansicht.RadialBaumAnsicht.
void ansicht.BaumAnsicht.zeichnePunkt | ( | Point2D.Double | position, | |
Graphics2D | g2D | |||
) |
Draws a point at the position specified by position.
The point is actually an ellipse. We use gradient paint to fill the ellipse.
position | the position of the point to be drawn | |
g2D | the Graphics context in which to paint |