Package org.biojava.bio.gui.sequence
Class ImageMap.HotSpot
java.lang.Object
org.biojava.bio.gui.sequence.ImageMap.HotSpot
- All Implemented Interfaces:
Serializable
- Enclosing interface:
- ImageMap
HotSpots represent an image map hotspot. For
example (in server-side map format):
rect http://www.biojava.org 0,0 100,20
A user object may be set for each hot spot. This would typically contain extra data used to construct a representation of the hotspot in a document or application. For example, in an image map representing Blast search results the user object could be a sequence in a database. In an HTML document the user object could be used to assign values to actions such as mouseover.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionInteger[]getCoordinatesreturns the hotspot coordinates.getType()getTypereturns the type of hotspot.getURL()getURLreturns the hotspot URL.getUserObjectreturns the current user object (or null).voidsetUserObject(Object userObject) setUserObjectsets the user object.toString()
-
Constructor Details
-
HotSpot
Creates a newHotSpotwith a null user object.- Parameters:
type- aStringof hotspot. The only valid arguments are ImageMap.RECT, ImageMap.CIRCLE or ImageMap.POLY (checked by object reference equalty);url- aURLtarget.coordinates- anInteger []array of hotspot coordinates, in order.
-
HotSpot
Creates a newHotSpot.- Parameters:
type- aStringof hotspot. The only valid arguments are ImageMap.RECT, ImageMap.CIRCLE or ImageMap.POLY (checked by object reference equalty);url- aURLtarget.coordinates- anInteger []array of hotspot coordinates, in order.userObject- anObject
-
-
Method Details
-
getType
getTypereturns the type of hotspot.- Returns:
- a
String.
-
getURL
getURLreturns the hotspot URL.- Returns:
- a
URL.
-
getCoordinates
getCoordinatesreturns the hotspot coordinates.- Returns:
- an
Integer []array.
-
getUserObject
getUserObjectreturns the current user object (or null).- Returns:
- an
Object.
-
setUserObject
setUserObjectsets the user object.- Parameters:
userObject- anObject.
-
toString
-