Documentation: Java Tree Menu v3.0
 
 
1 General
      1.1 Features
      1.2 Delivery extent
      1.3 Usage of jtm3_0.jar
2 Menu-Applet: Menu3_0.class
      2.1 Scrollbars (optional)
      2.2 Parameter for general menu adjustments (optional)
     
      2.2.1 Functionality
      2.2.2 Optics of the Menu Area
     
      2.2.2.1 Colors and Images
      2.2.2.2 Sizes and Margins
      2.2.3 Optics of the Arrow Area
     
      2.2.3.1 Colors and Images
      2.2.3.2 Sizes and Margins
      2.3 Font-Styles (optional)
      2.4 Symbols (optional)
      2.5 Menu definition (required)
3 Image-Applet: DisplayImage3_0.class (optional)
4 JavaScript Support
5 Tips and Tricks
 

 

1 General

Java Tree Menu is a tool for the simple generation of tree based menus that suffices through extensive formation possibilities both simple, and complex requirements.
The menu will be created by an own syntax, which is easy to learn. The menu components are defined into characteristic blocks (Images, Symbols, Fonts, Menu), whose components can be used directly or by simple assignment by the other blocks. This modular structure enables an optimal overall view and therefore also a simple maintenance.
Except from the definition of the menu block, all components are optional by what means menus with strongly varying appearance and functionality can be produced. Especially the possibility should be mentioned to produce special Fonts, that can contain next to the general characteristics also a shadow representation and/or a press down effect.
Next to the design possibilities, that results through flexible usage of the optional components, by assignment of special parameters, basic outlooks can be adapted like colors, sizes, margins, representation of the selection bar, elimination of the arrow area, etc. Also functional changes can be made by simple parameter assignment, e.g. the automatic closure of open folders when selecting a new topic, the activation and placement of the scrollbars or the possibility to determine, whether the image of the last selected topic should become the new default image in the optional image representation.

 

 

1.1 Features

All features mentioned here are limited to that what is possible by the programming language Java. I.e. that for example no fonts can be used, that are not supported by Java.

 

 

1.2 Delivery extent

 

1.3 Usage of jtm3_0.jar

The applets which are available and all accompanying classes are compressed in only one jar-file. This reduces both the data to be transmitted, and the connections to be made to the server.
Following applets contained therein can be used:

Consider that the JAR-file must be indicated in the applet parameter.

Example 1: <APPLET CODE="Menu3_0.class" WIDTH="140" HEIGHT="450" ARCHIVE="jtm3_0.jar">
Example 2: <APPLET CODE="DisplayImage3_0.class" WIDTH="150" HEIGHT="150" Name="MenuImages" ARCHIVE="jtm3_0.jar">

Important:
Both applets need the author parameter, which must be identical to:

<PARAM NAME="Author" VALUE="JTM - Java Tree Menu - (c) exsys GbR Emden - www.exsys.net">

Please, copy and paste this value to prevent typing errors.

 

 

2 Menü-Applet: Menu3_0.class

This applet is the main component of the menu and has 5 parameter-areas.

 

2.1 Scrollbars (optional)

Example: <PARAM NAME=VScrollBar VALUE="as_needed">
  <PARAM NAME=HScrollBar VALUE="as_needed">
  <PARAM NAME=HScrollBarPosition VALUE="bottom">
  <PARAM NAME=VScrollBarPosition VALUE="left">
  <PARAM NAME=ScrollBarWidth VALUE="9">
  <PARAM NAME=ScrollBarBGColor VALUE="0x000000">
  <PARAM NAME=ScrollBarButtonColor VALUE="0xAAAAAA">
  <PARAM NAME=ScrollBarSliderColor VALUE="0xAAAAAA">
  <PARAM NAME=ScrollBarLineColor VALUE="0xAAAAAA">
  <PARAM NAME=ScrollBarArrowColor VALUE="0x000000">
  <PARAM NAME=ScrollBarActiveArrowColor VALUE="0xFF0000">
  <PARAM NAME=ScrollBarUnusedSpaceColor VALUE="0x000000">

 

Parameter:

Name: VScrollbar
Description: Determines, when the vertical scrollbar should be displayed
Values: ALWAYS, NEVER, AS_NEEDED
Default: AS_NEEDED

 

Name: HScrollbar
Description: Determines, when the horizontal scrollbar should be displayed
Values: ALWAYS, NEVER, AS_NEEDED
Default: AS_NEEDED

 

Name: VScrollbarPosition
Description: Whether the vertical scrollbar should be displayed to the left or to the right side
Values: LEFT, RIGHT
Default: RIGHT

 

Name: HScrollbarPosition
Description: Whether the horizontal scrollbar should be displayed on the top or on the bottom
Values: TOP, BOTTOM
Default: BOTTOM

 

Name: ScrollbarWidth
Description: Width (vertical scrollbar) or height (horizontal scrollbar) of the scrollbars. The minimum value is 9 pixel
Value: integer value >= 9
Default: 9 pixel

 

Name: VScrollbarLeftMargin
Description: Left margin of the vertical scrollbar
Value: integer value >= 0
Default: 0 pixel

 

Name: VScrollbarRightMargin
Description: Right margin of the vertical scrollbar
Value: integer value >= 0
Default: 0 pixel

 

Name: HScrollbarTopMargin
Description: Upper margin of the horizontal scrollbar
Value: integer value >= 0
Default: 0 pixel

 

Name: HScrollbarBottomMargin
Description: Lower margin of the horizontal scrollbar
Value: integer value >= 0
Default: 0 pixel

 

Name: ScrollbarBGColor
Description: Background color of the scrollbars
Value: hexadecimal, in the form: 0xrrggbb or #rrggbb
Default: grey (0xCCCCCC)

 

Name: ScrollbarButtonColor
Description: Color of the scrolling buttons
Value: hexadecimal, in the form: 0xrrggbb or #rrggbb
Default: grey (0xAAAAAA)

 

Name: ScrollbarSliderColor
Description: Color of the slider
Value: hexadecimal, in the form: 0xrrggbb or #rrggbb
Default: grey (0xAAAAAA)

 

Name: ScrollbarLineColor
Description: Color of the line which connects the scrolling buttons
Value: hexadecimal, in the form: 0xrrggbb or #rrggbb
Default: grey (0xAAAAAA)

 

Name: ScrollbarArrowColor
Description: Color of the arrows on the scrolling buttons
Value: hexadecimal, in the form: 0xrrggbb or #rrggbb
Default: black (0x000000)

 

Name: ScrollbarActiveArrowColor
Description: Color of the active arrows on the scrolling buttons. The arrows will become active, as soon as the mouse moves over them
Value: hexadecimal, in the form: 0xrrggbb or #rrggbb
Default: red (0xFF0000)

 

Name: ScrollbarUnusedSpaceColor
Description: Color of the unsused area in the corner that emerges if the horizontal and the vertical scrollbars are displayed at the same time, as well as the areas that arise by assignment of a margin value greater than 0
Value: hexadecimal, in the form: 0xrrggbb or #rrggbb
Default: white (0xFFFFFF)

 

 

 

2.2 Parameter for general menu adjustments (optional)

Example: <PARAM NAME=DisplayArrow VALUE="YES">
  <PARAM NAME=OpenSound VALUE="open.au">
  <PARAM NAME=BGColor VALUE="0xFFFFFF">
  <PARAM NAME=LayerIndent VALUE="15">

 

 

2.2.1 Functionality

 

Name: LoadingMessage
Description: Message that should be displayed until the menu data is completely loaded and processed
Value: Text
Default: -

 

Name: DisplayProgressBar
Description: Enabling or disabling the representation of the progressbar, which informs about the loading progress
Value: TRUE, YES, ON or FALSE, NO, OFF
Default: YES

 

Name: ImageAppletName
Description: Name of the applet for the image representation. This parameter is only necessary if the Image-Applet (DisplayImage) is used
Value: Name of the applet: DisplayImage
Default: -

 

Name: OverwriteDefaultImage
Description: Depending on this value, if the mouse is not pointing on a topic, either the default image (NO) or the image of the last selected topic (YES) is displayed, as far as it loads a page
Value: TRUE, YES, ON or FALSE, NO, OFF
Default: YES

 

Name: DisplayConnectionLines
Description: Enabling or disabling the representation of the lines (rectangles) connecting the topics, in order to get an outlook similar to the Windows Explorer
Value: TRUE, YES, ON or FALSE, NO, OFF
Default: NO

 

Name: DisplayArrow
Description: Enabling or disabling the representation of the arrow area at the left menu side
Value: TRUE, YES, ON or FALSE, NO, OFF
Default: YES

 

Name: DisplayBar
Description: Determines whether the selection bar is represented. The topic under the mouse will be marked in the turned off condition through BarTextColor
Value: TRUE, YES, ON or FALSE, NO, OFF
Default: YES

 

Name: AutoCloseMenus
Description: Determines whether directories are automatically closed when opening another directory or when selecting a topic, as far as it loads a page.
Opened directories, that contain a Target- and URL-statement, will first load the page and than close it on the second selection
Value: TRUE, YES, ON or FALSE, NO, OFF
Default: YES

 

