Menu

#6 Contrib - ImageMap component

open
nobody
None
5
2002-06-13
2002-06-13
Brad Baker
No

I have create an image map Component for echo. It
basically encapsulates the html <map> and <area>
tags.

Each set of co-ordinates results in an ActionEvent
being raised when the user clicks on them within
the image.

There is an email in the echo list which explains it
in more detail.

You use it some like

ImageReference img = new

HttpImageReference("/images/planets.gif");

ImageMap im = new ImageMap\(img\);
outerPane.add\(Filler.createVerticalStrut

(10));
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);

Once again the code is LGPL and free for all.

Discussion

  • Brad Baker

    Brad Baker - 2002-06-13

    Image Map Source Files properties and example image

     
  • Brad Baker

    Brad Baker - 2002-06-13
    • summary: Contrib - ImaegMap component --> Contrib - ImageMap component
     
  • Tod Liebeck

    Tod Liebeck - 2002-06-13
    • labels: 415126 -->
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.