java.awt.geom
public abstract class Dimension2D extends Object implements Cloneable
Modifier | Constructor and Description |
---|---|
protected |
Dimension2D()
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Create a new dimension of the same run-time type with the same contents
as this one.
|
abstract double |
getHeight()
Get the height of this dimension.
|
abstract double |
getWidth()
Get the width of this dimension.
|
void |
setSize(Dimension2D d)
Set the size of this dimension to the requested value.
|
abstract void |
setSize(double w,
double h)
Set the size of this dimension to the requested values.
|
protected Dimension2D()
public abstract double getWidth()
public abstract double getHeight()
public abstract void setSize(double w, double h)
w
- the new widthh
- the new heightpublic void setSize(Dimension2D d)
d
- the dimension containing the new valuesNullPointerException
- if d is null