jvojava
Getting started
| |
To use the Jvo Menu System on your site you should put
jms.cab, jms.jar and the images you want to use on your server. That'll make
it work with netscape 4+ and MSIE 3+. If you also want it to be viewable in
netscape 3 you should unzip jms.jar and put all class files in it on your
server too.
To make a popup menu you should create something like this:
<APPLET code="JMSPopupMenu.class" archive="jms.jar" width=80 height=400>
<PARAM name="cabbase" value="jms.cab">
</APPLET>
To add a image flipper you should create something like this:
<APPLET code="JMSImage.class" archive="jms.jar" width=80 height=80>
<PARAM name="cabbase" value="jms.cab">
</APPLET>
This will point netscape to the jms.jar file and MSIE to
the jms.cab file. Of course you should enter your own values for the width
and the height of the applets.
|
A simple menu
| |
This is the html code for the applet below:
<APPLET code="JMSPopupMenu.class" archive="jms.jar" width=240 height=40>
<PARAM name="cabbase" value="jms.cab">
<PARAM name="menu0" value="2,1,FFFFFF,menu1.gif">
<PARAM name="names0" value="Previous,Next">
<PARAM name="links0" value="jmstutorial1.html,jmstutorial3.html">
<PARAM name="target" value="tutorial">
</APPLET>
This is the image menu1.gif:

You can create menus in the PopupMenu applet by using the
'menu' parameter followed by a number. The 'menu0' parameter always is the
bottom menu. In the 'menu' parameter you should enter a couple of things
seperated by commas. The first two numbers are the number of horizontal and
the number of vertical items in the menu. Here the menu is 2 wide and just 1
item high. Next is a hexcolor code for the color of the rectangle to go over
the items. Next comes the image to use for the menu and there's also a fifth
optional parameter to create transparent menus. More about this later on. You
can use the 'names' parameter to add names to the items in the menu. The
links are done with the 'links' parameter. There's also a general 'target'
parameter to define the target frame.
|
A more complex menu
| |
This is the html code for the applet below:
<APPLET code="JMSPopupMenu.class" archive="jms.jar" width=320 height=80>
<PARAM name="cabbase" value="jms.cab">
<PARAM name="menu0" value="2,1,FFFFFF,menu2.gif">
<PARAM name="cell0" value="40,20,120,40">
<PARAM name="names0" value="Previous,Next">
<PARAM name="links0" value="jmstutorial2.html,jmstutorial4.html">
<PARAM name="target" value="tutorial">
</APPLET>
This is the image menu2.gif:

You can also create insets in the menu. This results in a
part of the menu which doesn't have any items in it. It's done by using the
'cell' parameter that belongs to the menu you want to change. The first two
numbers define the horizontal and vertical inset from the start of the image.
The next two numbers define the horizontal and vertical size of a single
cell.
This is illustrated by this image:

|
Creating Popups
| |
This is the html code for the applet below:
<APPLET code="JMSPopupMenu.class" archive="jms.jar" width=320 height=80>
<PARAM name="cabbase" value="jms.cab">
<PARAM name="menu0" value="2,1,FFFFFF,menu3.gif">
<PARAM name="cell0" value="40,20,120,40">
<PARAM name="names0" value="Popup 1,Popup 2">
<PARAM name="links0" value="menu1,menu2">
<PARAM name="menu1" value="1,2,003F7F,popup1.gif,popupalpha.gif">
<PARAM name="cell1" value="5,5,70,25">
<PARAM name="names1" value="Previous,Next">
<PARAM name="links1" value="jmstutorial3.html,jmstutorial5.html">
<PARAM name="menu2" value="1,2,003F7F,popup2.gif,popupalpha.gif">
<PARAM name="cell2" value="5,5,70,25">
<PARAM name="names2" value="Previous,Next">
<PARAM name="links2" value="jmstutorial3.html,jmstutorial5.html">
<PARAM name="target" value="tutorial">
</APPLET>
This is the image menu3.gif:

This is the image popup1.gif:

This is the image popup2.gif:

This is the image popupalpha.gif:

Here multiple menus are used to create popups. Just change
the links to 'menu' followed by a number to create a "link" to a popup menu.
This time the fifth part of the 'menu' parameter is used on menu 1 and 2 to
create transparent menus. This last part consist of a second image to be used
in the menu. This image defines the transparency of the menu. Fully white
means completely visable and black means fully invisable. The images that are
used here create a dropshadow effect.
|
Using image flippers
| |
This is the html code for the left applet below:
<APPLET code="JMSImage.class" archive="jms.jar" width=60 height=60>
<PARAM name="cabbase" value="jms.cab">
<PARAM name="name" value="left">
<PARAM name="image0" value="imageflipdot.gif">
<PARAM name="image1" value="imageflipright.gif">
<PARAM name="event0" value="right.mouse enter,1">
</APPLET>
This is the html code for the right applet below:
<APPLET code="JMSImage.class" archive="jms.jar" width=60 height=60>
<PARAM name="cabbase" value="jms.cab">
<PARAM name="name" value="right">
<PARAM name="image0" value="imageflipdot.gif">
<PARAM name="image1" value="imageflipleft.gif">
<PARAM name="event0" value="left.mouse enter,1">
</APPLET>
This is the image imageflipdot.gif:

This is the image imageflipright.gif:

This is the image imageflipleft.gif:

Here two instances of the JMSImage are used. The 'image'
parameters are used to load up to 100 images in the applet. 'image0' is
always used as the default image. Here the default image is imageflipdot.gif.
Next the 'event' parameters can be used to enter up to 100 events, followed
by the target image seperated with a comma. A JMSImage produces the events
'mouse enter' and 'mouse exit'. By using the 'name' parameter you can give an
applet a name. This allows to catch events from this applet with other
applets. The "right.mouse enter,1" in the first applet does the following.
Whenever the event 'mouse enter' occurs in the applet named 'right' image
number 1, which is imageflipright.gif in this case, will be displayed.
|
Combining the applets
| |
This is the html code for the left applet below:
<APPLET code="JMSImage.class" archive="jms.jar" width=60 height=60>
<PARAM name="cabbase" value="jms.cab">
<PARAM name="name" value="left">
<PARAM name="image0" value="imageflipdot.gif">
<PARAM name="image1" value="imageflipleft.gif">
<PARAM name="event0" value="menu.mouse enter.previous,1">
</APPLET>
This is the html code for the center applet below:
<APPLET code="JMSPopupMenu.class" archive="jms.jar" width=320 height=80>
<PARAM name="cabbase" value="jms.cab">
<PARAM name="name" value="menu">
<PARAM name="menu0" value="2,1,FFFFFF,menu3.gif">
<PARAM name="cell0" value="40,20,120,40">
<PARAM name="names0" value="Popup 1,Popup 2">
<PARAM name="links0" value="menu1,menu2">
<PARAM name="menu1" value="1,2,003F7F,popup1.gif,popupalpha.gif">
<PARAM name="cell1" value="5,5,70,25">
<PARAM name="names1" value="Previous,Next">
<PARAM name="links1" value="jmstutorial5.html,jmstutorialindex.html">
<PARAM name="menu2" value="1,2,003F7F,popup2.gif,popupalpha.gif">
<PARAM name="cell2" value="5,5,70,25">
<PARAM name="names2" value="Previous,Next">
<PARAM name="links2" value="jmstutorial5.html,jmstutorialindex.html">
<PARAM name="target" value="tutorial">
</APPLET>
This is the html code for the right applet below:
<APPLET code="JMSImage.class" archive="jms.jar" width=60 height=60>
<PARAM name="cabbase" value="jms.cab">
<PARAM name="name" value="right">
<PARAM name="image0" value="imageflipdot.gif">
<PARAM name="image1" value="imageflipright.gif">
<PARAM name="event0" value="menu.mouse enter.next,1">
</APPLET>
Here the JMSPopupMenu applet and the JMSImage applet are
combined. The JMSPopupMenu applet can generate a 'mouse exit' event and a
'mouse enter.<itemname>' event. This means that if the mouse cursor comes
over an item with the name 'previous', as in this example, the applet will
generate the event 'mouse enter.previous'. Whenever this happens in this
example, the left applet will respond by changing to image 1. A similar thing
goes for the right applet.
|
Back to the jvojava page
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.
|