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

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

public final class ImageMapCircle
extends ImageMapRegion

Defines an ImageMapRegion that represents a circle.


Fields inherited from class com.ibm.wbi.http.beans.imagemap.ImageMapRegion
url
 
Constructor Summary
ImageMapCircle()
          Constructs a Circle region with no region specifications.
ImageMapCircle(java.lang.String url, int x, int y, int rad)
          Constructs a Circle region mapped to url, with x,y being center and radius rad.
ImageMapCircle(java.lang.String url, Point centerPoint, int rad)
          Constructs a Circle region mapped to url, with point being center and radius rad.
 
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, int rad)
          Sets the center point (x,y) and radius rad for this region.
 void set(Point centerPoint, int rad)
          Sets the center point point and radius rad for this 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

ImageMapCircle

public ImageMapCircle()
Constructs a Circle region with no region specifications.

ImageMapCircle

public ImageMapCircle(java.lang.String url,
                      int x,
                      int y,
                      int rad)
Constructs a Circle region mapped to url, with x,y being center and radius rad.
Parameters:
url - url this region is mapped to.
x - x coordinate for center point
y - y coordinate for center point
rad - radius of the circle

ImageMapCircle

public ImageMapCircle(java.lang.String url,
                      Point centerPoint,
                      int rad)
Constructs a Circle region mapped to url, with point being center and radius rad.
Parameters:
url - url this region is mapped to
point - center point for the circle
rad - radius of the circle
Method Detail

set

public void set(int x,
                int y,
                int rad)
Sets the center point (x,y) and radius rad for this region.
Parameters:
x - x coordinate for center point
y - y coordinate for center point

set

public void set(Point centerPoint,
                int rad)
Sets the center point point and radius rad for this region.
Parameters:
centerPoint - center point for the circle

isInside

public boolean isInside(int x,
                        int y)
Determines if the location x,y 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 is not 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 is not inside the region
Overrides:
isInside in class ImageMapRegion