DJTextmenu
Typical Applet Configuration
<applet code = djtextmenu.class
archive = djmenuarchive.zip height = 30 width = 250 >
<param NAME = appletfontsize VALUE =
12>
<param NAME = backgroundColor VALUE
= 0x000000>
<param NAME = panelbackgroundColor
VALUE = "204,204,204">
<param NAME = canvasbackgroundColor
VALUE = "204,204,204">
<param NAME = statusbarTextColor VALUE
= "255,0,0">
<param NAME = statusbarMouseOverTextColor
VALUE = "0x0000FF">
<param NAME = bordersize VALUE = 1>
<param NAME = threeD VALUE = true>
<param NAME = textOffset VALUE = 15>
<param NAME = frame VALUE = "_top">
<param NAME = underlineText VALUE =
false>
<param NAME = underlineTextColor VALUE
= 0x00FF00>
<param NAME = direction VALUE
= 1>
<param NAME = menuFontSize VALUE
= 12>
Parameter Definitions
| backgroundColor |
The background color of the applet. This
is the border color if selected with borderSize > 0 |
| canvasbackgroundColor |
The background color of the canvas area
around the text |
| panelbackgroundColor |
the background color of the main panel
area . |
| statusbarTextColor |
The text color of the Text Descriptions |
| statusbarMouseOverTextColor |
The alternate color of the text description
when the mouse is over the text. |
| appletFontSize |
The font size of the text description.
Default is 12 if not defined |
| borderSize |
The size of the border in pixels. 0 =
no border. The color defined in panelbackgroundColor will be the border
color. Default is 0 if not defined. |
| menuFontSize |
This parameter will change the font size
of the pulldown menu item lists. Default if not used is 12 |
| textOffset |
spacing ( in pixels) between each of the
text bar entries |
| Frame |
This parameter defines where the URL's
will be launched to on the page. Default is "_top" . You can also force
any individual URL to any frame by overriding this function. See note below. |
| threeD |
Parameter is either TRUE or FALSE.
If "true" then text will have a "3D" button
around them when the mouse is over the image
Default is "false" if the parameter is
not defined |
| menuitem0 - menuitem (n) |
these are the text descriptions
to place on the applet See notes below for format. |
| item(n)menu(n) |
Pulldown menu definitions for the associated
text. See notes below for examples. |
| underlineText |
Parameter is either TRUE or FALSE |
| underlineTextColor |
If underlineText is "true", then this
is color of the underline |
| direction |
1 = vertical alignment 0 =
horizontal alignment |
Note: All colors are entered in either
hexidecimal or decimal RGB format . As an example , the color white = 0xFFFFFF
in hex and white = "255,255,255" in RGB format.
Source of the example above
Note : for simplicity , all URL descriptions
point to null rather than a real URL
<applet code = djtextmenu archive =
djmenuarchive.zip height = 30 width = 220 >
<param NAME = backgroundColor VALUE
= 0x000000>
<param NAME = panelbackgroundColor
VALUE = "0x99CC99">
<param NAME = canvasbackgroundColor
VALUE = "0x99CC99">
<param NAME = statusbarTextColor VALUE
= "255,0,0">
<param NAME = statusbarMouseOverTextColor
VALUE = "0x0000FF">
<param NAME = bordersize VALUE = 1>
<param NAME = threeD VALUE = true>
<param name = textOffset value = 15>
<param name = appletfontsize value
= 14>
<param NAME = underlineText VALUE =
false>
<param NAME = underlineTextColor VALUE
= 0x0000>
<param name = direction value
= 0>
<!-- this code defines the text
to display in the main part of the applet-->
<param name = menuitem0 value = "Applets">
<param name = menuitem1 value = "Home
Pages">
<param name = menuitem2 value = "Forum">
<!-- this code define the main
menu for the first text description called "applets" -->
<param name = item0menu0 value
= " " >
<param name = item0menu0item0
value = "Java Boutique Top 100|null" >
<param name = item0menu0item1
value = "-" >
<param name = item0menu0item2
value = "item0menu1" >
<param name = item0menu0item3
value = "Archive|null" >
<!-- this code defines the submenu
referenced above in item0menu0item2 -->
<param name = item0menu1 value
= " List by Categories" >
<param name = item0menu1item0
value = "Navigation|null" >
<param name = item0menu1item1
value = "Network|null" >
<param name = item0menu1item2
value = "Education|null" >
<param name = item0menu1item3
value = "Audio|null" >
<param name = item0menu1item4
value = "Games|null" >
<param name = item0menu1item5
value = "Text Effects|null" >
<param name = item0menu1item6
value = "-" >
<param name = item0menu1item7
value = "Hall of Fame|null" >
<!-- this code define the main
menu for the second text descriptiion called "Home Pages" -->
<param name = item1menu0 value
= " " >
<param name = item1menu0item0
value = "Internet.com|null" >
<param name = item1menu0item1
value = "-" >
<param name = item1menu0item2
value = "JavaBoutique|null" >
<param name = item1menu0item3
value = "-" >
<param name = item1menu0item4
value = "SUN's JavaSoft Page|null" >
<param name = item1menu0item5
value = "-" >
<param name = item1menu0item6
value = "JAR's top 25% Applets|null" >
<!-- this code define the main
menu for the third text description called "forum" -->
<param name = item2menu0 value
= " " >
<param name = item2menu0item0
value = "FAQ|null" >
<param name = item2menu0item1
value = "User's Poll|null" >
<param name = item2menu0item2
value = "Discussion Group|null" >
<param name = item2menu0item3
value = "-" >
<param name = item2menu0item4
value = "Contact Us|null" >
</applet>
Text Definitions
This applet supports up to twenty(20) text
entries. an example is :
< PARAM name = "menuitem0" value = "
first pulldown menu text description">
< PARAM name = "menuitem1" value =
" second pulldown menu text description">
etc
etc.
< PARAM name = "menuitem20" value =
" twentieth pulldown menu text description">
Menu definitions
Menus are attached to each of the above
defined text strings as follows :
the first string is attached to the menu
called item0menu0.
the second string is attached to the menu
called item1menu0.
the third string is attached to
the menu called item2menu0.
etc.
.
.
etc.
Each menu has up to fifty(50) items associated
with it. Each item is defined in the format
item0menu0item0
the first item in the list
item0menu0item1
the second item in the list
etc.
Each item has two (2) parameters associated
with it. The item name that will be displayed in the pulldown list, and
the URL that the user will be sent to when the item is selected with a
mouse click. The two parameters are seperated with the "|" character.
referencing sub menus
A menu item can reference another menu.
To do this, put the new menu reference in the value field of the parameter
instead of a document page. ( see example code above )
As with the other examples we will assume
that we are referencing the first text entry. Since the first menu
is called "item0menu0" we reference the sub menu as "item0menu1".
The main menu could also reference another menu called "item0menu2".
To further go down the menu tree, the sub menu "item0menu1" could have
a reference to a third menu called "item0menu3".
The numbers on the menus is not important.
The only restriction is that all menus associated with the first image
start with the description "item0"
Note: Unlike the main menu
for the text entry, sub menus need a value parameter. This is the name
that appears in the main menu that references the sub menu.
© 2000, DecafJava. All rights reserved.
Back to DJTextmenu
New on the Java Boutique:
New Review:
Time Management Made Easy with the Quartz Enterprise Job Scheduler
Why not just use the Java timer API? This open source scheduling
API boasts simplicity, ease-of-integration, a well-rounded feature
set, and it's free!
New Applet:
Reverse Complement
Reverse Complement is a simple applet that converts DNA or RNA
sequences into three useful formats.
Elsewhere on internet.com:
WebDeveloper Java
Lots of Java information on webdeveloper.com
WDVL Java
Thorough Java resource at the Web Developer's Virtual Library.
ScriptSearch Java
Hundreds of free Java code files to download.
jGuru: Your View of the Java Universe
Customizable portal with online training, FAQs, regular news updates, and tutorials.
|