Name: DefaultTarget
Description: Definition of the default target. This target will only be used, if a topic has no target - regardless if directly assigned or by inheritance
Value:
  • Name of the frames
  • "_self"
  • "_blank"
  • "_parent"
  • "_top"
Default: -

 

Name: DefaultTarget2
Description: Definition of the default target for the optional second hyperlink. This target will only be used, if a topic has no target - regardless if directly assigned or by inheritance
Value:
  • Name of the frames
  • "_self"
  • "_blank"
  • "_parent"
  • "_top"
Default: -

 

Name: MouseButton2Target,
MouseButton3Target
Description: Determines, in which window/frame the page should be loaded, when using the second or third mouse button. When using one of these 2 buttons, no optical modification is done at the menu because they are mostly used to open a new window
Value:
  • Name of the frames
  • "_self"
  • "_blank"
  • "_parent"
  • "_top"
Default: Value of the left (first) mouse button

 

Name: MouseButton2Target2,
MouseButton3Target2
Description: Determines, in which window/frame the page of the optional second hyperlink should be loaded, when using the second or third mouse button. When using one of these 2 buttons, no optical modification is done at the menu because they are mostly used to open a new window
Value:
  • Name of the frames
  • "_self"
  • "_blank"
  • "_parent"
  • "_top"
Default: Value of the left (first) mouse button

 

Name: OpenSound
Description: Sound that is played back when opening a directory. Format must be *.au
Value: Audio file of the au-format
Default: -

 

Name: CloseSound
Description: Sound that is played back when closing a directory. Format must be *.au
Value: Audio file of the au-format
Default: -

 

Name: LoadSound
Description: Sound that is played back when loading a page. Format must be *.au
Value: Audio file of the au-format
Default: -

 

 

2.2.2 Optics of the Menu Area

 

2.2.2.1 Colors and Images

 

Name: LoadingBGColor
Description: Background color of the menu until the menu data is completely loaded and processed
Value: hexadecimal, in the form: 0xrrggbb or #rrggbb
Default: black

 

Name: LoadingTextColor
Description: Text color with which the loading message is displayed until the menu data is completely loaded and processed
Value: hexadecimal, in the form: 0xrrggbb or #rrggbb
Default: white

 

Name: ProgressBarColor
Description: Color of the progressbar, which informs about the loading progress
Value: hexadecimal, in the form: 0xrrggbb or #rrggbb
Default: grey

 

Name: BGImage
Description: Name of the background image file. The image is displayed in the original size at the upper left corner of the arrow area and covers both, the arrow area and the menu area
Value: Image file. Format: gif or jpg
Default: -

 

Name: BGColor
Description: Background color of the menu area. The background color should also be assigned if a background image is used, which contains transparent components
Value: hexadecimal, in the form: 0xrrggbb or #rrggbb
Default: black

 

Name: TextColor
Description: Normal text color to display the topic text
Value: hexadecimal, in the form: 0xrrggbb or #rrggbb
Default: white

 

Name: BarColor
Description: Color of the selection bar, as far as it is turned on
Value: hexadecimal, in the form: 0xrrggbb or #rrggbb
Default: white

 

Name: BarTextColor
Description: Text color of the topic marked by the selection bar, also if the bar is turned off
Value: hexadecimal, in the form: 0xrrggbb or #rrggbb
Default: black

 

Name: ActiveTextColor
Description: Text color of the last selected topic. Topics are marked as selected, as far as they load a page - even if they are representing a folder. Pages are loaded if both Target and URL are defined
Value: hexadecimal, in the form: 0xrrggbb or #rrggbb
Default: yellow

 

Name: ConnectionRectangleColor
Description: Outline color of the rectangles representing the state of the corresponding folder and that are also used to connect the topics using dotted lines
Value: hexadecimal, in the form: 0xrrggbb or #rrggbb
Default: grey (0x999999)

 

Name: ConnectionRectangleSymbolColor
Description: Color of the symbols within the rectangles representing the state of the corresponding folder and that are also used to connect the topics using dotted lines
Value: hexadecimal, in the form: 0xrrggbb or #rrggbb
Default: grey (0xCCCCCC)

 

Name: ConnectionLinesColor
Description: Color of the dotted lines connecting the topics
Value: hexadecimal, in the form: 0xrrggbb or #rrggbb
Default: grey (0x999999)

 

Name: LineColor
Description: Color of the line between the menu area and the arrow area
Value: hexadecimal, in the form: 0xrrggbb or #rrggbb
Default: white

 

 

2.2.2.2 Sizes and Margins

 

Name: ProgressBarHeight
Description: Height of the progressbar, which informs about the loading progress
Value: integer value >= 4
Default: 12 pixel

 

Name: LayerIndent
Description: Value in pixel, to which each menu level should be intended to the right
Value: integer value >= 0
Default: 15 pixel

 

