java::awt::geom::RectangularShape Class Reference

Inheritance diagram for java::awt::geom::RectangularShape:

Inheritance graph
java::awt::geom::Rectangle2Djava::awt::Shapejava::lang::Interfacejava::lang::Objectjava::awt::geom::Rectangle2D::Doublejava::awt::geom::Rectangle2D::Floatjava::awt::Rectangle
[legend]
Collaboration diagram for java::awt::geom::RectangularShape:

Collaboration graph
java::awt::Shapejava::lang::Interfacejava::lang::Object
[legend]

List of all members.


Detailed Description

RectangularShape is the base class for a number of Shape objects whose geometry is defined by a rectangular frame.

This class does not directly specify any specific geometry by itself, but merely provides manipulation methods inherited by a whole category of Shape objects. The manipulation methods provided by this class can be used to query and modify the rectangular frame, which provides a reference for the subclasses to define their geometry.

Version:
1.17, 01/23/03
Author:
Jim Graham

Public Member Functions

virtual jdouble getX () const =0
 Returns the X coordinate of the upper left corner of the framing rectangle in double precision.
virtual jdouble getY () const =0
 Returns the Y coordinate of the upper left corner of the framing rectangle in double precision.
virtual jdouble getWidth () const =0
 Returns the width of the framing rectangle in double precision.
virtual jdouble getHeight () const =0
 Returns the height of the framing rectangle in double precision.
virtual jdouble getMinX () const
 Returns the smallest X coordinate of the framing rectangle of the Shape in double precision.
virtual jdouble getMinY () const
 Returns the smallest Y coordinate of the framing rectangle of the Shape in double precision.
virtual jdouble getMaxX () const
 Returns the largest X coordinate of the framing rectangle of the Shape in double precision.
virtual jdouble getMaxY () const
 Returns the largest Y coordinate of the framing rectangle of the Shape in double precision.
virtual jdouble getCenterX () const
 Returns the X coordinate of the center of the framing rectangle of the Shape in double precision.
virtual jdouble getCenterY () const
 Returns the Y coordinate of the center of the framing rectangle of the Shape in double precision.
virtual Ref
< Rectangle2D
getFrame () const
 Returns the framing Rectangle2D that defines the overall shape of this object.
virtual jboolean isEmpty () const =0
 Determines whether the RectangularShape is empty.
virtual void setFrame (jdouble x, jdouble y, jdouble w, jdouble h)=0
 Sets the location and size of the framing rectangle of this Shape to the specified rectangular values.
virtual void setFrame (const Point2D &loc, const Dimension2D &size)
 Sets the location and size of the framing rectangle of this Shape to the specified Point2D and Dimension2D, respectively.
virtual void setFrame (const Rectangle2D &r)
 Sets the framing rectangle of this Shape to be the specified Rectangle2D.
virtual void setFrameFromDiagonal (jdouble x1, jdouble y1, jdouble x2, jdouble y2)
 Sets the diagonal of the framing rectangle of this Shape based on the two specified coordinates.
virtual void setFrameFromDiagonal (const Point2D &p1, const Point2D &p2)
 Sets the diagonal of the framing rectangle of this Shape based on two specified Point2D objects.
virtual void setFrameFromCenter (jdouble centerX, jdouble centerY, jdouble cornerX, jdouble cornerY)
 Sets the framing rectangle of this Shape based on the specified center point coordinates and corner point coordinates.
virtual void setFrameFromCenter (const Point2D &center, const Point2D &corner)
 Sets the framing rectangle of this Shape based on a specified center Point2D and corner Point2D.
virtual Rectangle getBounds () const
 Returns the bounding box of the Shape.
virtual String toString () const
 Returns the String representation of this Rectangle2D.

Member Function Documentation

virtual jdouble java::awt::geom::RectangularShape::getX (  )  const [pure virtual]

Returns the X coordinate of the upper left corner of the framing rectangle in double precision.

Returns:
the x coordinate of the upper left corner of the framing rectangle.

Implemented in java::awt::Rectangle, java::awt::geom::Rectangle2D::Float, and java::awt::geom::Rectangle2D::Double.

virtual jdouble java::awt::geom::RectangularShape::getY (  )  const [pure virtual]

Returns the Y coordinate of the upper left corner of the framing rectangle in double precision.

Returns:
the y coordinate of the upper left corner of the framing rectangle.

Implemented in java::awt::Rectangle, java::awt::geom::Rectangle2D::Float, and java::awt::geom::Rectangle2D::Double.

virtual jdouble java::awt::geom::RectangularShape::getWidth (  )  const [pure virtual]

Returns the width of the framing rectangle in double precision.

Returns:
the width of the framing rectangle.

Implemented in java::awt::Rectangle, java::awt::geom::Rectangle2D::Float, and java::awt::geom::Rectangle2D::Double.

virtual jdouble java::awt::geom::RectangularShape::getHeight (  )  const [pure virtual]

Returns the height of the framing rectangle in double precision.

Returns:
the height of the framing rectangle.

Implemented in java::awt::Rectangle, java::awt::geom::Rectangle2D::Float, and java::awt::geom::Rectangle2D::Double.

virtual jdouble java::awt::geom::RectangularShape::getMinX (  )  const [virtual]

Returns the smallest X coordinate of the framing rectangle of the Shape in double precision.

Returns:
the smallest x coordinate of the framing rectangle of the Shape.

virtual jdouble java::awt::geom::RectangularShape::getMinY (  )  const [virtual]

Returns the smallest Y coordinate of the framing rectangle of the Shape in double precision.

Returns:
the smallest y coordinate of the framing rectangle of the Shape.

