Class XDimension2D.Float

All Implemented Interfaces:
Serializable, Cloneable
Enclosing class:
XDimension2D

public static final class XDimension2D.Float extends Dimension2D implements Serializable
Implement float version of Dimension2D. This class is temporary; it will disappear if JavaSoft implements Dimension2D.Float and Dimension2D.Double.
Author:
Martin Desruisseaux (IRD)
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    float
    The height.
    float
    The width.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Construct a new dimension initialized to (0,0).
    Float(float w, float h)
    Construct a new dimension with the specified values.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the height.
    double
    Returns the width.
    void
    setSize(double w, double h)
    Set width and height for this dimension.
    Returns a string representation of this dimension.

    Methods inherited from class Dimension2D

    clone, setSize

    Methods inherited from class Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • width

      public float width
      The width.
    • height

      public float height
      The height.
  • Constructor Details

    • Float

      public Float()
      Construct a new dimension initialized to (0,0).
    • Float

      public Float(float w, float h)
      Construct a new dimension with the specified values.
      Parameters:
      w - The width.
      h - The height.
  • Method Details

    • setSize

      public void setSize(double w, double h)
      Set width and height for this dimension.
      Specified by:
      setSize in class Dimension2D
      Parameters:
      w - The width.
      h - The height.
    • getWidth

      public double getWidth()
      Returns the width.
      Specified by:
      getWidth in class Dimension2D
    • getHeight

      public double getHeight()
      Returns the height.
      Specified by:
      getHeight in class Dimension2D
    • toString

      public String toString()
      Returns a string representation of this dimension.
      Overrides:
      toString in class Object