Name: TopMargin
Description: Margin from the top of the menu area to the top of the first topic. This margin is not an unused area, because it is used to display topics when the menu is scrolled down
Value: integer value >= 0
Default: 10 pixel

 

Name: LeftMargin
Description: Left margin - from the separation line to the beginning of the next component
Value: integer value >= 0
Default: 2 pixel

 

Name: ConnectionRectangleWidth
Description: Width of the rectangles representing the state of the folders, and also connect the topics with each other using dotted lines
Value: integer value >= 7
Default: 9 pixel

 

Name: ConnectionRectangleHeight
Description: Height of the rectangles representing the state of the folders, and also connect the topics with each other using dotted lines
Value: integer value >= 7
Default: 9 pixel

 

Name: ConnectionRectangleRightMargin
Description: Margin on the right side of the rectangle. This margin is used to connect the rectangle with the icon using a dotted line. The margin will also be applied if the topic is not representing a folder and therefore has no rectangle.
The margin will only be applied when the display of the connection lines (and rectangles) is enabled.
Value: integer value >= 0
Default: 7 pixel

 

Name: LeftTextMargin
Description: Additional space on the left side of the selection bar and/or the topic text. This space is not used by the selection bar
Value: integer value >= 0
Default: 0 pixel

 

Name: TopTopicMargin
Description: Additional top margin of each topic in order to expand the distance between the topics, without changing the size of the selection bar
Value: integer value >= 0
Default: 2 pixel

 

Name: BottomTopicMargin
Description: Additional bottom margin of each topic in order to expand the distance between the topics, without changing the size of the selection bar
Value: integer value >= 0
Default: 1 pixel

 

Name: TopBarExtension
Description: Additional top height of the selection bar. The distance between the topics also expands by this value
Value: integer value >= 0
Default: 1 pixel

 

Name: BottomBarExtension
Description: Additional bottom height of the selection bar. The distance between the topics also expands by this value
Value: integer value >= 0
Default: 1 pixel

 

Name: LeftBarExtension
Description: Increments the size of the selection bar on the left side
Value: integer value >= 0
Default: 1 pixel

 

Name: RightBarExtension
Description: Increments the size of the selection bar on the right side
Value: integer value >= 0
Default: 1 pixel

 

 

2.2.3 Optics of the Arrow Area

2.2.3.1 Colors and Images

 

Name: ArrowImage
Description: Name of the image file for the arrow representation. Graphics format must be *.jpg or *.gif (image/animation). If no value is assigned to this parameter, a default arrow will be used
Value: Image file. Format: gif or jpg
Default: -

 

Name: ArrowColor
Description: Color in which the default arrow should be displayed. This parameter finds no use, if an image is selected to display the arrow
Value: hexadecimal, in the form: 0xrrggbb or #rrggbb
Default: white

 

Name: ArrowBGColor
Description: Background color of the arrow area. The background color should also be assigned if a background image is used, which contains transparent components
If no value is assigned, then the background color of the menu area will be used (BGColor)
Value: hexadecimal, in the form: 0xrrggbb or #rrggbb
Default: black or the background color of the menu area (BGColor)

 

 

2.2.3.2 Sizes and Margins

 

Name: ArrowWidth
Description: Width of the arrow
Value: integer value >= 0
Default: see comment

 

Name: ArrowHeight
Description: Height of the arrow
Value: integer value >= 0
Default: see comment

 

Name: ArrowLeftMargin
Description: Left margin - from the beginning of the arrow area to the beginning of the arrow
Value: integer value >= 0
Default: 1 pixel

 

Name: ArrowRightMargin
Description: Right margin - from the end of the arrow to the end of the arrow area
Value: integer value >= 0
Default: 1 pixel

 

Comment:
If no value is assigned to ArrowWidth or ArrowHeight and no arrow image is used, then the size of the arrow depends on the size of the font of the main menu (first defined font style). Otherwise, if an arrow image is used and no sizes are assigned, then the original image size will be used for the arrow display.

 

 

2.3 Font-Styles (optional)

When creating the font list, following rules are valid:

 

Example: <PARAM NAME=TextShadowColor VALUE="0x666666">
  <PARAM NAME=BarTextShadowColor VALUE="0x9999FF">
  <PARAM NAME=ActiveTextShadowColor VALUE="0x883333">
   
  <PARAM NAME="FONTS" VALUE="
 
          {  
            Name='F1'; Font='Helvetica'; Size='14'; Style='Bold'; ShiftX='2'; ShiftY='1'; Shadow = 'Yes'; PressDown ='YES' |
            Name='F2'; Font='Helvetica'; Size='12'; Style='Bold'; ShiftX='2'; ShiftY='1'; Shadow = 'No'; PressDown ='YES' |
            Name='F3'; Font='TimesRoman'; Size='11'; Style='Italic'+'Bold'
          }">  
             
   

Parameter:

Name: TextShadowColor
Description: Shadow color for the normal displayed topics. This statement finds only use if a font style with shadow representation is in use
Value: hexadecimal, in the form: 0xrrggbb or #rrggbb
Default: -

 

Name: BarTextShadowColor
Description: Shadow color for topics, on which the selection bar is located, indifferently whether the bar is turned on or not. There is no shadow displayed on topics in the pressed down state, so that in this case the parameter is of no use
Value: hexadecimal, in the form: 0xrrggbb or #rrggbb
Default: -

 

Name: ActiveTextShadowColor
Description: Shadow color for the last selected topic. Topics are marked as selected, as far as these load a page - even if these are representing a folder. Pages are loaded if both Target and URL are defined.
This parameter finds only use if a font style with shadow is used
Value: hexadecimal, in the form: 0xrrggbb or #rrggbb
Default: -

 

Name: Fonts
Description: List of all used font styles
Value: see description in 'Keywords related to Fonts'
Default: -

 

Keywords related to Fonts:

Name: Name
Description: Freely selectable name in order to be able to directly address the font while defining the menu structure block. If no explicit font assignment should be done, this keyword is of no use
Value: Text
Default: -

 

Name: Font
Description: Defines which font should be used
Value:
  • Serif or TimesRoman
  • SansSerif or Helvetica
  • Monospaced or Courier
  • Dialog
  • DialogInput
Default: Serif

Comment:
MS IE distinguishes between capital and small letters, when fonts are specified

 

Name: Size
Description: Size of the font
Value: integer value
Default: 12

 

Name: Style
Description: Style of the font.The different font styles can be combined through the ‘+‘-char (see above-mentioned example), whereby double designations can lead to falsifications
Value:
  • Bold
  • Plain
  • Italic
Default: Plain

 

Name: Shadow
Description: To turn the shadow display on or off. To activate the shadow effect also the corresponding shadow colors must be defined
Value: TRUE, YES, ON or FALSE, NO, OFF
Default: OFF

 

Name: PressDown
Description: Determines whether the topics should have a press down effect, if the mouse is located on the corresponding topic
Value: TRUE, YES, ON or FALSE, NO, OFF
Default: OFF

 

Name: ShiftX
Description: Determines the displace in x-direction (horizontal), which concerns the shadow and the press down effect of the topics
Value: integer value
Default: 0

 

Name: ShiftY
Description: Determines the displace in y-direction (vertical), which concerns the shadow and the press down effect of the topics
Value: integer value
Default: 0

 

 

2.4 Symbols (optional)

A symbol can be placed in front of any topic, in order to emphasize optically its function as folder or final topic.
There are two symbol groups each with three possible states. The respective default symbols are determined by the following itemized parameters. However during the definition of the menu structure, a special symbol can be assigned to each topic.

Parameter:

Name: ClosedFolderSymbol
Description: Symbol to characterize directory topics as far as the directory is closed
Value: Image file. Format: gif or jpg
Default: -

 

Name: OpenFolderSymbol
Description: Symbol to characterize directory topics as far as the directory is open
Value: Image file. Format: gif or jpg
Default: -

 

Name: BarFolderSymbol
Description: Symbol to characterize directory topics as far as the mouse is located on them. If no value is assigned to this parameter, ClosedFolderSymbol or OpenFolderSymbol will be used instead, depending on the folder state
Value: Image file. Format: gif or jpg
Default: -

 

Name: DocumentSymbol
Description: Symbol to characterize document topics (final topics) as far as the topic is not marked as active (loaded page)
Value: Image file. Format: gif or jpg
Default: -

 

Name: LoadedDocumentSymbol
Description: Symbol to characterize document topics (final topics) as far as the topic is marked as active (loaded page)
Value: Image file. Format: gif or jpg
Default: -

 

Name: BarDocumentSymbol
Description: Symbol to characterize document topics (final topics) as far as the mouse is located on them
Value: Image file. Format: gif or jpg
Default: -

 

Name: ReservedSymbolWidth
Description: This value determines the reserved width for representation of the symbol on the left side of each menu topic.
It determines the least width, and will be adapted to the width of the symbol image if it is larger than the reserved width
Value: integer valuel
Default: 0

 

Comment:
As soon as one of the default symbol is defined, at least the amount defined by <ReservedSymbolWidth> will be reserved in front of each topic.

 

Like already mentioned, it is possible to determine specific symbols to each topic, which deviates from the default symbol. Therefore a list of all explicitly used symbols must be created, on which, in the respective topic within the menu structure definition, reference can be taken.

