|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectRectangularShape
Rectangle2D
Rectangle
GridEnvelope2D
public class GridEnvelope2D
Defines a range of two-dimensional grid coverage coordinates. This implementation extends
Rectangle
for interoperability with Java2D. Note that at the opposite of
GeneralGridEnvelope
, this class is mutable.
CAUTION:
ISO 19123 defines high coordinates as inclusive.
We follow this specification for all getters methods, but keep in mind that this is the
opposite of Java2D usage where Rectangle
maximal values are exclusive.
GeneralGridEnvelope
,
Serialized Form
modules/library/coverage (gt-coverage.jar)
Nested Class Summary |
---|
Nested classes/interfaces inherited from class Rectangle2D |
---|
Rectangle2D.Double, Rectangle2D.Float |
Field Summary |
---|
Fields inherited from class Rectangle |
---|
height, width, x, y |
Fields inherited from class Rectangle2D |
---|
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP |
Constructor Summary | |
---|---|
GridEnvelope2D()
Creates an initially empty grid envelope. |
|
GridEnvelope2D(int x,
int y,
int width,
int height)
Creates a grid envelope initialized to the specified rectangle. |
|
GridEnvelope2D(Rectangle rectangle)
Creates a grid envelope initialized to the specified rectangle. |
Method Summary | |
---|---|
GridEnvelope2D |
clone()
Returns a clone of this grid envelope. |
int |
getDimension()
Returns the number of dimensions, which is always 2. |
GridCoordinates2D |
getHigh()
Returns the valid maximum inclusive grid coordinates. |
int |
getHigh(int dimension)
Returns the valid maximum inclusive grid coordinate along the specified dimension. |
GridCoordinates2D |
getLow()
Returns the valid minimum inclusive grid coordinates. |
int |
getLow(int dimension)
Returns the valid minimum inclusive grid coordinate along the specified dimension. |
int |
getSpan(int dimension)
Returns the number of integer grid coordinates along the specified dimension. |
String |
toString()
Returns a string représentation of this grid envelope. |
Methods inherited from class Rectangle |
---|
add, add, add, contains, contains, contains, contains, createIntersection, createUnion, equals, getBounds, getBounds2D, getHeight, getLocation, getSize, getWidth, getX, getY, grow, inside, intersection, intersects, isEmpty, move, outcode, reshape, resize, setBounds, setBounds, setLocation, setLocation, setRect, setSize, setSize, translate, union |
Methods inherited from class Rectangle2D |
---|
add, add, add, contains, contains, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, setRect, union |
Methods inherited from class RectangularShape |
---|
contains, contains, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal |
Methods inherited from class Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface Shape |
---|
contains, contains, contains, contains, getPathIterator, getPathIterator, intersects, intersects |
Constructor Detail |
---|
public GridEnvelope2D()
public GridEnvelope2D(Rectangle rectangle)
rectangle
- The rectangle to use for initializing this grid envelope.public GridEnvelope2D(int x, int y, int width, int height)
x
- The minimal x ordinate.y
- The minimal y ordinate.width
- The number of valid ordinates along the x axis.height
- The number of valid ordinates along the y axis.Method Detail |
---|
public final int getDimension()
getDimension
in interface GridEnvelope
public GridCoordinates2D getLow()
getLow
in interface GridEnvelope
public GridCoordinates2D getHigh()
getHigh
in interface GridEnvelope
public int getLow(int dimension)
getLow
in interface GridEnvelope
getLow()
public int getHigh(int dimension)
getHigh
in interface GridEnvelope
getHigh()
public int getSpan(int dimension)
getHigh(dimension) - getLow(dimension)
.
getSpan
in interface GridEnvelope
public String toString()
toString
in class Rectangle
public GridEnvelope2D clone()
clone
in class RectangularShape
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |