Modern Java
http://www.modernminds.com
W ildMenu Demo

Unlike most menu/navigation applets, WildMenu does not sit idly by when not being used. When the mouse is outside of the applet area, every eight seconds the applet will highlight each of the category choices and scroll a short message along the bottom of the applet. As soon as the mouse is moved into the applet area, the automatic behavior stops.

Also unique to this applet is what happens when the mouse is moved over a category button area. When the mouse is over a category button, two category site options will alternate back and forth. When the mouse is clicked, the URL associated with the site option text being displayed will be loaded. This technique allows you to present multiple links in a compact area.

A pplet Tag

The applet tag for the WildMenu applet is shown below.

<APPLET CODEBASE="../../Java"
  WIDTH="180" HEIGHT="240"
  CODE="WildViewApplet.class">
<PARAM NAME="panelSet1"
  VALUE="DocExamples/WildMenu/WildMenu.TXT">
</APPLET>
P anel Set File

The panel set file used by the WildMenu applet is shown below.

<!-- This panel resets the button images and text color when the mouse is moved into the applet area>

<PANEL name=Reset module="WVPanelTrigger"
  x=0 y=0 w=180 h=240>
<TRIGGER event=mouseEnter panel=Button1
  displayX=0>
<TRIGGER event=mouseEnter panel=Text1
  fontColor=888888>
<TRIGGER event=mouseEnter panel=Button2
  displayX=0>
<TRIGGER event=mouseEnter panel=Text2
  fontColor=888888>
<TRIGGER event=mouseEnter panel=Button3
  displayX=0>
<TRIGGER event=mouseEnter panel=Text3
  fontColor=888888>
<TRIGGER event=mouseEnter panel=Button4
  displayX=0>
<TRIGGER event=mouseEnter panel=Text4
  fontColor=888888>

<!-- ***** Panels for BUTTON 1 ***** >

<PANEL name=Button1 module="WVPanelImage"
  x=5 y=10 w=50 h=50
  image="DocExamples/WildMenu/Buttons.JPG"
  displayX=0 displayY=0 displayW=50 displayH=50>

<PANEL name=Text1 module="WVPanelText"
  x=65 y=10 w=110 h=50 leading=-4
  fontColor=888888 font="Helvetica"
  fontSize=18 fontStyle=bold align=middle>
Category 1

<PANEL name=URL1 module="WVPanelURL"
  x=5 y=10 w=175 h=50 target=_self
  url="../Examples/WildMenu/b1o1.html">

<PANEL name=Button1Trig module="WVPanelTrigger"
  x=5 y=10 w=175 h=50>
<TRIGGER event=mouseEnter panel=Button1
  displayX=50>
<TRIGGER event=mouseExit panel=Button1
  displayX=0>
<TRIGGER event=mouseExit panel=Text1
  text="Category 1" justify=left
  fontColor=888888 background=ffffff>

<PANEL name=Button1Timer module="WVPanelTimer"
  x=5 y=10 w=175 h=50
  activate=mouseEnter
  deactivate=mouseExit+buttonDown>
<TRIGGER panel=URL1
  url="../Examples/WildMenu/b1o1.html">
<TRIGGER panel=Text1
  text="First<BR>Option"
  justify=center fontColor=deffff
  background=TextBG>
<WAIT timeout=10>
<TRIGGER panel=URL1
  url="../Examples/WildMenu/b1o2.html">
<TRIGGER panel=Text1
  text="Second<BR>Option">
<WAIT timeout=10>

<!-- ***** Panels for BUTTON 2 ***** >

<PANEL name=Button2 module="WVPanelImage"
  x=5 y=60 w=50 h=50 image=Button1
  displayX=0 displayY=0 displayW=50 displayH=50>

<PANEL name=Text2 module="WVPanelText"
  x=65 y=60 w=110 h=50 leading=-4
  fontColor=888888 font="Helvetica"
  fontSize=18 fontStyle=bold align=middle>
Category 2

<PANEL name=URL2 module="WVPanelURL"
  x=5 y=60 w=175 h=50 target=_self
  url="../Examples/WildMenu/b2o1.html">

<PANEL name=Button2Trig module="WVPanelTrigger"
  x=5 y=60 w=175 h=50>
<TRIGGER event=mouseEnter panel=Button2
  displayX=100>
<TRIGGER event=mouseExit panel=Button2
  displayX=0>
<TRIGGER event=mouseExit panel=Text2
  text="Category 2" justify=left
  fontColor=888888 background=ffffff>

<PANEL name=Button2Timer module="WVPanelTimer"
  x=5 y=60 w=175 h=50
  activate=mouseEnter
  deactivate=mouseExit+buttonDown>
<TRIGGER panel=URL2
  url="../Examples/WildMenu/b2o1.html">
<TRIGGER panel=Text2 text="First<BR>Option"
  fontColor=00ff00 justify=center
  background=TextBG>
<WAIT timeout=10>
<TRIGGER panel=URL2
  url="../Examples/WildMenu/b2o2.html">
<TRIGGER panel=Text2
  text="Second<BR>Option">
<WAIT timeout=10>

<!-- ***** Panels for BUTTON 3 ***** >

<PANEL name=Button3 module="WVPanelImage"
  x=5 y=110 w=50 h=50 image=Button1
  displayX=0 displayY=0 displayW=50 displayH=50>

<PANEL name=Text3 module="WVPanelText"
  x=65 y=110 w=110 h=50 leading=-4
  fontColor=888888 font="Helvetica"
  fontSize=18 fontStyle=bold align=middle>
