Process Engineer Toolkit >
User's Guide >
Tools Reference >
TreeBrowser applet
Toolkit: Treebrowser AppletTopicsThis is a detailed description of the Treebrowser applet. For a simpler description of how to modify the treebrowser, refer to Toolkit: Modifying the Treebrowser. The Treebrowser applet is an applet displaying a Windows Explorer looking structure. If the Rational Unified Process (RUP) is being displayed as frames, then an example of the Treebrowser applet appears in the left frame. If frames are not displayed, then click on the "Display treebrowser" button to the right, and an example of the treebrowser applet will appear. Below are instructions on how to configure the applet. First the parameters in the applet tag are described and then the dat-file defining the tree structure is described.
The data
files
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
images* |
||
|
images* |
The first row in the dat-file specifies the name of the directory where the images are located. The directory can be specified in three ways, relative the dat-file, as a complete URL or as an URL that begins with "/". The last alternative is to be used when to access the applet through a file-server, for example '/C:/Work/index.htm'. The Treebrowser will make up to four tries to find the specified pictures. First of all it will search the directory specified in the dat-file The second alternative is to search the directory images below the dat-file. The third alternative is to search the directory specified in the dat-file of a parent tree. Finally it will search the directory images below the parent trees dat-file. |
|
|
0* |
Specifies the level in the tree the node belongs. The first node has always the lowest value of this part. The child of a node have 1 level higher than its parent. If several nodes have the lowest value they will be siblings. No node is however allowed to have a lower value than the first one. |
|
|
First node* |
The label of the first node. This text is the one that will be visible in the tree. |
|
|
index.html* |
The URL of the file that shall be opened when you click on the node. If no file is connected to the node specify one or more space characters in this position. The URL can be an complete URL, for example http://www.rational.com. It can be relative the dat-file, for example ../index.htm. An URL that is relative is always relative the directory where the dat-file is located. If the URL begins with "/" then an URL that begins with the parts of the documentbase that is protocol, host and port followed by the text in the dat-file will be created. For example if the document root of the applet page is "http://www.ruptools.com:1100/applet/treebrowse.htm" then "http://www.ruptools.com:1100" will be put before the text in the dat-file. If you want to include another dat-file into your tree you specify a node as the only child of the parent node to the subtree. This dummy node will be replaced with the root node of the subtree. The URL to the dat-file is specified as the URL in the dummy node. The new dat-file have to have the suffix ".dat". The subtree is created when you click on its parent node and not at start up of the Treebrowser. |
|
|
Left* |
The name of the Target/Frame in which this document is to be shown. The standard HTML target such as "_top" does work. If you want this document to be shown in the Target/Frame specified by the parameter "target" type one or more space characters here. |
|
|
BookClosed.gif* |
This is the name of the image displayed when the node is closed. The image shall be of the size 16 x 16 pixels as long as you have not specified any other value of the parameter "cellsize" If the node do not have any image specify one or more space characters. |
|
|
BookOpen.gif* |
This is the name of the image displayed when the node is open. If the node do not have any image specify one or more space characters. |
|
|
true* |
Specifies if the node shall be expanded or not when the tree is initially loaded. If the value is "true" the node will be expanded if it has some children. Every other value will make the node collapsed at startup. If the node does not have any child nodes or if the child node is a new dat-file this part is not of any importance. |
|
| Methodname | Returns | Description |
|
isReady |
Boolean |
Return true if the Treebrowser is completely loaded, false if not. Until the Treebrowser is completely loaded the other methods are not able to proceed its services. |
|
getParentUrl(String url) |
String |
This method takes the url of a node in the tree and returns the url of the parent node. If the url is not found in any node or if the node does not have any parent null is returned. For all the following methods the Treebrowser will start searching from the top node and down. If there are more than one node with the same url only the first one will be found. |
|
getParentLabel(String url) |
String |
This method takes the url of a node in the tree and returns the label of the parent node. If the url is not found in any node or if the node does not have any parent null is returned. |
|
getChildUrl(String url) |
String |
This method takes the url of a node in the tree and returns the url of the first child node. If the url is not found in any node or if the node does not have any child null is returned. |
|
getChildLabel(String url) |
String |
This method takes the url of a node in the tree and returns the label of the first child node. If the url is not found in any node or if the node does not have any child null is returned. |
|
getPreviousUrl(String url) |
String |
This method takes the url of a node in the tree and returns the url of the previous sibling node. If the url is not found in any node or if the node does not have any previous sibling null is returned. |
|
getPreviousLabel(String url) |
String |
This method takes the url of a node in the tree and returns the label of the previous sibling node. If the url is not found in any node or if the node does not have any previous sibling null is returned. |
|
getNextUrl(String url) |
String |
This method takes the url of a node in the tree and returns the url of the next sibling node. If the url is not found in any node or if the node does not have any next sibling null is returned. |
|
getNextLabel(String url) |
String |
This method takes the url of a node in the tree and returns the label of the next sibling node. If the url is not found in any node or if the node does not have any next sibling null is returned. |
|
selectNode(String url) |
void |
This method takes the url of a node in the tree and sets that node to be the selected one. If the node is not visible it will become visible. The tree may be collapsed if to many nodes are visible. The vertical scrollbar may also be affected. |
Colors can be specified in three ways, the name of the color,
the RGB-code in hexadecimal or the RGB code in decimal.
Below the different alternatives are described:
The name of the color
The following colors are supported, the value is not case sensitive.
|
|
The RGB code in hexadecimal base
A color can be defined with the RGB code written in hex, i.e. #FFaa16. If you
specify it in hex then a "#" character must start the definition.
The RGB code in decimal base
A color can be defined in decimal RGB code, i.e. 255,255,255.
Fonts are defined according to the syntax "name,style,size"
name can have the following none case insensitive values:
style some of the following case insensitive values:
size is an integer value.
|
Rational Unified
Process
|