Package gnu.kawa.models
Class DDimension
java.lang.Object
java.awt.geom.Dimension2D
java.awt.Dimension
gnu.kawa.models.DDimension
- All Implemented Interfaces:
Serializable
,Cloneable
A subclass of Dimension that uses doubles.
This is compatible with code that expects a Dimension (which uses int),
but can also be used where fractional lengths are needed.
Avoid setting the inherited public
width
and height
fields
directly, as that can lead to inconsistencies.- See Also:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.awt.geom.Dimension2D
clone
-
Constructor Details
-
DDimension
public DDimension() -
DDimension
public DDimension(double width, double height) -
DDimension
-
-
Method Details
-
getWidth
public double getWidth() -
getHeight
public double getHeight() -
getSize
-
setWidth
public void setWidth(double width) -
setHeight
public void setHeight(double height) -
setSize
public void setSize(int width, int height) -
setSize
public void setSize(double width, double height) -
setSize
-
setSize
- Overrides:
setSize
in classDimension2D
-
equals
-
toString
-