JDDM (Drop Down Menu)

DD

NameJDDM (Drop Down Menu)
Version2.1.003
Date2006-02-04
AuthorNicola Asuni
CopyrightTecnick.com S.r.l.
Via Ugo Foscolo n.19
09045 Quartu Sant'Elena (CA)
ITALY
www.tecnick.com
LicenseGNU GENERAL PUBLIC LICENSE v.2

Description

JDDM (Drop Down Menu) is a drop down java menu applet, a comprehensive solution for website navigation.
JDDM is browser-independent and highly-configurable, it could be easily customized to fit your website needs and to achieve an unlimited variety of menu appearances and behaviors.
JDDM let you generate vertical and horizontal menus with unlimited number of nested pop-up submenus, various color schemes, buttons, fonts, icons and sounds.

Main Features

Setup

To display the JDDM (Drop Down Menu), copy the .jar file on your site and add the applet tag to your XHTML/HTML document. To customize quickly the menu, I suggest to cut and paste the applet tag code used in the online examples and modify it to fit your needs.

The following tables illustrates the meaning and function of each attribute and parameter.

[Applet Attributes | Main Parameters | Elements Parameters]


Applet Attributes
(<applet attribute_name="attribute_value" ... >)
name values default required
codebase relative path to applet archive directory (e.g.: "../java/")   yes
archive jddm.jar (name of applet archive)   yes
code com.tecnick.jddm.Jddm.class (name of main class)   yes
width applet width in pixels   yes
height applet height in pixels   yes
hspace applet horizontal space   no
vspace applet vertical space   no
align applet alignment
  • left
  • right
  • top
  • middle
  • bottom
  no
name applet name   no
id applet id   no
alt applet alternate text content   no


The following are the main applet parameters.
Note: the "default_" prefix indicate default parameters for main items.

Main Parameters
(<param name="param_name" value="param_value" />)
name values default required
mayscript mayscript (needed for javascript calls support)   yes
horizontal
  • true display menu as horizontal bar
  • false display menu as vertical bar
true no
popup_position submenu popup position relative to main menu
  • LEFT
  • RIGHT
  • TOP
  • BOTTOM
BOTTOM no
arrow_position submenu arrow image position on menu button
  • LEFT
  • RIGHT
RIGHT no
page_encoding encoding character set of the html page where the applet is loaded   no
default_encoding encoding character set for the applet   no
default_target name of the frame target where resources pointed by items will be rendered.
The following target names have special meanings:
  • _blank : the user agent should load the designated document in a new, unnamed window.
  • _self : the user agent should load the document in the same frame as the element that refers to this target.
  • _parent : the user agent should load the document into the immediate FRAMESET parent of the current frame. This value is equivalent to _self if the current frame has no parent.
  • _top : the user agent should load the document into the full, original window (thus canceling all other frames). This value is equivalent to _self if the current frame has no parent.
_self no
disabled_msg default description for disabled items DISABLED no
default_arrow_img_off relative path to default submenu arrow image for normal state   no
default_arrow_img_over relative path to default submenu arrow image for mouse-over state   no
default_arrow_img_on relative path to default submenu arrow image for mouse-click state   no
default_label_position default text position relative to icon
  • LEFT
  • RIGHT
  • TOP
  • BOTTOM
RIGHT no
default_center_block
  • true center text and image on button
  • false
false no
default_vmargin default vertical distance in pixels between buttons 0 no
default_hmargin default horizontal distance in pixels between buttons 0 no
default_padding minimum distance in pixels between button borders and button elements (text or image)
this parameter supports a single value for all elements or a detailed description for each border (LEFT:RIGHT:TOP:BOTTOM)
2:2:2:2 no
default_gap minimum distance in pixels between text and image on button 2 no
default_border_width width in pixels of 3D button bevel (0=disabled) 2 no
default_pushed
  • true active pushed effect for main items
  • false disable pushed effect for main items
true no
default_main_font main buttons font name Helvetica no
default_main_font_style main buttons font style
  • PLAIN
  • BOLD
  • ITALIC
  • BOLD+ITALIC
PLAIN no
default_main_font_size buttons vertical font size in pixels 11 no
default_submenu_font submenus font name Helvetica no
default_submenu_font_style submenus font style
  • PLAIN
  • BOLD
  • ITALIC
  • BOLD+ITALIC
PLAIN no
default_submenu_font_size submenus font size in pixels 11 no
background_col applet background color
- the color format is a set of three hexadecimal numbers (from 00 to FF) representing primary colors RRGGBB (R=Red, G=Green, B=Blue)
FFFFFF no
default_colbck_off button background color when mouse is off
- the color format is a set of three hexadecimal numbers (from 00 to FF) representing primary colors RRGGBB (R=Red, G=Green, B=Blue)
ECE9D8 no
default_colbck_over button background color when mouse is over
- the color format is a set of three hexadecimal numbers (from 00 to FF) representing primary colors RRGGBB (R=Red, G=Green, B=Blue)
3366CC no
default_colbck_on button background color when mouse is on
- the color format is a set of three hexadecimal numbers (from 00 to FF) representing primary colors RRGGBB (R=Red, G=Green, B=Blue)
ADAA99 no
default_coltxt_off button text color when mouse is off
- the color format is a set of three hexadecimal numbers (from 00 to FF) representing primary colors RRGGBB (R=Red, G=Green, B=Blue)
000000 no
default_coltxt_over button text color when mouse is over
- the color format is a set of three hexadecimal numbers (from 00 to FF) representing primary colors RRGGBB (R=Red, G=Green, B=Blue)
FFFFFF no
default_coltxt_on button text color when mouse is on
- the color format is a set of three hexadecimal numbers (from 00 to FF) representing primary colors RRGGBB (R=Red, G=Green, B=Blue)
000000 no
default_colsdw_off button text shadow color when mouse is off
- the color format is a set of three hexadecimal numbers (from 00 to FF) representing primary colors RRGGBB (R=Red, G=Green, B=Blue)
FFFFFF no
default_colsdw_over button text shadow color when mouse is over
- the color format is a set of three hexadecimal numbers (from 00 to FF) representing primary colors RRGGBB (R=Red, G=Green, B=Blue)
FFFFFF no
default_colsdw_on button text shadow color when mouse is on
- the color format is a set of three hexadecimal numbers (from 00 to FF) representing primary colors RRGGBB (R=Red, G=Green, B=Blue)
FFFFFF no
default_shadow_x horizontal relative position in pixels of text shadow 0 no
default_shadow_y vertical relative position in pixels of text shadow 0 no
default_bck_img_off relative path to buttons background image that will be displayed when mouse is off this menu item (works only with main buttons)   no
default_bck_img_over relative path to buttons background image that will be displayed when mouse is over this menu item (works only with main buttons)   no
default_bck_img_on relative path to buttons background image that will be displayed when mouse is clicked on this menu item (works only with main buttons)   no
default_icon_off relative path to default image icon that will be displayed on main items when mouse is off   no
default_icon_over relative path to default image icon that will be displayed on main items when mouse is over   no
default_icon_on relative path to default image icon that will be displayed on main items when mouse is on   no
default_sound_over relative path to audio file for mouse over button
- the file must be in the following format:
8-bit mu-Law Encoded Next/Sun AU - 8000Hz, 16-bit, Mono
  no
default_sound_click relative path to audio file for mouse click on button
- the file must be in the following format:
8-bit mu-Law Encoded Next/Sun AU - 8000Hz, 16-bit, Mono
  no
data_file Relative path to text file containing menu elements data.
This file must be located on the same directory of jddm.jar file.
If this parameter is specified, then the following table parameters will be ignored.
  no


The following are the parameters that could be set for each menu element. The # character on parameter name must be changed with the ID of the corresponding menu element.

It's also possible to load the following parameters from an external text file by setting the previous data_file parameter. This file can be generated dynamically using a server-side script, manually or by editing the menu_data.xls file with Microsoft Excel and saving it as Tab delimited Text (remember to remove the first row that contain parameters names).

The external data file format is:
  • Each row (red number on figure) identify one menu element (each row must terminate with newline character '\n').
  • The data values of each single element must be separated by tabulation character '\t', even if not present.
  • Elements are ordered as they appear with nested submenus (see picture at side).
  • The elements data values are the values of following table parameters in the same order as indicated. The first three parameters (id, subid, node) must be replaced by the level parameter (yellow numbers) value that indicate the indentation level (0 = main element; 1 = element of submenu that is child of one main element; 2 = element of submenu that is child of one element of level 1; ...).
JDDM indentation levels


Elements Parameters
(<param name="param_name" value="param_value" />)
name values default required
id# progressive menu item identification number (starting from 1)
this value must be the same indicated by the "#" character on this parameter name
0 yes
subid# ID value of parent node 0 yes
node#
  • true this element is a node (open a sub-menu)
  • false this element is a simple item
false no
enabled#
  • true this element is enabled
  • false this element is disabled
true no
link# URL (Uniform Resource Locator) pointed by this element, for example:
  • http://www.anothersite.com
  • ../../mydir/anotherpage.html
  • ftp://ftp.downloadsite.com
  • mailto:user@domain.com
  • javascript:alert("hello world")
For more information about URL (Uniform Resource Locators) see RFC1738
  no
target# name of the frame target where resource indicated by previous parameter will be rendered.
The following target names have special meanings:
  • _blank : the user agent should load the designated document in a new, unnamed window.
  • _self : the user agent should load the document in the same frame as the element that refers to this target.
  • _parent : the user agent should load the document into the immediate FRAMESET parent of the current frame. This value is equivalent to _self if the current frame has no parent.
  • _top : the user agent should load the document into the full, original window (thus canceling all other frames). This value is equivalent to _self if the current frame has no parent.
default_target no
encoding# encoding character set for this element default_encoding no
name# element name (text to display)
Note that the "\" character is used as lines separator on main items
  no
description# text to display on browser status bar for this menu item   no
label_position# default text position relative to icon
  • LEFT
  • RIGHT
  • TOP
  • BOTTOM
default_label_position no
center_block#
  • true center text and image on button
  • false
default_center_block no
padding# minimum distance in pixels between button borders and button elements (text or image)
this parameter supports a single value for all elements or a detailed description for each border (LEFT:RIGHT:TOP:BOTTOM)
default_padding no
gap# minimum distance in pixels between text and image on button default_gap no
border_width# width in pixels of 3D button bevel (0=disabled) default_border_width no
pushed#
  • true active pushed effect for main items
  • false disable pushed effect for main items
default_pushed no
font# font name default_main_font or default_submenu_font no
font_style# font style
  • PLAIN
  • BOLD
  • ITALIC
  • BOLD+ITALIC
default_main_font_style or default_submenu_font_style no
font_size# vertical font size in pixels default_main_font_size or default_submenu_font_size no
colbck_off# button background color when mouse is off
- the color format is a set of three hexadecimal numbers (from 00 to FF) representing primary colors RRGGBB (R=Red, G=Green, B=Blue)
default_colbck_off no
colbck_over# button background color when mouse is over
- the color format is a set of three hexadecimal numbers (from 00 to FF) representing primary colors RRGGBB (R=Red, G=Green, B=Blue)
default_colbck_over no
colbck_on# button background color when mouse is on
- the color format is a set of three hexadecimal numbers (from 00 to FF) representing primary colors RRGGBB (R=Red, G=Green, B=Blue)
default_colbck_on no
coltxt_off# button text color when mouse is off
- the color format is a set of three hexadecimal numbers (from 00 to FF) representing primary colors RRGGBB (R=Red, G=Green, B=Blue)
default_coltxt_off no
coltxt_over# button text color when mouse is over
- the color format is a set of three hexadecimal numbers (from 00 to FF) representing primary colors RRGGBB (R=Red, G=Green, B=Blue)
default_coltxt_over no
coltxt_on# button text color when mouse is on
- the color format is a set of three hexadecimal numbers (from 00 to FF) representing primary colors RRGGBB (R=Red, G=Green, B=Blue)
default_coltxt_on no
colsdw_off# button text shadow color when mouse is off
- the color format is a set of three hexadecimal numbers (from 00 to FF) representing primary colors RRGGBB (R=Red, G=Green, B=Blue)
default_colsdw_off no
colsdw_over# button text shadow color when mouse is over
- the color format is a set of three hexadecimal numbers (from 00 to FF) representing primary colors RRGGBB (R=Red, G=Green, B=Blue)
default_colsdw_over no
colsdw_on# button text shadow color when mouse is on
- the color format is a set of three hexadecimal numbers (from 00 to FF) representing primary colors RRGGBB (R=Red, G=Green, B=Blue)
default_colsdw_on no
shadow_x# horizontal relative position in pixels of text shadow default_shadow_x no
shadow_y# vertical relative position in pixels of text shadow default_shadow_y no
icon_off# relative path to image icon that will displayed on main item when mouse is off default_icon_off no
icon_over# relative path to image icon that will displayed on main item when mouse is over default_icon_over no
icon_on# relative path to image icon that will displayed on main item when mouse is clicked default_icon_on no
bck_img_off# relative path to buttons background image that will be displayed when mouse is off this menu item (works only with main buttons) default_bck_img_off no
bck_img_over# relative path to buttons background image that will be displayed when mouse is over this menu item (works only with main buttons) default_bck_img_off no
bck_img_on# relative path to buttons background image that will be displayed when mouse is clicked on this menu item (works only with main buttons) default_bck_img_off no
arrow_img_off# relative path to submenu arrow image for normal state default_arrow_img_off no
arrow_img_over# relative path to submenu arrow image for mouse-over state default_arrow_img_over no
arrow_img_on# relative path to submenu arrow image for mouse-click state default_arrow_img_on no
sound_over# relative path to audio file for mouse over button
- the file must be in the following format:
8-bit mu-Law Encoded Next/Sun AU - 8000Hz, 16-bit, Mono
default_sound_over no
sound_click# relative path to audio file for mouse click on button
- the file must be in the following format:
8-bit mu-Law Encoded Next/Sun AU - 8000Hz, 16-bit, Mono
default_sound_click no
shortcut# keyboard shortcut, (e.g.: SHIFT+A, F2, ...)   no


Open Source projects from the same author >>