All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class MSBTree.RTreeApplet

public class RTreeApplet
extends Applet

The RTreeApplet is a thin layer on the RTreeList class that allows you to use the RTreeList as an applet in a web page. The parameters for the applet are:

Parameters of the applet 

Allmost all parameters are Strings or Integers, however the are some special cases:

The parameters of the applet are:

The following parameters define default values for the nodes:

The following parameters define the value for a given node. The * must be substituted by the node's name. If the parameters are used in Javascript or in a definition file the *_ should not be included:


The following parameters will allow you to execute JavaScript functions when something happens:

See the file Example3.html to see an example of these parameters. 


Loading from files

The data for a node or tree can also be loaded from a text file instead of using the parameters of the applet. The advantadge of this approach is:

The structure of the file is very simple; each file contains the definition of the children of one node only. Each line in the file contains one command. The command can be:

For example:


 This file creates a new node called "Index". The following 4 lines contain some parameters for this node. This parameters have the same name as those used in the applet parameters (without the *_). Note that the children of the node "index" will be defined in the file "IndexNodes.txt".


It is also possible to change teh appearance of the tree from Javascript (See the file Example1.html to see an example of this). The following methods can be accessed from javascript :

 o clearTree

 public void clearTree(String nodeName)
deletes the children of the node.
 o  loadNode
 public void loadNode(String nodeName,
                      String sFile)
loads the children of the node nodename from the file sFile.

 o refreshTree

 public void refreshTree()
repaints the tree. The Javascript should call this after using other functions in other methods.
 o setParam
 public void setParam(String nodeName,
                      String Param,
                      String Value)

Sets a parameter for a node. This methods allows the configuration of the applet from javascript. For example, in order to change the icon of a node called "node1":


 In the example "tree" is the name of the applet.
All Packages  Class Hierarchy  This Package  Previous  Next  Index