| net.xoetrope.swing.XImage net.xoetrope.swing.XHotspotImage
All known Subclasses: net.xoetrope.swing.XImageMap,
XHotspotImage | public class XHotspotImage extends XImage implements MouseMotionListener(Code) | | A widget for displaying an image and associating hotspots at
coordinates specified in an external file
Copyright: Copyright (c) Xoetrope Ltd., 1998-2003
License: see license.txt
version: 1.0 |
handCursordefaultCursor | protected static Cursor handCursordefaultCursor(Code) | | |
XHotspotImage | public XHotspotImage()(Code) | | Constructor. Sets cursors and creates the Vector which stores the hotspots.
Adds a new MouseMotionListener to the image
|
checkHotspot | public int checkHotspot(Point p)(Code) | | Check the Point p to see if any of the polygons in the hotspots Vector contain
it. If so return the index of the Vector element.
Parameters: p - The Point which we are checking The index of the polygon which contains the point or -1 if none ofthe polygons contain the Point |
getName | public String getName(int i)(Code) | | Get the name of the hotspot in element i of the names vector
Parameters: i - The index of the hotspot The Name of the hotspot |
mouseDragged | public void mouseDragged(MouseEvent e)(Code) | | Unused method.
Parameters: e - |
mouseMoved | public void mouseMoved(MouseEvent e)(Code) | | Call the checkHotSpot function to change the cursor
Parameters: e - MouseEvent |
read | public void read(Reader r)(Code) | | Reads the hotspot information from the reader parameter and adds them to
the names and hotspots vectors.
Parameters: r - Reader of the file. |
|
|