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:
    Serialized Form
    • Field Summary

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

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double getHeight()
      Returns the height.
      double getWidth()
      Returns the width.
      void setSize​(double w, double h)
      Set width and height for this dimension.
      String toString()
      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 Detail

      • width

        public float width
        The width.
      • height

        public float height
        The height.
    • Constructor Detail

      • 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 Detail

      • 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