public class PDimension extends Dimension2D implements Serializable
Modifier and Type | Field and Description |
---|---|
double |
height
The height of the dimension.
|
double |
width
The width of the dimension.
|
Constructor and Description |
---|
PDimension()
Returns a dimension with no width or height.
|
PDimension(Dimension2D aDimension)
Copies the provided dimension.
|
PDimension(double aWidth,
double aHeight)
Creates a dimension with the provided dimensions.
|
PDimension(Point2D p1,
Point2D p2)
Creates a dimension that's the size of a rectangel with the points
provided as opposite corners.
|
Modifier and Type | Method and Description |
---|---|
double |
getHeight()
Returns the height of the dimension.
|
double |
getWidth()
Returns the width of the dimension.
|
void |
setSize(double aWidth,
double aHeight)
Resizes the dimension to have the dimensions provided.
|
String |
toString()
Returns a string representation of this dimension object.
|
clone, setSize
public double width
public double height
public PDimension()
public PDimension(Dimension2D aDimension)
aDimension
- dimension to copypublic PDimension(double aWidth, double aHeight)
aWidth
- desired widthaHeight
- desired heightpublic double getHeight()
getHeight
in class Dimension2D
public double getWidth()
getWidth
in class Dimension2D
public void setSize(double aWidth, double aHeight)
setSize
in class Dimension2D
aWidth
- desired widthaHeight
- desired heightCopyright © 1995-2013 Piccolo2D. All Rights Reserved.