sim.util
Class DoubleDimension2D
java.lang.Object
java.awt.geom.Dimension2D
sim.util.DoubleDimension2D
- All Implemented Interfaces:
- java.lang.Cloneable
- public class DoubleDimension2D
- extends java.awt.geom.Dimension2D
One real oddity of Java 1.3.1 and 1.4.1 is the lack of
a concrete subclass of Dimension2D which uses doubles or floats;
the only one provided (java.awt.Dimension) uses ints! This is particularly
weird given that Java has Rectangle2D.Double, Rectangle2D.Float, and Rectangle (int),
plus Point2D.Double, Point2D.Float, and Point (int), etc. Inexplicable.
This class is a simple concrete subclass of Dimension2D with public width
and height members. You're welcome.
Methods inherited from class java.awt.geom.Dimension2D |
clone, setSize |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
width
public double width
height
public double height
DoubleDimension2D
public DoubleDimension2D(double width,
double height)
getHeight
public double getHeight()
getWidth
public double getWidth()
setSize
public void setSize(double width,
double height)