public class GeoRectangle extends Rectangle2D implements GeoRegion
GeoRectangle class describes a geographical rectangle
defined by a location (x,y) and dimension
(width x height).Rectangle2D.Double, Rectangle2D.FloatOUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP| コンストラクタと説明 |
|---|
GeoRectangle()
Constructs a new
GeoRectangle, initialized to
location (0,0) and size (0,0). |
GeoRectangle(double x,
double y,
double width,
double height)
Constructs and initializes a
GeoRectangle
from the specified geographical coordinates. |
GeoRectangle(Point2D origin,
double width,
double height)
Constructs and initializes a
GeoRectangle
from the specified geographical coordinates. |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
void |
add(double x,
double y) |
void |
add(Rectangle2D r) |
boolean |
contains(double x,
double y) |
boolean |
contains(double x,
double y,
double w,
double h) |
boolean |
contains(Location loc) |
Rectangle2D |
createIntersection(Rectangle2D r) |
Rectangle2D |
createUnion(Rectangle2D r) |
double |
getHeight() |
double |
getLatitude()
Returns the latitude of the lower-left corner of
the framing rectangle.
|
double |
getLongitude()
Returns the longitude of the lower-left corner of
the framing rectangle.
|
double |
getWidth() |
double |
getX()
Returns the X coordinate of the lower-left corner of
the framing rectangle.
|
double |
getY()
Returns the Y coordinate of the lower-left corner of
the framing rectangle.
|
boolean |
intersects(double x,
double y,
double w,
double h) |
boolean |
isEmpty() |
int |
outcode(double x,
double y) |
void |
setRect(double x,
double y,
double width,
double height)
Sets the location and size of this
GeoRectangle
to the specified double values. |
void |
setRect(Point2D origin,
double width,
double height)
Sets the location and size of this
GeoRectangle
to the specified values. |
String |
toString()
Returns the
String representation of this
GeoRectangle. |
add, equals, getBounds2D, getPathIterator, getPathIterator, hashCode, intersect, intersectsLine, intersectsLine, outcode, setFrame, setRect, unionclone, contains, contains, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonalpublic GeoRectangle()
GeoRectangle, initialized to
location (0,0) and size (0,0).public GeoRectangle(double x,
double y,
double width,
double height)
throws IllegalArgumentException
GeoRectangle
from the specified geographical coordinates.x - the longitude of the lower-left corner
of the newly constructed GeoRectangley - the latitude of the lower-left corner
of the newly constructed GeoRectanglewidth - the width of the newly constructed
GeoRectangleheight - the height of the newly constructed
GeoRectangleIllegalArgumentException - if the specified arguments are geographically illegal.public GeoRectangle(Point2D origin, double width, double height) throws IllegalArgumentException
GeoRectangle
from the specified geographical coordinates.origin - the Location of the lower-left corner
of the newly constructed
GeoRectanglewidth - the width of the newly constructed
GeoRectangleheight - the height of the newly constructed
GeoRectangleIllegalArgumentException - if the specified arguments are geographically illegal.public double getLatitude()
public double getLongitude()
public double getX()
getX クラス内 RectangularShapepublic double getY()
getY クラス内 RectangularShapepublic double getWidth()
getWidth クラス内 RectangularShapepublic double getHeight()
getHeight クラス内 RectangularShapepublic boolean isEmpty()
isEmpty クラス内 RectangularShapepublic void setRect(double x,
double y,
double width,
double height)
throws IllegalArgumentException
GeoRectangle
to the specified double values.setRect クラス内 Rectangle2Dx - the X coordinate to which to set the lower-left corner
of this GeoRectangley - the Y coordinate to which to set the lower-left corner
of this GeoRectanglewidth - the value to use to set the width
of this GeoRectangleheight - the value to use to set the height
of this GeoRectangleIllegalArgumentException - if the specified arguments are geographically illegal.public void setRect(Point2D origin, double width, double height) throws IllegalArgumentException
GeoRectangle
to the specified values.origin - the location of the lower-left corner
of this GeoRectanglewidth - the value to use to set the width
of this GeoRectangleheight - the value to use to set the height
of this GeoRectangleIllegalArgumentException - if the specified arguments are geographically illegal.public int outcode(double x,
double y)
outcode クラス内 Rectangle2Dpublic void add(double x,
double y)
add クラス内 Rectangle2Dpublic void add(Rectangle2D r)
add クラス内 Rectangle2Dpublic Rectangle2D createIntersection(Rectangle2D r)
createIntersection クラス内 Rectangle2Dpublic Rectangle2D createUnion(Rectangle2D r)
createUnion クラス内 Rectangle2Dpublic boolean contains(double x,
double y)
contains インタフェース内 Shapecontains クラス内 Rectangle2Dpublic boolean contains(Location loc)
contains インタフェース内 KeyContainable<Location>public boolean contains(double x,
double y,
double w,
double h)
contains インタフェース内 Shapecontains クラス内 Rectangle2Dpublic boolean intersects(double x,
double y,
double w,
double h)
intersects インタフェース内 Shapeintersects クラス内 Rectangle2DCopyright © 2017. All rights reserved.