All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.trumphurst.controls.TreePainter

java.lang.Object
   |
   +----com.trumphurst.controls.StringPainter
           |
           +----com.trumphurst.controls.TreePainter

public class TreePainter
extends StringPainter
ObjectPainter to paint a column of a MultiColumnList with the representation of the Tree structure. Contracted Trees are shown with a plus (+) in a box, expanded ones with a minus (-). This is followed by the text returned by toString on the object (but this can be individually overridden). The structure of any expanded trees is shown with lines.

See Also:
Tree, TreeListDocument, MultiColumnList

Constructor Index

 o TreePainter(String)

Method Index

 o paintData(Graphics, Rectangle, Tree, boolean)
Overridable function to paint the identity of the Tree object.
 o paintObject(Graphics, Rectangle, Object, boolean)
Business function which actually draws the tree structure etc.

Constructors

 o TreePainter
 public TreePainter(String title)

Methods

 o paintData
 public void paintData(Graphics g,
                       Rectangle r,
                       Tree t,
                       boolean clip)
Overridable function to paint the identity of the Tree object. This default version shows the string returned by toString().

Parameters:
g - Graphics on which to draw.
r - Rectangle in which to draw. May have a negative width!
t - The Tree object.
clip - Whether to clip to the Rectangle.
 o paintObject
 public void paintObject(Graphics g,
                         Rectangle r,
                         Object o,
                         boolean clip)
Business function which actually draws the tree structure etc. Contracted Trees are shown with a plus (+) in a box, expanded ones with a minus (-). This is followed by the identity painted by paintData. The structure of any expanded trees is shown with lines.

Overrides:
paintObject in class StringPainter

All Packages  Class Hierarchy  This Package  Previous  Next  Index