All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class MSBTree.RTreeList

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----MSBTree.RTreeList

public class RTreeList
extends Panel
implements Runnable

Warning: This documentation is only for java programmers. If you are just using the Applet in a HTML page, please read Class MSBTree.RTreeApplet.

The RTreeList is a subclass of Panel. Therefore you can add it to any container in your java application. In order to create a tree you must follow these steps:

  1. Create tree and add it to a container.
  2. Create nodes and add them to the tree. You can:
    1. add a node to the first level with the method addFirstLevelNode().
    2. or add the node to another node.
  3. You can also read the definition of the tree from a file like this: tree.createTreeFromFile(tree.Root,<filename>). See documention of the applet for details  Class MSBTree.RTreeApplet about the parameters in the file.
  4. Start the tree. The tree implements the Runnable interface in other to be able to run the initial animation, for this reason you must start it like this: new Thread(tree).start();

 


Variable Index

 o ANIMATION_FROM_BOTTOM
 o ANIMATION_FROM_LEFT
 o ANIMATION_FROM_RIGHT
 o ANIMATION_FROM_TOP
 o animationDelay
 o backColor
 o backImage
 o defaultTarget
 o drawLine
 o drawPlusMinus
 o EXPAND_ON_CLICK
 o EXPAND_ON_ENTER
 o expandOn
 o iconsWidth
 o itemHeight
 o itemWidth
 o leftMargin
 o levelTab
 o LINE_DASHED
 o LINE_DOTS
 o LINE_NORMAL
 o lineColor
 o lineType
 o loadingText
 o minusImage
 o NO_ANIMATION
 o openingURLText
 o parentApplet
 o plusImage
 o plusminusboxColor
 o Root
 o scrollColor
 o showRoot
 o showTip
 o tipBack
 o tipBorder
 o tipColor
 o tipDelay
 o tipFont
 o topMargin

Constructor Index

 o RTreeList()

Method Index

 o addFirstLevelNode(RNode)
 o clear(RNode)
 o convertColor(String)
 o convertFont(String)
 o countNodesToDraw(RNode)
 o createTreeFromFile(RNode, String)
 o createTreeFromParameters(Applet)
 o drawLineWithStyle(Graphics, int, int, int, int, int)
 o drawNode(Graphics, RNode, int, boolean)
 o expandNode(String, boolean)
 o findNode(RNode, String)
 o paint(Graphics)
 o processParameter(RNode, String, String)
 o refresh()
 o run()

Variables

 o backImage
 public Image backImage
background image of the tree.
 o EXPAND_ON_CLICK
 public static final int EXPAND_ON_CLICK
expand nodes when the user clicks on them.
 o EXPAND_ON_ENTER
 public static final int EXPAND_ON_ENTER
expand nodes when the mouse enters them.
 o expandOn
 public int expandOn
specifies how the nodes are going to be expanded. Valid values are EXPAND_ON_CLICK or EXPAND_ON_ENTER.
 o NO_ANIMATION
 public static final int NO_ANIMATION
no initial animation is performed
 o ANIMATION_FROM_TOP
 public static final int ANIMATION_FROM_TOP
the tree will come from the top of the panel and will scroll down.
 o ANIMATION_FROM_BOTTOM
 public static final int ANIMATION_FROM_BOTTOM
the tree will come from the bottom of the panel and will scroll up.
 
 o ANIMATION_FROM_LEFT
 public static final int ANIMATION_FROM_LEFT
the tree will come from left side of the panel and will scroll right.
 o ANIMATION_FROM_RIGHT
 public static final int ANIMATION_FROM_RIGHT
the tree will come from right side of the panel and will scroll left.
 o LINE_NORMAL
 public static final int LINE_NORMAL
Lines from a nodes and its children will be solid.
 o LINE_DOTS
 public static final int LINE_DOTS
Lines from a nodes and its children will be made of dots.
 o LINE_DASHED
 public static final int LINE_DASHED
Lines from a nodes and its children will be made of short lines.
 o lineType
 public int lineType
specifies what kind of line will be used to link a node and its descendants. Valid values are LINE_* contants.
 o tipDelay
 public int tipDelay
specifies the number of milliseconds the tree will wait before showing a tip for the current node.
 o animationDelay
 public int animationDelay
Specifies time (in milliseconds) between scenes in the initial animation.
 o loadingText
 public String loadingText
this text will be shown to the user while definition files or applet parameters are read.
 o openingURLText
 public String openingURLText
this text will be shown to the user while openning a URL.
 o backColor
 public Color backColor
background color of the tree.
 o iconsWidth
 public int iconsWidth
Width of the icons. The default value is 16.
 o scrollColor
 public Color scrollColor
background color of the scroll bar.
 o showTip
 public boolean showTip
If false, no tips will be displayed.
 o tipFont
 public Font tipFont
Font used to display tips.
 o tipColor
 public Color tipColor
color of the font.
 o tipBorder
 public Color tipBorder
color of the border of the box used to displayed tips.
 o tipBack
 public Color tipBack
background of the box used to displayed tips.
 o Root
 public RNode Root
root of the tree. Trees always have a root but it can be hidden.
 o showRoot
 public boolean showRoot
if false, the root of the tree will not be shown.
 o levelTab
 public int levelTab
left margin used for each new level of the tree.
 
 o leftMargin
 public int leftMargin
left margin of the tree.
 
 o topMargin
 public int topMargin
top margin of the tree.
 o lineColor
 public Color lineColor
color of the lines used to link a node with its children
 o plusminusboxColor
 public Color plusminusboxColor
color of the +/- signes.
 o drawLine
 public boolean drawLine
specifies whether the lines that link nodes should be displayed.
 o drawPlusMinus
 public boolean drawPlusMinus
if true :
	"-" will be displayed left to an expanded node.
	"+" will be displayed next to a not expanded node.
 o plusImage
 public Image plusImage
Image to used instead of the + sign.
 o minusImage
 public Image minusImage
 
Image to use instead of the - sign.
 o parentApplet
 public Applet parentApplet
Applet (if any) in which the tree is placed. This is used to read the applet's parameters.
 o defaultTarget
 public String defaultTarget
Target frame where URL should be openned after double-clicking a node. Valid values are:

"_self"

show in the current frame

"_parent"

show in the parent frame

"_top"

show in the topmost frame

"_blank"

show in a new unnamed top-level window

name

show in a new top-level window named name

 
 o itemHeight
 public int itemHeight
Height of the items in the tree. The default is 20. 
 o itemWidth
 public int itemWidth
 
Width of the items in the tree. The default is the width of the applet itself. 

Constructors

 o RTreeList
 public RTreeList()

Methods

 o addFirstLevelNode
 public void addFirstLevelNode(RNode n)
adds the node to the root.
 o clear
 public void clear(RNode n)
deletes the children of the node.
 o convertColor
 public Color convertColor(String c)
converts a color parameter (as string) to a color class.
 o convertFont
 public Font convertFont(String f)
converts a font parameter (as string) to a Font class.
 o createTreeFromFile
 public void createTreeFromFile(RNode startNode,
                                String sFile)
 
processes the file sfile. The nodes will be added as children of startNode.
 o createTreeFromParameters
 public void createTreeFromParameters(Applet pApplet)
create the tree using the parameters of the applet.
 o expandNode
 public void expandNode(String Name,
                        boolean expand)
Expands or collapses a node.
 o findNode
 public RNode findNode(RNode n,
                       String Name)
find a node by name.
 o paint
 public void paint(Graphics g)
Overrides:
paint in class Container
 o processParameter
 public void processParameter(RNode currentNode,
                              String ParamName,
                              String ParamValue)
process a parameter. This method ís used to provide access to paramters from javascript.
 o refresh
 public void refresh()
repaints the tree.
 o run
 public void run()
starts the tree.

All Packages  Class Hierarchy  This Package  Previous  Next  Index