[Image] EchoPoint
Helping you build truly dynamic and stateful web applications!
nothing

ImageMap   Click here for complete JavaDoc

The ImageMap component allows the user to click on a region of an image and have ActionEvents raised when they do.  The co-ordinates within the image are defined via ImageMap.Coords objects.  Each coordinate can have an action command string associated with it and these will be raised with any ActionListeners that have been registered with the image map, via an ActionEvent object.

[Image]


 

 

 

ImageMap im = new ImageMap(img);
outerPane.add(im);

im.addActionListener(this);

ImageMap.Coords coords = new ImageMap.Coords(0,0,82,126,"sun");
im.addCoord(coords);

coords = new ImageMap.Coords(90,58,3,"mercury");
im.addCoord(coords);

coords = new ImageMap.Coords(124,58,8,"venus");
im.addCoord(coords);

coords = new ImageMap.Coords(new int[] { 86,72,136,77,106,98,86,103,139,117 },"bottom space");
im.addCoord(coords);

coords = new ImageMap.Coords(new int[] { 88,12,136,12,136,46,88,47,118,27 },"top space");
im.addCoord(coords);

Client Browser Support :

All clients supported by the Echo Framework.


Home

SourceForge Logo

The EchoPoint project is kindly hosted by SourceForge