public class TLcdXYFloatBounds extends ALcd2DEditableBounds implements ILcd2DEditableBounds
ILcd2DEditableBounds
in
the cartesian space.
This class is thread-safe for read-only access.
Constructor and Description |
---|
TLcdXYFloatBounds()
Constructs a new rectangle, initialized to location (0, 0) and
size (0, 0).
|
TLcdXYFloatBounds(double aX,
double aY,
double aWidth,
double aHeight)
Constructs and initializes a rectangle with the specified parameters.
|
TLcdXYFloatBounds(float aX,
float aY,
float aWidth,
float aHeight)
Constructs and initializes a rectangle with the specified parameters.
|
TLcdXYFloatBounds(ILcdBounds aBounds)
Constructs a new rectangle, initialized to match the values of
the specified rectangle.
|
TLcdXYFloatBounds(ILcdPoint aPoint)
Constructs a rectangle with zero width and height at the specified point.
|
TLcdXYFloatBounds(ILcdPoint aPoint,
double aWidth,
double aHeight)
Constructs a rectangle and initializes it to the specified point.
|
TLcdXYFloatBounds(Rectangle aRectangle)
Constructs a rectangle and initializes it with the values of
an AWT rectangle.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Creates and returns a copy of this object, by delegating to
Object.clone() . |
ILcd2DEditableBounds |
cloneAs2DEditableBounds()
Returns a copy of this
ILcdBounds object that is also an ILcd2DEditableBounds . |
ILcd3DEditableBounds |
cloneAs3DEditableBounds()
Returns a copy of this
ILcdBounds object that is also an ILcd3DEditableBounds . |
double |
getHeight()
Returns the height of the bounding box.
|
ILcdPoint |
getLocation()
Returns the location of the bounding box (smallest x and y coordinates).
|
double |
getMaxX()
Returns the maximum X value (right boundary) of this bounds.
|
double |
getMaxY()
Returns the maximum Y value (upper boundary) of this bounds.
|
double |
getMaxZ()
Returns the maximum Z value (top boundary) of this bounds.
|
double |
getMinX()
Returns the minimum X value (left boundary) of this bounds.
|
double |
getMinY()
Returns the minimum Y value (lower boundary) of this bounds.
|
double |
getMinZ()
Returns the minimum Z value (bottom boundary) of this bounds.
|
double |
getWidth()
Returns the width of the bounding box.
|
static void |
make2DEditableBoundsSFCT(ILcdPoint[] aPointArray,
ILcd2DEditableBounds a2DEditableBoundsSFCT) |
void |
move2D(double aX,
double aY)
Moves this
ILcd2DEditableShape to the given point in the 2D space. |
void |
retrieveAWTRectangleSFCT(Rectangle aRectangleSFCT)
Adapts an AWT
Rectangle so that it contains the given rectangle. |
void |
setHeight(double aHeight)
Sets the height of the bounds (the extent along the y-axis).
|
void |
setWidth(double aWidth)
Sets the width of the bounds (the extent along the x-axis).
|
getDepth, isDefined, move2D, setDefined, setTo2DIntersection, setTo2DIntersection, setTo2DUnion, setTo2DUnion, setToIncludePoint2D, setToIncludePoint2D, toString, translate2D
contains2D, contains2D, contains2D, contains3D, contains3D, contains3D, equals, fromDomainObject, getBounds, getFocusPoint, hashCode, interacts2D, interacts2D, interacts3D, interacts3D, isDefined, isDefined
contains2D, contains3D
finalize, getClass, notify, notifyAll, wait, wait, wait
move2D, setTo2DIntersection, setTo2DIntersection, setTo2DUnion, setTo2DUnion, setToIncludePoint2D, setToIncludePoint2D, translate2D
contains2D, contains2D, contains3D, contains3D, getCenter, getDepth, interacts2D, interacts2D, interacts3D, interacts3D, isDefined
contains2D, contains2D, contains3D, contains3D, getFocusPoint
getBounds
public TLcdXYFloatBounds(float aX, float aY, float aWidth, float aHeight)
aX
- the x coordinate of the lower left point (smallest x).aY
- the y coordinate of the lower left point (smallest y).aWidth
- the width of the rectangle.aHeight
- the height of the rectangle.public TLcdXYFloatBounds(double aX, double aY, double aWidth, double aHeight)
aX
- the x coordinate of the lower left point (smallest x value).aY
- the y coordinate of the lower left point (smallest y value).aWidth
- the width of the rectangle.aHeight
- the height of the rectangle.public TLcdXYFloatBounds()
The defined
status of the instance is false
.
public TLcdXYFloatBounds(ILcdBounds aBounds)
The defined
status of the instance is also copied from the specified bounds.
aBounds
- a rectangle from which to copy initial values.public TLcdXYFloatBounds(ILcdPoint aPoint, double aWidth, double aHeight)
aPoint
- the lower left point of the rectangle.aWidth
- the width of the rectangle.aHeight
- the height of the rectangle.public TLcdXYFloatBounds(ILcdPoint aPoint)
aPoint
- the lower left point of the rectangle.public TLcdXYFloatBounds(Rectangle aRectangle)
aRectangle
- AWT rectangle.public final ILcdPoint getLocation()
ILcdBounds
getLocation
in interface ILcdBounds
public double getMinX()
ILcdBounds
getLocation.getX()
, but can be overridden for performance.getMinX
in interface ILcdBounds
ILcdBounds.getMaxX()
public double getMinY()
ILcdBounds
getLocation.getY()
, but can be overridden for performance.getMinY
in interface ILcdBounds
ILcdBounds.getMaxY()
public double getMinZ()
ILcdBounds
getLocation.getZ()
, but can be overridden for performance.getMinZ
in interface ILcdBounds
ILcdBounds.getMaxZ()
public double getMaxX()
ILcdBounds
getLocation.getX() + getWidth()
, but can be overridden for performance.
Note that this is a derived property, the bounds are defined by their lower-left corner and width/height.
For geodetic bounds
, the returned value is not necessarily normalized to [-180, 180].getMaxX
in interface ILcdBounds
ILcdBounds.getMinX()
public double getMaxY()
ILcdBounds
getLocation.getY() + getHeight()
, but can be overridden for performance.
Note that this is a derived property, the bounds are defined by their lower-left corner and width/height.getMaxY
in interface ILcdBounds
ILcdBounds.getMinY()
public double getMaxZ()
ILcdBounds
getLocation.getZ() + getDepth()
, but can be overridden for performance.
Note that this is a derived property, the bounds are defined by their lower-left corner and width/height.getMaxZ
in interface ILcdBounds
ILcdBounds.getMinZ()
public final double getWidth()
ILcdBounds
getWidth
in interface ILcdBounds
public void setWidth(double aWidth)
ILcd2DEditableBounds
If this bounds was undefined
, it becomes defined.
setWidth
in interface ILcd2DEditableBounds
aWidth
- the new width.public final double getHeight()
ILcdBounds
getHeight
in interface ILcdBounds
public void setHeight(double aHeight)
ILcd2DEditableBounds
If this bounds was undefined
, it becomes defined.
setHeight
in interface ILcd2DEditableBounds
aHeight
- the new height.public void move2D(double aX, double aY)
ILcd2DEditableBounds
ILcd2DEditableShape
to the given point in the 2D space. The focus point
is used as the handle by which the shape is moved. Only the first
two dimensions of the ILcdShape
are considered.
The third dimension is left unchanged.
If this bounds was undefined
, it becomes defined after the move.
move2D
in interface ILcd2DEditableBounds
move2D
in interface ILcd2DEditableShape
aX
- the x coordinate of the point.aY
- the y coordinate of the point.public static void make2DEditableBoundsSFCT(ILcdPoint[] aPointArray, ILcd2DEditableBounds a2DEditableBoundsSFCT)
public void retrieveAWTRectangleSFCT(Rectangle aRectangleSFCT)
Rectangle
so that it contains the given rectangle.aRectangleSFCT
- the rectangle to adapt.public Object clone()
ALcdShape
Object.clone()
. Extensions should delegate to this implementation
with super.clone()
, in order to create an object instance of
the right type, with all fields copied. They then should explicitly
clone any non-primitive fields for which a deeper clone is required.clone
in interface ILcdCloneable
clone
in class ALcdShape
Object.clone()
public ILcd2DEditableBounds cloneAs2DEditableBounds()
ILcdBounds
ILcdBounds
object that is also an ILcd2DEditableBounds
.
This makes sure that the first two dimensions of the copy are writable,
even if the original ILcdBounds
object may be read-only.cloneAs2DEditableBounds
in interface ILcdBounds
ILcdBounds
object that is also an ILcd2DEditableBounds
.
This makes sure that the first two dimensions of the copy are writable,
even if the original ILcdBounds
object may be read-only.ILcd2DEditableBounds
public ILcd3DEditableBounds cloneAs3DEditableBounds()
ILcdBounds
ILcdBounds
object that is also an ILcd3DEditableBounds
.
This makes sure that all three dimensions of the copy are writable,
even if the original ILcdBounds
object may be read-only.cloneAs3DEditableBounds
in interface ILcdBounds
ILcdBounds
object that is also an ILcd3DEditableBounds
.
This makes sure that all three dimensions of the copy are writable,
even if the original ILcdBounds
object may be read-only.ILcd3DEditableBounds