Technick.com S.r.l. - Open Source Software

JDDM Setup

java >>
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 examples and modify it to fit your needs.

The following tables illustrates the meaning and function of each attribute and parameter.
Note: the parameters in bold were introduced or modified with 2.1.000 version.

[Applet Attributes | Main Parameters | Elements Parameters]


Applet Attributes
(<applet attribute_name="attribute_value" ... >)
namevaluesdefaultrequired
codebaserelative path to applet archive directory (e.g.: "../java/") yes
archivejddm.jar (name of applet archive) yes
codecom.tecnick.jddm.Jddm.class (name of main class) yes
widthapplet width in pixels yes
heightapplet height in pixels yes
hspaceapplet horizontal space no
vspaceapplet vertical space no
alignapplet alignment
  • left
  • right
  • top
  • middle
  • bottom
 no
nameapplet name no
idapplet id no
altapplet 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" />)
namevaluesdefaultrequired
mayscriptmayscript (needed for javascript calls support) yes
horizontal
  • true display menu as horizontal bar
  • false display menu as vertical bar
trueno
popup_positionsubmenu popup position relative to main menu
  • LEFT
  • RIGHT
  • TOP
  • BOTTOM
BOTTOMno
arrow_positionsubmenu arrow image position on menu button
  • LEFT
  • RIGHT
RIGHTno
page_encodingencoding character set of the html page where the applet is loaded no
default_encodingencoding character set for the applet no
default_targetname 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.
_selfno
disabled_msgdefault description for disabled itemsDISABLEDno
default_arrow_img_offrelative path to default submenu arrow image for normal state no
default_arrow_img_overrelative path to default submenu arrow image for mouse-over state no
default_arrow_img_onrelative path to default submenu arrow image for mouse-click state no
default_label_positiondefault text position relative to icon
  • LEFT
  • RIGHT
  • TOP
  • BOTTOM
RIGHTno
default_center_block
  • true center text and image on button
  • false
falseno
default_vmargindefault vertical distance in pixels between buttons0no
default_hmargindefault horizontal distance in pixels between buttons0no
default_paddingminimum 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:2no
default_gapminimum distance in pixels between text and image on button2no
default_border_widthwidth in pixels of 3D button bevel (0=disabled)2no
default_pushed
  • true active pushed effect for main items
  • false disable pushed effect for main items
trueno
default_main_fontmain buttons font nameHelveticano
default_main_font_stylemain buttons font style
  • PLAIN
  • BOLD
  • ITALIC
  • BOLD+ITALIC
PLAINno
default_main_font_sizebuttons vertical font size in pixels11no
default_submenu_fontsubmenus font nameHelveticano
default_submenu_font_stylesubmenus font style
  • PLAIN
  • BOLD
  • ITALIC
  • BOLD+ITALIC
PLAINno
default_submenu_font_sizesubmenus font size in pixels11no
background_colapplet 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)
FFFFFFno
default_colbck_offbutton 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)
ECE9D8no
default_colbck_overbutton 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)
3366CCno
default_colbck_onbutton 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)
ADAA99no
default_coltxt_offbutton 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)
000000no
default_coltxt_overbutton 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)
FFFFFFno
default_coltxt_onbutton 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)
000000no
default_colsdw_offbutton 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)
FFFFFFno
default_colsdw_overbutton 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)
FFFFFFno
default_colsdw_onbutton 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)
FFFFFFno
default_shadow_xhorizontal relative position in pixels of text shadow0no
default_shadow_yvertical relative position in pixels of text shadow0no
default_bck_img_offrelative 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_overrelative 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_onrelative 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_offrelative path to default image icon that will be displayed on main items when mouse is off no
default_icon_overrelative path to default image icon that will be displayed on main items when mouse is over no
default_icon_onrelative path to default image icon that will be displayed on main items when mouse is on no
default_sound_overrelative 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_clickrelative 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_fileRelative 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" />)
namevaluesdefaultrequired
id#progressive menu item identification number (starting from 1)
this value must be the same indicated by the "#" character on this parameter name
0yes
subid#ID value of parent node0yes
node#
  • true this element is a node (open a sub-menu)
  • false this element is a simple item
falseno
enabled#
  • true this element is enabled
  • false this element is disabled
trueno
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_targetno
encoding#encoding character set for this elementdefault_encodingno
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_positionno
center_block#
  • true center text and image on button
  • false
default_center_blockno
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_paddingno
gap#minimum distance in pixels between text and image on buttondefault_gapno
border_width#width in pixels of 3D button bevel (0=disabled)default_border_widthno
pushed#
  • true active pushed effect for main items
  • false disable pushed effect for main items
default_pushedno
font#font namedefault_main_font or default_submenu_fontno
font_style#font style
  • PLAIN
  • BOLD
  • ITALIC
  • BOLD+ITALIC
default_main_font_style or default_submenu_font_styleno
font_size#vertical font size in pixelsdefault_main_font_size or default_submenu_font_sizeno
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_offno
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_overno
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_onno
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_offno
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_overno
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_onno
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_offno
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_overno
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_onno
shadow_x#horizontal relative position in pixels of text shadowdefault_shadow_xno
shadow_y#vertical relative position in pixels of text shadowdefault_shadow_yno
icon_off#relative path to image icon that will displayed on main item when mouse is offdefault_icon_offno
icon_over#relative path to image icon that will displayed on main item when mouse is overdefault_icon_overno
icon_on#relative path to image icon that will displayed on main item when mouse is clickeddefault_icon_onno
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_offno
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_offno
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_offno
arrow_img_off#relative path to submenu arrow image for normal statedefault_arrow_img_offno
arrow_img_over#relative path to submenu arrow image for mouse-over statedefault_arrow_img_overno
arrow_img_on#relative path to submenu arrow image for mouse-click statedefault_arrow_img_onno
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_overno
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_clickno
shortcut#keyboard shortcut, (e.g.: SHIFT+A, F2, ...) no


name: password: [register]

| TXT | TXT+
The contents of this site are copyright © Tecnick.com s.r.l. All Rights Reserved.
Tecnick.com s.r.l. - Sede Legale: Via Della Pace, 11 – 09044 – Quartucciu (CA) – ITALY - Capitale Sociale € 10.000,00 i.v. - P. IVA e C.F.: 02574420929 - C.C.I.A.A.: CA-2000-19195 - R.E.A.: 208980

Powered by Tecnick.com AIOCP (All In One Control Panel) Tecnick.com is Java.net Silver Partner

Valid XHTML 1.0! Valid CSS1! Level Double-A conformance icon, W3C-WAI Web Content Accessibility Guidelines 1.0





Bookmark and Share


English Italian