When creating the symbol list, following rules are valid:

 

Example: <PARAM NAME=ReservedSymbolWidth VALUE="18">
  <PARAM NAME=OpenFolderSymbol VALUE="symbols/folder_open.jpg">
  <PARAM NAME=ClosedFolderSymbol VALUE="symbols/folder_closed.jpg">
  <PARAM NAME=DocumentSymbol VALUE="symbols/document.jpg">
  <PARAM NAME=BarDocumentSymbol VALUE="symbols/document.jpg">
  <PARAM NAME=LoadedDocumentSymbol VALUE="symbols/document_loaded.jpg">
   
  <PARAM NAME=Symbols VALUE="
 
          {  
            name='empty'; file='' |
            name='email'; file='symbols/email_symbol.gif' |
            name='ArrowUp'; file='symbols/arrow_up_symbol.gif' |
            name='ArrowDown'; file='symbols/arrow_down_symbol.gif'
          }">  
   

 

Parameter:

Name: Symbols
Description: List of all explicitly used symbols
Value: see description in 'Keywords related to Symbols'
Default: -

 

Keywords related to Symbols:

Name: Name
Description: Freely selectable name in order to be able to refer directly to the symbol from within the menu structure block
Value: Text
Default: -

 

Name: File
Description: Name of the image file which contains the symbol. The name can include a path. In case of a relative path, the origin is the CodeBase (directory in which the applet is). Pay here attention to capital and small spelling
Value: Image file. Format: gif or jpg
Default: -

 

 

2.5 Menu definition (required)

The menu structure can be specified directly in the HTML file or via a separate file.
The specification in a separate file is always needed where a value (i.e. URL) contains the <">-character which, according to the HTML syntax, will close the parameter definition.
In order to load the menu structure from a separate file, the filename has to be assigned to the parameter MenuFile. Otherwise, when loading it from the HTML file, the structure is directly assigned to the parameter Menu.
If both parameters (MenuFile and Menu) are defined, MenuFile will be taken and Menu will be ignored.

Comments in a separate structure file:
A menu structure loaded from a separate file supports also the definition of comments. Comments are initiated via double slash <//> and will last till end of line. This will not work on menu structures loaded from the HTML file via the Menu parameter.

 

When creating the menu structure, following rules are valid:

 

Example: Menu structure loaded from the HTML file

HTML file:  
  <PARAM NAME="Menu" VALUE="
 
          {  
            Topic='News'; comment='News'; status='open'
           
          {  
            Topic='09.09.1999'; URL='news.html'; Target='right_frame'
          }; Image='img1'|
            Topic='Topics' ; Image='img3'; Target='right_frame'
           
          {    
              topic='General'; URL='general.html' |
              topic='Hard- and' + 'Software'; URL='hs.html' |
              topic='Service'; URL='service.html'; image='img2'
          }    
          }">  
   

 

Example: Menu structure loaded from a separate file

HTML file:  
  <PARAM NAME="MenuFile" VALUE="menu.txt">
   
File: menu.txt:  
 
          // Begin of menu structure file
          {  
            Topic='News'; comment='News'; status='open'
           
          {  
            Topic='09.09.1999'; URL='news.html'; Target='right_frame'
          }; Image='img1'|
            Topic='Topics' ; Image='img3'; Target='right_frame'
           
          {    
              topic='General'; URL='general.html' |
              topic='Hard- and' + 'Software'; URL='hs.html' |
              topic='Service'; URL='service.html'; image='img2'
          }    
          }  
          // End of menu structure file
   

 

Parameter:

Name: Menu
Description: By this parameter, the structure and parts of the functionality of the menu is defined within the HTML file
Value: See description in 'Keywords related to Menu and MenuFile'
Default: -

 

Name: MenuFile
Description: This parameter indicates which file contains the information of the menu structure
Value: Name of the file containing the menu structure. See description in 'Keywords related to Menu and MenuFile' for its content
Default: -

 

Keywords related to Menu and MenuFile:

Name: Topic
Description: Displayed topic text. The contents of multi lined topics can be connected with the ‘ +‘-char.
If the keyword topic is not defined, the topic will be interpreted as a dividing line. The size of this dividing line can be adjusted by assigning a special font to that topic
Value: Text
Default: -

 

Name: URL
Description: Address of the page to be loaded.
In case of missing both URL values on a final topic (those that are not folders), the topic will be handled as a comment
Value: Either a relative address to the CodeBase (directory in which the applet is) or an absolute address to the web
Default: -

 

Name: URL2
Description: Address of the second page to be loaded.
In case of missing both URL values on a final topic (those that are not folders), the topic will be handled as a comment
Value: Either a relative address to the CodeBase (directory in which the applet is) or an absolute address to the web
Default: -

 

