All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class applets.imagemap.ImageMap

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----java.applet.Applet
                                   |
                                   +----applets.imagemap.ImageMap

public class ImageMap
extends Applet
ImageMap is a java-based clickable image. The image consists of various "hot-spots" or "buttons" which can change state when pressed, and which blink while the browser loads a specified URL. The hotspots can be rectangular or polygonal, and their positions are passed to the applet by parameters, as shown in the example below. The applet also needs to be passed parameters which point to two images of the clickable image; one in which all the hotspots are active, and one in which they are all inactive. The applet below was constructed with the following information: <APPLET CODEBASE="http://www.math.unl.edu/~jorr/java" CODE="applets/imagemap/ImageMap.class" WIDTH=630 HEIGHT=80 > <PARAM NAME="ActivePanel" VALUE="http://www.math.unl.edu/~webnotes/images/top1.active.gif"> <PARAM NAME="InActivePanel" VALUE="http://www.math.unl.edu/~webnotes/images/top1.inactive.gif"> <PARAM NAME="Button1" VALUE="(32,30) (113,30) (113,65) (32,65) http://www.math.unl.edu/~jorr"> <PARAM NAME="Button2" VALUE="(146,30) (227,30) (227,65) (146,65) http://www.math.unl.edu"> <PARAM NAME="Button3" VALUE="(565,16) (565,75) (535,45) http://www.yahoo.com"> <PARAM NAME="Button4" VALUE="(568,75) (568,16) (598,45) http://www.netscape.com"> </APPLET>


Constructor Index

 o ImageMap()

Method Index

 o init()
 o mouseDown(Event, int, int)
 o mouseDrag(Event, int, int)
 o mouseUp(Event, int, int)
 o paint(Graphics)
 o stop()
 o update(Graphics)

Constructors

 o ImageMap
  public ImageMap()

Methods

 o init
  public void init()
Overrides:
init in class Applet
 o stop
  public void stop()
Overrides:
stop in class Applet
 o update
  public void update(Graphics g)
Overrides:
update in class Component
 o paint
  public void paint(Graphics g)
Overrides:
paint in class Component
 o mouseDown
  public boolean mouseDown(Event e,
                           int x,
                           int y)
Overrides:
mouseDown in class Component
 o mouseDrag
  public boolean mouseDrag(Event e,
                           int x,
                           int y)
Overrides:
mouseDrag in class Component
 o mouseUp
  public boolean mouseUp(Event e,
                         int x,
                         int y)
Overrides:
mouseUp in class Component

All Packages  Class Hierarchy  This Package  Previous  Next  Index