com.ibm.wbi.protocol.http.beans.imagemap
Class ImageMapRectangle
java.lang.Object
|
+--com.ibm.wbi.protocol.http.beans.imagemap.ImageMapRegion
|
+--com.ibm.wbi.protocol.http.beans.imagemap.ImageMapRectangle
- public final class ImageMapRectangle
- extends ImageMapRegion
Defines an ImageMapRegion that represents a rectangle.
| Fields inherited from class com.ibm.wbi.protocol.http.beans.imagemap.ImageMapRegion |
url |
|
Constructor Summary |
ImageMapRectangle()
Constructs a rectangle region with no region specifications. |
ImageMapRectangle(java.lang.String url,
int xbottom,
int ybottom,
int xtop,
int ytop)
Constructs a rectangle region mapped to url, with (xbottom,ybottom) being
the bottomLeft corner and (xtop,ytop) being the topRight corner. |
ImageMapRectangle(java.lang.String url,
Point leftBottom,
Point rightTop)
Constructs a rectangle region mapped to url, with leftBottom being
the bottomLeft corner and rightTop being the topRight corner |
|
Method Summary |
boolean |
isInside(int x,
int y)
Determines if the location point is inside this defined region. |
boolean |
isInside(Point point)
Determines if the location point is inside this defined region. |
void |
set(int xbottom,
int ybottom,
int xtop,
int ytop)
Sets the bottomLeft(xbottom,ybottom) and topRight(xtop,ytop) points
that bound the rectangle region. |
void |
set(Point leftBottom,
Point rightTop)
Sets the bottomLeft and topRight points that bound the rectangle region |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ImageMapRectangle
public ImageMapRectangle()
- Constructs a rectangle region with no region specifications.
ImageMapRectangle
public ImageMapRectangle(java.lang.String url,
int xbottom,
int ybottom,
int xtop,
int ytop)
- Constructs a rectangle region mapped to url, with (xbottom,ybottom) being
the bottomLeft corner and (xtop,ytop) being the topRight corner.
- Parameters:
URL - url the rectangle region should map toxBottom - x coordinate of the bottomLeft point for the rectangleyBottom - y coordinate of the bottomLeft point for the rectanglexTop - x coordinate of the topRight point for the rectangleyTop - y coordinate of the topRight point for the rectangle
ImageMapRectangle
public ImageMapRectangle(java.lang.String url,
Point leftBottom,
Point rightTop)
- Constructs a rectangle region mapped to url, with leftBottom being
the bottomLeft corner and rightTop being the topRight corner
- Parameters:
URL - url the rectangle region should map toleftBottom - bottomLeft point for the rectanglerightTop - topRight point for the rectangle
set
public void set(int xbottom,
int ybottom,
int xtop,
int ytop)
- Sets the bottomLeft(xbottom,ybottom) and topRight(xtop,ytop) points
that bound the rectangle region.
- Parameters:
xBottom - x coordinate of the bottomLeft point for the rectangleyBottom - y coordinate of the bottomLeft point for the rectanglexTop - x coordinate of the topRight point for the rectangleyTop - y coordinate of the topRight point for the rectangle
set
public void set(Point leftBottom,
Point rightTop)
- Sets the bottomLeft and topRight points that bound the rectangle region
- Parameters:
xBottom - bottomLeft point for the rectangleyBottom - topRight point for the rectangle
isInside
public boolean isInside(int x,
int y)
- Determines if the location point 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 isn't 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 - location point in question- Returns:
- true if point is inside the region;
false if point isn't inside the region