ansicht.BaumAnsicht Class Reference

Inheritance diagram for ansicht.BaumAnsicht:

ansicht.BalloonBaumAnsicht ansicht.RadialBaumAnsicht ansicht.StandardBaumAnsicht

List of all members.

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


Detailed Description

BaumAnsicht is an abstract class used to be extended from the specific views like RadialBaumAnsicht, StandardBaumAnsicht or BalloonBaumAnsicht

Author:
Clemens Czermak

Johannes Moser


Constructor & Destructor Documentation

ansicht.BaumAnsicht.BaumAnsicht ( BaumModell  baumModell  ) 

Constructor

Parameters:
baumModell the tree model to be drawn in the derived classes


Member Function Documentation

void ansicht.BaumAnsicht.paint ( Graphics  g  ) 

Invoked by Swing to draw components

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
position the position of the point to be drawn
g2D the Graphics context in which to paint


The documentation for this class was generated from the following file: