|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.geom.Dimension2D
edu.umd.cs.piccolo.util.PDimension
public class PDimension
PDimension this class should be removed once a concrete Dimension2D that supports doubles is added to java.
Field Summary | |
---|---|
double |
height
The height of the dimension. |
double |
width
The width of the dimension. |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.awt.geom.Dimension2D |
---|
clone, setSize |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public double width
public double height
Constructor Detail |
---|
public PDimension()
public PDimension(Dimension2D aDimension)
aDimension
- dimension to copypublic PDimension(double aWidth, double aHeight)
aWidth
- desired widthaHeight
- desired heightpublic PDimension(Point2D p1, Point2D p2)
p1
- first point on rectanglep2
- point diagonally across from p1Method Detail |
---|
public 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 heightpublic String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |