|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.ibm.wbi.protocol.http.beans.imagemap.ImageMap
Utility class for processing http imagemap requests. This class is used in conjunction with ImageMapRegion classes to define the regions of an image and the url associated with each region. In addition, ImageMap allows for the definition of a default url if no regions match the location of the imagemap request.
| Constructor Summary | |
ImageMap()
Creates a new ImageMap object, with no default URL. |
|
ImageMap(java.lang.String defaultURL)
Creates a new ImageMap object, with defaultURL as the default URL. |
|
| Method Summary | |
void |
addRegion(ImageMapRegion region)
Adds the specified region object to the list of regions for this ImageMap. |
void |
addRegion(ImageMapRegion region,
int at)
Adds region object to list of regions for this ImageMap at specified location. |
ImageMapRegion |
find(int x,
int y)
Locates the ImageMapRegion that maps to location (x,y). |
ImageMapRegion |
find(Point point)
Locates the ImageMapRegion that maps to location point. |
java.lang.String |
findUrl(int x,
int y)
Locates the url that is represented by the location (x,y). |
java.lang.String |
findUrl(Point point)
Locates the url that is represented by the location point. |
java.lang.String |
findUrl(java.lang.String url)
Locates the url that is represented by the imagemap information in the url query string url. |
java.lang.String |
getDefaultUrl()
Returns the current default url. |
int |
getNumRegion()
Returns number of regions this ImageMap object knows about. |
ImageMapRegion |
getRegion(int at)
Returns the ImageMapRegion object at the specified index. |
static void |
main(java.lang.String[] args)
Tests ImageMap. |
void |
setDefaultUrl(java.lang.String url)
Sets the default URL for ImageMap to defaultURL. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ImageMap()
public ImageMap(java.lang.String defaultURL)
defaultURL - default URL to be returned if no regions are defined
at map location| Method Detail |
public static void main(java.lang.String[] args)
args[] - command line parameterspublic void addRegion(ImageMapRegion region)
region - ImageMapRegion to be added to list of Regions
public void addRegion(ImageMapRegion region,
int at)
region - ImageMapRegion to be added to list of Regionsat - index into list to add the regionpublic ImageMapRegion getRegion(int at)
at - index of region requested; valid values are 0 to
numRegions() - 1public int getNumRegion()
public void setDefaultUrl(java.lang.String url)
url - url to be used as the defaultpublic java.lang.String getDefaultUrl()
public ImageMapRegion find(int x,
int y)
x - x coordinatey - y coordinatepublic ImageMapRegion find(Point point)
point - the location point in question
public java.lang.String findUrl(int x,
int y)
x - x coordinatey - y coordinatepublic java.lang.String findUrl(Point point)
point - the location point in questionpublic java.lang.String findUrl(java.lang.String url)
url - url that contains the query string w/ imagemap information
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||