User manual for EverJ's Link Tree menu applet .

  • How to install.
  • How to create source file.
  • Source file example.
  • 1.Installation.

     

  • Document. Place somewhere your HTML file, containing the following tag (missing values explained below):
  • <APPLET codebase= "....." width=... height=... ... code="DTree.class"> ... </APPLET>

     

  • Classes. Place 3 class files (DTree.class, Db.class, Di.class) into the one directory somewhere at the same host as the HTML file(NOTE: when you test this on the local computer, place classes at the same directory as the HTML).If you have placed classes and HTML file in a different directories, use the 'codebase' parameter in the tag to register their location. It should point to classes path:
         <applet ... codebase="[path]" code="DTree.class" ...>.
    The path may be absolute or relative to HTML file.
  •  

  • Icons. Create 2 image files, representing open / closed folder, put them somewhere and set their paths in <param> tag in the following way:
          <param name=open value="path1/name1">
     
        <param name=closed value="path2/name2">
    The paths may be absolute or relative to the class files. Default values are open.gif and closed.gif. This icons will be common for all documents.
    Create other icon images and put them to the HTML document's directory. This icons will be specific for each document.
  •  

  • Data source file. Now you should create a file which the applet will get it's data from. By default you should name it 'DTree.dat' and put to HTML document's directory. Otherwise register it's location using:
         <param name=source value="path/name">.
    The path may be absolute or relative to HTML document.
  •  

  • The tag.
    <applet width=.. height=.. align=.. codebase="[classes path]" code="DTree.class">
         <param name=open value="path1/file1">
         <param name=closed value="path2/file2" >
         <param name=source value="path3/file3" >
    </applet>
  •  

    2.Source data.
    This applet takes it's data from a source file(see previous chapter).
    This file contains data in SDL format(see SDL). Source file contains some records, named struct, label, image,action, colors, font,screen (see below explanation & examples), the first of them being the key generic record, the next three of them being individual node context, and the last three being the system context.

  • struct is the obligatory generic record. It looks like following:
  • All of the word expressions inside struct are interpreted as tree node's identifiers. Each internal record expresses the nesting relationship, the header being container's ID, and the body being the list of the nested nodes. The root record is obligatory, it points to the list of those nodes which will appear on the screen just after initialisation. All nodes appears on the screen in the same order as they were listed here.

    SEE EXAMPLE

     

  • label is the context of node's label. The record looks like following:
  • Record headers inside label are interpreted as tree node identifiers, record bodies as containing string expression which is the node label. In absence of appropriate record, the node label will be defined as equal to node identifier, the first character being converted to the upper case.

    SEE EXAMPLE

     

  • image - the context of the node's icon image location. The record has the following format:
  • Each record header inside action is interpreted as tree node's identifier, body - as containing the hiperlink expression specifying the image URL, absolute or relative to the current document base.

    SEE EXAMPLE

     

  • action - the context of node's hiperlink. It specifies the document URL and the frame which this document is to be loaded into, when the node is mouse clicked on. The record has the following format:
  • Each record header inside action is interpreted as tree node's identifier, body - as containing the hiperlink expression and optionally the word expression, the first specifying the document's URL, absolute or relative to the current document base, and the second specifying the target frame to load in. The frame can be specified by name or by the special word from the following list: _self, _blanc, _parent, _top. If the target isn't specified, its value is set to _self.

    SEE EXAMPLE

     

  • colors - system context, specifying the applet colors. The record has the following format:
  • SEE EXAMPLE

     

  • font - the system context for the label's font. The record has the following format:
  • SEE EXAMPLE

     

  • screen - the system context for some applet appearance parameters. The record has the following format:
  • SEE EXAMPLE

     

     

    3.Example.

    ***START***

    // Example #2 source file

    struct:

    ;

    // Explanation of the above record

     

    label:

    ;

    // Explanation of the above record

     

    image:

    ;

    // Explanation of the above record

     

    action:

    ;

    // Explanation of the above record

     

    colors:

    ;

    // Explanation of the above record

     

    font:

    ;

    // Explanation of the above record

     

    screen:

    ;

    // Explanation of the above record

    ***END***

    (c) 1998 EverJ Group. All rights reserved.