| net.xoetrope.awt.XImage net.xoetrope.awt.XHotspotImage
All known Subclasses: net.xoetrope.awt.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: $Revision: 1.9 $ |
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 |
disableHotspot | public void disableHotspot(String name)(Code) | | Create a hashtable to store the disabled hotspots and move the disabled
one into it from the main Vector.
Parameters: name - the name of the hotspot to be disabled |
enableHotspot | public void enableHotspot(String name)(Code) | | Move the hotspot from the disabled Hashtable to the main Vector
Parameters: name - |
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 |
hotspotDisabled | protected void hotspotDisabled(String name, int idx)(Code) | | Convenience method to inform subclasses when a hotspot has been disabled
Parameters: name - the name of the hotspot being disabled. Parameters: idx - the index of the hotspot being disabled |
hotspotEnabled | protected void hotspotEnabled(String name)(Code) | | Convenience method to inform subclasses when a hotspot has been enabled
Parameters: name - the name of the hotspot being enabled. |
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. |
|
|