Category 3

<PANEL name=URL3 module="WVPanelURL"
  x=5 y=110 w=175 h=50 target=_self
  url="../Examples/WildMenu/b3o1.html">

<PANEL name=Button3Trig module="WVPanelTrigger"
  x=5 y=110 w=175 h=50>
<TRIGGER event=mouseEnter panel=Button3
  displayX=150>
<TRIGGER event=mouseExit panel=Button3
  displayX=0>
<TRIGGER event=mouseExit panel=Text3
  text="Category 3" justify=left
  fontColor=888888 background=ffffff>

<PANEL name=Button3Timer module="WVPanelTimer"
  x=5 y=110 w=175 h=50
  activate=mouseEnter
  deactivate=mouseExit+buttonDown>
<TRIGGER panel=URL3
  url="../Examples/WildMenu/b3o1.html">
<TRIGGER panel=Text3 text="First<BR>Option"
  fontColor=ff0000 justify=center
  background=TextBG>
<WAIT timeout=10>
<TRIGGER panel=URL3
  url="../Examples/WildMenu/b3o2.html">
<TRIGGER panel=Text3
  text="Second<BR>Option">
<WAIT timeout=10>

<!-- ***** Panels for BUTTON 4 ***** >

<PANEL name=Button4 module="WVPanelImage"
  x=5 y=160 w=50 h=50 image=Button1
  displayX=0 displayY=0 displayW=50 displayH=50>

<PANEL name=Text4 module="WVPanelText"
  x=65 y=160 w=110 h=50 leading=-4
  fontColor=888888 font="Helvetica"
  fontSize=18 fontStyle=bold align=middle>
Category 4

<PANEL name=URL4 module="WVPanelURL"
  x=5 y=160 w=175 h=50 target=_self
  url="../Examples/WildMenu/b4o1.html">

<PANEL name=Button4Trig module="WVPanelTrigger"
  x=5 y=160 w=175 h=50>
<TRIGGER event=mouseEnter panel=Button4
  displayX=200>
<TRIGGER event=mouseExit panel=Button4
  displayX=0>
<TRIGGER event=mouseExit panel=Text4
  text="Category 4" justify=left
  fontColor=888888 background=ffffff>

<PANEL name=Button4Timer module="WVPanelTimer"
  x=5 y=160 w=175 h=50
  activate=mouseEnter
  deactivate=mouseExit+buttonDown>
<TRIGGER panel=URL4
  url="../Examples/WildMenu/b4o1.html">
<TRIGGER panel=Text4
  text="First<BR>Option"
  fontColor=ffff00 justify=center
  background=TextBG>
<WAIT timeout=10>
<TRIGGER panel=URL4
  url="../Examples/WildMenu/b4o2.html">
<TRIGGER panel=Text4
  text="Second<BR>Option">
<WAIT timeout=10>

<!-- Panel for scrolling message>

<PANEL name=Message module="WVPanelHScroll"
  x=0 y=215 w=180 h=25 clock=50
  justify=top fontSize=18 fontStyle=bold+italic
  rate=4 fontColor=ff0000>

<WAIT>Where would you like to go?

<!-- This panel runs the animation when the mouse is outside of the applet area>

<PANEL name=IdleTimer module="WVPanelTimer"
  x=0 y=0 w=180 h=240
  activate=mouseExit+start deactivate=mouseEnter>
<WAIT timeout=80>
<TRIGGER panel=Message>
<TRIGGER panel=Button1 displayX=50>
<TRIGGER panel=Text1 fontColor=0000ff>
<WAIT timeout=3>
<TRIGGER panel=Button1 displayX=0>
<TRIGGER panel=Text1 fontColor=888888>
<WAIT timeout=5>
<TRIGGER panel=Button2 displayX=100>
<TRIGGER panel=Text2 fontColor=00cc00>
<WAIT timeout=3>
<TRIGGER panel=Button2 displayX=0>
<TRIGGER panel=Text2 fontColor=888888>
<WAIT timeout=5>
<TRIGGER panel=Button3 displayX=150>
<TRIGGER panel=Text3 fontColor=ff0000>
<WAIT timeout=3>
<TRIGGER panel=Button3 displayX=0>
<TRIGGER panel=Text3 fontColor=888888>
<WAIT timeout=5>
<TRIGGER panel=Button4 displayX=200>
<TRIGGER panel=Text4 fontColor=c8c800>
<WAIT timeout=3>
<TRIGGER panel=Button4 displayX=0>
<TRIGGER panel=Text4 fontColor=888888>

<!-- Panel for hidden image used for option background>

<PANEL name=TextBG module="WVPanelImage"
  hidden=true w=110 h=50 image=Button1
  displayX=250 displayY=0 displayW=110 displayH=50>

Notice that while there are five WVPanelImage panels, only the Button1 panel specifies an actual file for the image attribute. Button2, Button3, Button4, and TextBG all specify Button1 as the image attribute. This means that all five buttons will share the same image file instead of loading a separate image file for each WVPanelImage panel (thus reducing the load and initialization time).

This trick will work only if the WVPanelImage panel tag that specifies the actual image file is positioned in the panel set file before the WVPanelImage panel tags that reference the image.

Also note that the last WVPanelImage panel (TextBG) is hidden (and therefore invisible). During the category option text animation (i.e., the ButtonXTimer panels), the image is "grabbed" and used for the text background.
I mage File

The image file used by the WildMenu applet is shown below.

Buttons.JPG
Copyright © 1997 by Modern Minds, Inc.