com.ibm.wbi.protocol.http.beans.imagemap
Class ImageMapPolygon
java.lang.Object
|
+--com.ibm.wbi.protocol.http.beans.imagemap.ImageMapRegion
|
+--com.ibm.wbi.protocol.http.beans.imagemap.ImageMapPolygon
- public final class ImageMapPolygon
- extends ImageMapRegion
Defines an ImageMapRegion that represents a polygon.
| Fields inherited from class com.ibm.wbi.protocol.http.beans.imagemap.ImageMapRegion |
url |
|
Constructor Summary |
ImageMapPolygon()
Constructs a Polygon region with no region specifications. |
ImageMapPolygon(java.lang.String url,
int[] x,
int[] y)
Constructs a Polygon region mapped to url, with points (x[n],y[n])
defining the polygon. |
ImageMapPolygon(java.lang.String url,
Point[] points)
Constructs a Polygon region mapped to url, with points (points[])
defining the polygon. |
|
Method Summary |
boolean |
isInside(int x,
int y)
Determines if the location x,y is inside this defined region. |
boolean |
isInside(Point point)
Determines if the location point is inside this defined region. |
void |
set(int[] x,
int[] y)
Sets the points defining this polygon region to (x[n],y[n]). |
void |
set(Point[] points)
Sets the points defining this polygon region to (points[n]). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ImageMapPolygon
public ImageMapPolygon()
- Constructs a Polygon region with no region specifications.
ImageMapPolygon
public ImageMapPolygon(java.lang.String url,
int[] x,
int[] y)
throws ImageMapPolygonException
- Constructs a Polygon region mapped to url, with points (x[n],y[n])
defining the polygon.
- Parameters:
url - url this region is mapped tox - series of x coordinates for all points defining polygony - series of y coordinates for all points defining polygon- Throws:
com.ibm.wbi.http.beans.imagemap.ImageMapPolygonException - if size of array x does not match size of array y
ImageMapPolygon
public ImageMapPolygon(java.lang.String url,
Point[] points)
- Constructs a Polygon region mapped to url, with points (points[])
defining the polygon.
- Parameters:
url - url this region is mapped topoints - series of points defining polygon
set
public void set(int[] x,
int[] y)
throws ImageMapPolygonException
- Sets the points defining this polygon region to (x[n],y[n]).
- Parameters:
x - series of x coordinates for all points defining polygony - series of y coordinates for all points defining polygon- Throws:
com.ibm.wbi.http.beans.imagemap.ImageMapPolygonException - if size of array x does not match size of array y
set
public void set(Point[] points)
- Sets the points defining this polygon region to (points[n]).
- Parameters:
points - series of points defining polygon
isInside
public boolean isInside(int x,
int y)
- Determines if the location x,y is inside this defined region.
- Overrides:
isInside in class ImageMapRegion
- Parameters:
x - x coordinatey - y coordinate- Returns:
- true if x,y is inside the region;
false if x,y is not inside the region
isInside
public boolean isInside(Point point)
- Determines if the location point is inside this defined region.
- Overrides:
isInside in class ImageMapRegion
- Parameters:
point - the point in questiontrue - if x,y is inside the region;
false if x,y is not inside the region