Class XDimension2D.Float

    • 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.
        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
        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.
        toString in class Object