com.ibm.wbi.http.beans.imagemap
Class ImageMapRectangle

java.lang.Object
  |
  +--com.ibm.wbi.http.beans.imagemap.ImageMapRegion
        |
        +--com.ibm.wbi.http.beans.imagemap.ImageMapRectangle

public final class ImageMapRectangle
extends ImageMapRegion

Defines an ImageMapRegion that represents a rectangle.


Fields inherited from class com.ibm.wbi.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 com.ibm.wbi.http.beans.imagemap.ImageMapRegion
getUrl, main, setUrl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 to
xBottom - x coordinate of the bottomLeft point for the rectangle
yBottom - y coordinate of the bottomLeft point for the rectangle
xTop - x coordinate of the topRight point for the rectangle
yTop - 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 to
leftBottom - bottomLeft point for the rectangle
rightTop - topRight point for the rectangle
Method Detail

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 rectangle
yBottom - y coordinate of the bottomLeft point for the rectangle
xTop - x coordinate of the topRight point for the rectangle
yTop - 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 rectangle
yBottom - topRight point for the rectangle

isInside

public boolean isInside(int x,
                        int y)
Determines if the location point is inside this defined region.
Parameters:
x - x coordinate
y - y coordinate
Returns:
true if x,y is inside the region; false if x,y isn't inside the region
Overrides:
isInside in class ImageMapRegion

isInside

public boolean isInside(Point point)
Determines if the location point is inside this defined region.
Parameters:
point - location point in question
Returns:
true if point is inside the region; false if point isn't inside the region
Overrides:
isInside in class ImageMapRegion