パッケージ org.piax.common.subspace
クラス GeoRectangle
java.lang.Object
java.awt.geom.RectangularShape
java.awt.geom.Rectangle2D
org.piax.common.subspace.GeoRectangle
- すべての実装されたインタフェース:
Shape,Serializable,Cloneable,Destination,GeoRegion,KeyContainable<Location>,Region<Location>
public class GeoRectangle extends Rectangle2D implements GeoRegion
The
GeoRectangle class describes a geographical rectangle
defined by a location (x,y) and dimension
(width x height).- 関連項目:
- 直列化された形式
-
ネストされたクラスの概要
-
フィールドの概要
-
コンストラクタの概要
コンストラクタ コンストラクタ 説明 GeoRectangle()Constructs a newGeoRectangle, initialized to location(0,0)and size(0,0).GeoRectangle(double x, double y, double width, double height)Constructs and initializes aGeoRectanglefrom the specified geographical coordinates.GeoRectangle(Point2D origin, double width, double height)Constructs and initializes aGeoRectanglefrom the specified geographical coordinates. -
メソッドの概要
修飾子とタイプ メソッド 説明 voidadd(double x, double y)voidadd(Rectangle2D r)booleancontains(double x, double y)booleancontains(double x, double y, double w, double h)booleancontains(Location loc)Rectangle2DcreateIntersection(Rectangle2D r)Rectangle2DcreateUnion(Rectangle2D r)doublegetHeight()doublegetLatitude()Returns the latitude of the lower-left corner of the framing rectangle.doublegetLongitude()Returns the longitude of the lower-left corner of the framing rectangle.doublegetWidth()doublegetX()Returns the X coordinate of the lower-left corner of the framing rectangle.doublegetY()Returns the Y coordinate of the lower-left corner of the framing rectangle.booleanintersects(double x, double y, double w, double h)booleanisEmpty()intoutcode(double x, double y)voidsetRect(double x, double y, double width, double height)Sets the location and size of thisGeoRectangleto the specified double values.voidsetRect(Point2D origin, double width, double height)Sets the location and size of thisGeoRectangleto the specified values.StringtoString()Returns theStringrepresentation of thisGeoRectangle.クラスから継承されたメソッド java.awt.geom.Rectangle2D
add, equals, getBounds2D, getPathIterator, getPathIterator, hashCode, intersect, intersectsLine, intersectsLine, outcode, setFrame, setRect, unionクラスから継承されたメソッド java.awt.geom.RectangularShape
clone, contains, contains, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
-
コンストラクタの詳細
-
GeoRectangle
public GeoRectangle()Constructs a newGeoRectangle, initialized to location(0,0)and size(0,0). -
GeoRectangle
public GeoRectangle(double x, double y, double width, double height) throws IllegalArgumentExceptionConstructs and initializes aGeoRectanglefrom the specified geographical coordinates.- パラメータ:
x- the longitude of the lower-left corner of the newly constructedGeoRectangley- the latitude of the lower-left corner of the newly constructedGeoRectanglewidth- the width of the newly constructedGeoRectangleheight- the height of the newly constructedGeoRectangle- 例外:
IllegalArgumentException- if the specified arguments are geographically illegal.
-
GeoRectangle
Constructs and initializes aGeoRectanglefrom the specified geographical coordinates.- パラメータ:
origin- theLocationof the lower-left corner of the newly constructedGeoRectanglewidth- the width of the newly constructedGeoRectangleheight- the height of the newly constructedGeoRectangle- 例外:
IllegalArgumentException- if the specified arguments are geographically illegal.
-
-
メソッドの詳細
-
getLatitude
public double getLatitude()Returns the latitude of the lower-left corner of the framing rectangle.- 戻り値:
- the latitude of the lower-left corner of the framing rectangle.
-
getLongitude
public double getLongitude()Returns the longitude of the lower-left corner of the framing rectangle.- 戻り値:
- the longitude of the lower-left corner of the framing rectangle.
-
getX
public double getX()Returns the X coordinate of the lower-left corner of the framing rectangle.- 定義:
getXクラス内RectangularShape- 戻り値:
- the X coordinate of the lower-left corner of the framing rectangle.
-
getY
public double getY()Returns the Y coordinate of the lower-left corner of the framing rectangle.- 定義:
getYクラス内RectangularShape- 戻り値:
- the Y coordinate of the lower-left corner of the framing rectangle.
-
getWidth
public double getWidth()- 定義:
getWidthクラス内RectangularShape
-
getHeight
public double getHeight()- 定義:
getHeightクラス内RectangularShape
-
isEmpty
public boolean isEmpty()- 定義:
isEmptyクラス内RectangularShape
-
setRect
public void setRect(double x, double y, double width, double height) throws IllegalArgumentExceptionSets the location and size of thisGeoRectangleto the specified double values.- 定義:
setRectクラス内Rectangle2D- パラメータ:
x- the X coordinate to which to set the lower-left corner of thisGeoRectangley- the Y coordinate to which to set the lower-left corner of thisGeoRectanglewidth- the value to use to set the width of thisGeoRectangleheight- the value to use to set the height of thisGeoRectangle- 例外:
IllegalArgumentException- if the specified arguments are geographically illegal.
-
setRect
Sets the location and size of thisGeoRectangleto the specified values.- パラメータ:
origin- the location of the lower-left corner of thisGeoRectanglewidth- the value to use to set the width of thisGeoRectangleheight- the value to use to set the height of thisGeoRectangle- 例外:
IllegalArgumentException- if the specified arguments are geographically illegal.
-
outcode
public int outcode(double x, double y)- 定義:
outcodeクラス内Rectangle2D
-
add
public void add(double x, double y)- オーバーライド:
addクラス内Rectangle2D
-
add
- オーバーライド:
addクラス内Rectangle2D
-
createIntersection
- 定義:
createIntersectionクラス内Rectangle2D
-
createUnion
- 定義:
createUnionクラス内Rectangle2D
-
contains
public boolean contains(double x, double y)- 定義:
containsインタフェース内Shape- オーバーライド:
containsクラス内Rectangle2D
-
contains
- 定義:
containsインタフェース内KeyContainable<Location>
-
contains
public boolean contains(double x, double y, double w, double h)- 定義:
containsインタフェース内Shape- オーバーライド:
containsクラス内Rectangle2D
-
intersects
public boolean intersects(double x, double y, double w, double h)- 定義:
intersectsインタフェース内Shape- オーバーライド:
intersectsクラス内Rectangle2D
-
toString
Returns theStringrepresentation of thisGeoRectangle.
-