Name: Target
Description: Window/frame in which the page stated in URL should be loaded
Value:
  • Name of the frame
  • "_self"
  • "_blank"
  • "_parent"
  • "_top"
Default: -

 

Name: Target2
Description: Window/frame in which the page stated in URL2 should be loaded
Value:
  • Name of the frame
  • "_self"
  • "_blank"
  • "_parent"
  • "_top"
Default: -

 

Name: Comment
Description: Text, that should be displayed in the status line of the browser, as soon as the mouse is located over the corresponding topic
Value: Text
Default: -

 

Name: Symbol
Description: Explicit symbol assignment for the normal (inactive) state of the topic
Value: Name of the symbol, in accordance with the definition in the symbol list
Default: DocumentSymbol (final topic) or ClosedFolderSymbol (folder topic)

 

Name: OpenSymbol
Description: Explicit symbol assignment for the active (loaded/open) condition
Value: Name of the symbol, in accordance with the definition in the symbol list
Default: LoadedDocumentSymbol (final topic) or OpenFolderSymbol (folder topic)

 

Name: BarSymbol
Description: Explicit symbol assignment, for the condition, in which the mouse is located on the topic
Value: Name of the symbol, in accordance with the definition in the symbol list
Default: BarDocumentSymbol (final topic) or BarFolderSymbol (folder topic)

 

Name: Status
Description: Determines whether the topic (in case of a folder) is represented as open folder when starting the applet.
If Status is set to FixOpen, the folder will remain open regardless of the user actions and other property settings.
Folders with a Status of FixOpen and without the ability to load a page (URL and Target defined) will be handled like comments (without functionality). This means that they will not be highlighted by the selection bar, but they will still perform the behaviour defined by their font (shadow and press-down effect)
Value: Open, Close or FixOpen
Default: Close

 

Name: Font
Description: Explicit assignment of a font to display this topic
Value: Name of the font, in accordance with the definition in the font list
Default: Font from the font list in dependence of its level (see rules to create font lists)

 

Name: Color
Description: Explicit color assignment for the normal topic text representation
Value: hexadecimal, in the form: 0xrrggbb or #rrggbb
Default: TextColor

 

Name: ShadowColor
Description: Explicit shadow color assignment for the normal topic text representation. This value serves to adjust the shadow color of a topic if the text color also was explicitly changed
Value: hexadecimal, in the form: 0xrrggbb or #rrggbb
Default: TextShadowColor

 

Name: Image
Description: Image that should be displayed in the DisplayImage-applet as soon as the mouse is located over the corresponding topic
Value: Name of the image file, in accordance to the definition in the image list of the DisplayImage-applet
Default: -

 

Comment:
Pages are loaded only then if in the respective topic (folder or final topic) the URL and the Target are known.

 

 

3 Image-Applet: DisplayImage3_0.class (optional)

To improve the optical design of the web page, an image can be displayed in dependency to each topic. It will be displayed as soon as the mouse is located on the respective topic.
Because of the reason, that the applet which displays the images is a separate applet, a free placement of the image will be possible. The freedom in placing this applet can depend next to the general valid rules also to the rules of the respectively used browser. Generally the DisplayImage applet cannot be placed in a frame other than that including the menu applet.

 

When creating the image list, following rules are valid:

 

Example: <APPLET CODE="DisplayImage3_0.class" WIDTH="150" HEIGHT="150" Name="MenuImages" ARCHIVE="jtm3_0.jar">
   
  <PARAM NAME=Author VALUE="JTM - Java Tree Menu - (c) exsys GbR Emden - www.exsys.net">
   
  <PARAM NAME=BGColor VALUE="0x00FF00">
  <PARAM NAME=IMAGES VALUE="
 
          {    
            name='default'; file='' |  
            name='img1'; file='image1.gif' |  
            name='img2'; file='image2.jpg' |  
            name='img3'; file='image3.jpg'  
          }">    
   
  </APPLET>
   

 

Parameter:

Name: LoadingTextColor
Description: Text color with which the loading message is displayed until the corresponding image is completely loaded and ready to be displayed
Value: hexadecimal, in the form: 0xrrggbb or #rrggbb
Default: white

 

Name: LoadingMessage
Description: Message that should be displayed until the corresponding image is completely loaded and can be displayed
Value: Text
Default: -

 

Name: BGColor
Description: Background color. Needed if the displayed image is smaller than the applet area or if no image is displayed
Value: hexadecimal, in the form: 0xrrggbb or #rrggbb
Default: black

 

Name: BGImage
Description: Name of the background image file. The image is displayed in the original size at the upper left corner
Value: Image file. Format: gif or jpg
Default: -

 

Name: Images
Description: List of all used images
Value: see description in 'Keywords related to Images'
Default: -

 

Keywords related to Images:

Name: Name
Description: Freely selectable name in order to be able to refer directly to the image from within the menu structure block
Value: Text
Default: -

 

Name: File
Description: Name of the image file. The name can include a path. The origin, in case of a relative path, is the CodeBase (directory in which the applet is). Pay here attention to capital and small spelling
Value: Image file. Format: gif or jpg
Default: -

 

 

 

4 JavaScript Support

The execution of a JavaScript call when selecting a topic is equivalent to the principle of performing a hyperlink call.
Any topic can get a JavaScript function, that will be executed when selecting the corresponding topic, by assigning it to the parameter JSCall. Any parameter of the JavaScript function must be defined as string using quotation marks ".
Because the quotation marks are used by HTML to close a parameter definition, JavaScript functions with parameters are only usable when defining the menu structure in a separate file.

Example:

JSCall='displayText("hello")'

 

It's required to add the keyword MAYSCRIPT to the applet definition within the HTML file, in order to be able to use this feature.

 

Attention:
This feature is not supported by all browsers

 

Example: HTML-File

<HTML>
<HEAD></HEAD>
<BODY>

<SCRIPT LANGUAGE="JavaScript">
    <!--
    function test(text) {
        javascript:alert(text);
    }
    //-->
</SCRIPT>

<APPLET CODE="Menu3_0.class" ARCHIVE="jtm3_0.jar" WIDTH="160" HEIGHT="300" MAYSCRIPT>

<PARAM NAME="Author" VALUE="JTM - Java Tree Menu - (c) exsys GbR Emden - www.exsys.net">
<PARAM NAME="DefaultTarget" VALUE="right_frame">
<PARAM NAME="DefaultTarget2" VALUE="bottom_frame">
<PARAM NAME="ReservedSymbolWidth" VALUE="16">
<PARAM NAME="OpenFolderSymbol" VALUE="symbols/ordner_open.gif">
<PARAM NAME="ClosedFolderSymbol" VALUE="symbols/ordner_closed.gif">
<PARAM NAME="DocumentSymbol" VALUE="symbols/graydot.gif">
<PARAM NAME="LoadedDocumentSymbol" VALUE="symbols/reddot.gif">
<PARAM NAME="BarDocumentSymbol" VALUE="symbols/greendot.gif">
<PARAM NAME="DisplayBar" VALUE="Yes">
<PARAM NAME="DisplayConnectionLines" VALUE="Yes">
<PARAM NAME="ConnectionLinesColor" VALUE="0x888888">
<PARAM NAME="ConnectionRectangleColor" VALUE="0x888888">
<PARAM NAME="ConnectionRectangleSymbolColor" VALUE="0x000000">
<PARAM NAME="LineColor" VALUE="0xF5F5FF">
<PARAM NAME="BGColor" VALUE="0xF5F5FF">
<PARAM NAME="TextColor" VALUE="0x000000">
<PARAM NAME="ActiveTextColor" VALUE="0xA51900">
<PARAM NAME="BarColor" VALUE="0xAAAAAA">
<PARAM NAME="BarTextColor" VALUE="0x105010">

<PARAM NAME="MenuFile" VALUE="menufile.txt">

</APPLET>

</BODY>
</HTML>

 

 

Example: Menu-File

 
          // Begin of menu structure file
          {  
            Topic='News'; comment='News'; status='open'
           
          {  
            Topic='09.09.1999'; URL='news.html'; JSCall='test("Hello")'
          }; Image='img1'|
            Topic='Topics' ; Image='img3'
           
          {    
              topic='General'; JSCall='javascript:alert("alert")' |
              topic='Hard- and' + 'Software'; URL='hs.html'; URL2='new.html' |
              topic='Service'; URL='service.html'; image='img2'
          }    
          }  
          // End of menu structure file
   

 

 

 

5 Tips and Tricks

  1. Especially when creating a complex menu, the input data should clearly be formed by massive structuring/indenting
  2. The creation of more complex menus should be done stepwise. So mistakes can be found and removed faster when making some tests from time to time
  3. When defining the menu structure block the amount of data can be limited by use of the possibility to inherit the values of 'Target' and 'Image' to the subtopics
  4. In order to be optically able to distinguish folder topics from final topics (especially when not using symbols), it is a good solution to assign them different font styles
  5. The most frequently occurring mistake is the incorrect usage of the dividing char ‘|‘ as well as the usage of quotes (') inside a value assignment
  6. If possible, avoid the usage of animated images with transparent colors, because these are partially incorrectly displayed by Java