java.awt.geom
Class Dimension2D
java.lang.Object
|
+--java.awt.geom.Dimension2D
All Implemented Interfaces:
Cloneable
This stores a dimension in 2-dimensional space - a width (along the x-axis)
and height (along the y-axis). The storage is left to subclasses.
Since:Authors:- Per Bothner <bothner@cygnus.com>
- Eric Blake <ebb9@email.byu.edu>
Dimension2D
protected Dimension2D()
The default constructor.
clone
public Object clone()
Create a new dimension of the same run-time type with the same contents
as this one.
Since:Returns:
Throws:
getHeight
public double getHeight()
Get the height of this dimension. A negative result, while legal, is
undefined in meaning.
Returns:
getWidth
public double getWidth()
Get the width of this dimension. A negative result, while legal, is
undefined in meaning.
Returns:
setSize
public void setSize(double w, double h)
Set the size of this dimension to the requested values. Loss of precision
may occur.
Parameters:
setSize
public void setSize(java.awt.geom.Dimension2D d)
Set the size of this dimension to the requested value. Loss of precision
may occur.
Parameters:
Throws: