Example 6
Placing all the Menu and Item data in text files.

As you can see, when the number submenu's and item's begins to grow the html begins to look a little cumbersome. For this reason we have built in the ability for the menu bar to retrieve the menu and item data from text files. In this way the menu and item data is far easier to manage and the html will look cleaner. In this example we place all the menu data in a file called ../../advawtfloatmenu/Examples/menudata.txt and all the item data in a file called ../../advawtfloatmenu/Examples/itemdata.txt.

And here is the html code,

<applet code="AWTfloatMenuApplet.class" archive="AWTfloatMenu.jar" width=0 height=0 mayscript>
<param name="cabbase" VALUE="AWTfloatMenu.cab">

<!-- General Applet Parameters -->
<param name="OpenOnClick" value="true">
<param name="BackgroundSound" value="bgsound">
<param name="Position" value="200,250">

<!-- Title Bar Parameters -->
<param name="TitleBar" value="true"> <!-- title bar on/off -->
<param name="Title" value="Example"> <!-- title -->
<param name="TitleTextColor" value="255,255,255"> <!-- text color -->
<param name="TitleBackgroundColor" value="0,0,100"> <!-- background color -->
<param name="TitleFont" value="Helvetica,N,12"> <!-- text font -->

<!-- Data Files -->
<param name="Itemdata" value="../../advawtfloatmenu/Examples/itemdata.txt">
<param name="Menudata" value="../../advawtfloatmenu/Examples/menudata.txt">
<param name="Buttondata" value="../../advawtfloatmenu/Examples/buttondata.txt">

<!-- Root Menu parameters -->
<param name="rootButtonWidth" value="120"> <!-- button width -->
<param name="rootButtonHeight" value="30"> <!-- button height -->
<param name="rootGap" value="0"> <!-- gap between buttons -->
<param name="rootBorderEffect" value="1"> <!-- Border Effect -->
<param name="rootMouseoverEffect" value="2"> <!-- Border Effect mouseover -->
<param name="rootMouseclickEffect" value="2"> <!-- Border Effect mouseclick -->

<!-- Images -->
<param name="image1" value="home|./IconImages/home.gif">
<param name="image2" value="home2|./IconImages/home2.gif">
<param name="image3" value="online|./IconImages/online.gif">
<param name="image4" value="online2|./IconImages/online2.gif">
<param name="image5" value="select|./IconImages/select.gif">
<param name="image6" value="select2|./IconImages/select2.gif">


To view the ../../advawtfloatmenu/Examples/menudata.txt file click here.

To view the ../../advawtfloatmenu/Examples/itemdata.txt file click here.

To view the ../../advawtfloatmenu/Examples/buttondata.txt file click here.


Click Here for JavaScript Example