Java source code for the ImageMap applets


The following source files are used to make the many active areas in the two ImageMap examples. To use the ImageMap, you will need the ImageMap, ImageMapArea, and HighlightFilter classes plus whatever specific Area classes that you plan to refer to in your parameters.

Required classes

ImageMap.java
ImageMap is the base class for the applet itself. It is required.
ImageMapArea.java
ImageMapArea is the base superclass for the classes that implement the individual active areas for the ImageMap class. It is required.
HighlightFilter.java
HighlightFilter is the primary image filter that produces the light and dark shading used by many of the individual active area classes. It is required.
HighlightArea.java
HighlightArea simply highlights the specified rectangle by a specified percentage brighter or darker when the mouse enters the area. It is required.
LinkArea.java
LinkArea goes to a specified URL when the user clicks in it. It is required.

Common utility classes

ButtonFilter.java
ButtonFilter implements a generic 3D button shaped image highlight. It is needed only if you use one of the area classes below that requires it.
RoundButtonFilter.java
RoundButtonFilter implements a round variant of the ButtonFilter. It is needed only if you use one of the area classes below that requires it.

Specific ImageMap active area classes

HighlightArea.java
HighlightArea simply highlights the specified rectangle by a specified percentage brighter or darker when the mouse enters the area.
LinkArea.java
LinkArea goes to a specified URL when the user clicks in it.
NameArea.java
NameArea shows a specified string in the status area of the browser when the mouse enters the specified rectangular area.
SoundArea.java
SoundArea plays a specified sound whenever the mouse enters the specified rectangular area (unless it is less than 1.5 seconds since the mouse last left that area).
DelayedSoundArea.java
DelayedSoundArea produces a delayed sound at some specified time after the mouse enters a subarea of the ImageMap.
HrefButtonArea.java
HrefButtonArea filters the image to produce a square 3D button shape which the user can click to visit a specified URL. This class requires the ButtonFilter class mentioned above.
RoundHrefButtonArea.java
RoundHrefButtonArea filters the image to produce a round 3D button shape which the user can click to visit a specified URL. This class requires the RoundButtonFilter and ButtonFilter classes mentioned above.
TickerArea.java
TickerArea scrolls a string from right to left across a specified area of the imagemap.
AniArea.java
AniArea animates an imageloop over a section of the base image.
ClickArea.java
ClickArea helps in constructing active image areas by printing the location of the mouse clicks and rectangle drags in the status area of the browser.