Package org.biojava.bio.gui.sequence
Class ImageMap.HotSpot
- java.lang.Object
-
- org.biojava.bio.gui.sequence.ImageMap.HotSpot
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing interface:
- ImageMap
public static final class ImageMap.HotSpot extends java.lang.Object implements java.io.SerializableHotSpots 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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description HotSpot(java.lang.String type, java.net.URL url, java.lang.Integer[] coordinates)Creates a newHotSpotwith a null user object.HotSpot(java.lang.String type, java.net.URL url, java.lang.Integer[] coordinates, java.lang.Object userObject)Creates a newHotSpot.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Integer[]getCoordinates()getCoordinatesreturns the hotspot coordinates.java.lang.StringgetType()getTypereturns the type of hotspot.java.net.URLgetURL()getURLreturns the hotspot URL.java.lang.ObjectgetUserObject()getUserObjectreturns the current user object (or null).voidsetUserObject(java.lang.Object userObject)setUserObjectsets the user object.java.lang.StringtoString()
-
-
-
Constructor Detail
-
HotSpot
public HotSpot(java.lang.String type, java.net.URL url, java.lang.Integer[] coordinates)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
public HotSpot(java.lang.String type, java.net.URL url, java.lang.Integer[] coordinates, java.lang.Object userObject)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 Detail
-
getType
public java.lang.String getType()
getTypereturns the type of hotspot.- Returns:
- a
String.
-
getURL
public java.net.URL getURL()
getURLreturns the hotspot URL.- Returns:
- a
URL.
-
getCoordinates
public java.lang.Integer[] getCoordinates()
getCoordinatesreturns the hotspot coordinates.- Returns:
- an
Integer []array.
-
getUserObject
public java.lang.Object getUserObject()
getUserObjectreturns the current user object (or null).- Returns:
- an
Object.
-
setUserObject
public void setUserObject(java.lang.Object userObject)
setUserObjectsets the user object.- Parameters:
userObject- anObject.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-