virtual jdouble java::awt::geom::RectangularShape::getMaxX (  )  const [virtual]

Returns the largest X coordinate of the framing rectangle of the Shape in double precision.

Returns:
the largest x coordinate of the framing rectangle of the Shape.

virtual jdouble java::awt::geom::RectangularShape::getMaxY (  )  const [virtual]

Returns the largest Y coordinate of the framing rectangle of the Shape in double precision.

Returns:
the largest y coordinate of the framing rectangle of the Shape.

virtual jdouble java::awt::geom::RectangularShape::getCenterX (  )  const [virtual]

Returns the X coordinate of the center of the framing rectangle of the Shape in double precision.

Returns:
the x coordinate of the framing rectangle of the Shape object's center.

virtual jdouble java::awt::geom::RectangularShape::getCenterY (  )  const [virtual]

Returns the Y coordinate of the center of the framing rectangle of the Shape in double precision.

Returns:
the y coordinate of the framing rectangle of the Shape object's center.

virtual Ref<Rectangle2D> java::awt::geom::RectangularShape::getFrame (  )  const [virtual]

Returns the framing Rectangle2D that defines the overall shape of this object.

Returns:
a Rectangle2D, specified in double coordinates.
See also:
setFrame(double, double, double, double)

setFrame(Point2D, Dimension2D)

setFrame(Rectangle2D)

virtual jboolean java::awt::geom::RectangularShape::isEmpty (  )  const [pure virtual]

Determines whether the RectangularShape is empty.

When the RectangularShape is empty, it encloses no area.

Returns:
true if the RectangularShape is empty; false otherwise.

Implemented in java::awt::Rectangle, java::awt::geom::Rectangle2D::Float, and java::awt::geom::Rectangle2D::Double.

virtual void java::awt::geom::RectangularShape::setFrame ( jdouble  x,
jdouble  y,
jdouble  w,
jdouble  h 
) [pure virtual]

Sets the location and size of the framing rectangle of this Shape to the specified rectangular values.

The framing rectangle is used by the subclasses of RectangularShape to define their geometry.

Parameters:
x,&nbsp;y the coordinates of the upper-left corner of the specified rectangular shape
w the width of the specified rectangular shape
h the height of the specified rectangular shape
See also:
getFrame

Implemented in java::awt::geom::Rectangle2D.

virtual void java::awt::geom::RectangularShape::setFrame ( const Point2D loc,
const Dimension2D size 
) [virtual]

Sets the location and size of the framing rectangle of this Shape to the specified Point2D and Dimension2D, respectively.

The framing rectangle is used by the subclasses of RectangularShape to define their geometry.

Parameters:
loc the specified Point2D
size the specified Dimension2D
See also:
getFrame

Reimplemented in java::awt::geom::Rectangle2D.

virtual void java::awt::geom::RectangularShape::setFrame ( const Rectangle2D r  )  [virtual]

Sets the framing rectangle of this Shape to be the specified Rectangle2D.

The framing rectangle is used by the subclasses of RectangularShape to define their geometry.

Parameters:
r the specified Rectangle2D
See also:
getFrame

Reimplemented in java::awt::geom::Rectangle2D.

virtual void java::awt::geom::RectangularShape::setFrameFromDiagonal ( jdouble  x1,
jdouble  y1,
jdouble  x2,
jdouble  y2 
) [virtual]

Sets the diagonal of the framing rectangle of this Shape based on the two specified coordinates.

The framing rectangle is used by the subclasses of RectangularShape to define their geometry.

Parameters:
x1,&nbsp;y1 the first specified coordinates
x2,&nbsp;y2 the second specified coordinates

virtual void java::awt::geom::RectangularShape::setFrameFromDiagonal ( const Point2D p1,
const Point2D p2 
) [virtual]

Sets the diagonal of the framing rectangle of this Shape based on two specified Point2D objects.

The framing rectangle is used by the subclasses of RectangularShape to define their geometry.

Parameters:
p1,&nbsp;p2 the two specified Point2D objects

virtual void java::awt::geom::RectangularShape::setFrameFromCenter ( jdouble  centerX,
jdouble  centerY,
jdouble  cornerX,
jdouble  cornerY 
) [virtual]

Sets the framing rectangle of this Shape based on the specified center point coordinates and corner point coordinates.

The framing rectangle is used by the subclasses of RectangularShape to define their geometry.

Parameters:
centerX,&nbsp;centerY the center point coordinates
cornerX,&nbsp;cornerY the corner point coordinates

virtual void java::awt::geom::RectangularShape::setFrameFromCenter ( const Point2D center,
const Point2D corner 
) [virtual]

Sets the framing rectangle of this Shape based on a specified center Point2D and corner Point2D.

The framing rectangle is used by the subclasses of RectangularShape to define their geometry.

Parameters:
center the specified center Point2D
corner the specified corner Point2D

virtual Rectangle java::awt::geom::RectangularShape::getBounds (  )  const [virtual]

Returns the bounding box of the Shape.

Returns:
a Rectangle object that bounds the Shape.

Implements java::awt::Shape.

Reimplemented in java::awt::Rectangle.

virtual String java::awt::geom::RectangularShape::toString (  )  const [virtual]

Returns the String representation of this Rectangle2D.

Returns:
a String representing this Rectangle2D.
Since:
1.2

Reimplemented from java::lang::Object.

Reimplemented in java::awt::Rectangle.


The documentation for this class was generated from the following file:
Generated on Fri May 16 11:56:22 2008 for CrossPlatformJavaLikeC++API by  doxygen 1.5.3