Class Size2D

All Implemented Interfaces:
Serializable, Cloneable

public class Size2D extends Point2D.Double
Mutable two-dimensional size value used by layout objects.
See Also:
  • Constructor Details

    • Size2D

      public Size2D()
      Creates a size 2 d instance.
    • Size2D

      public Size2D(double x, double y)
      Creates a size 2 d instance.
      Parameters:
      x - x coordinate
      y - y coordinate
  • Method Details

    • getHeight

      public double getHeight()
      Returns the height.
      Returns:
      the height
    • getWidth

      public double getWidth()
      Returns the width.
      Returns:
      the width
    • getX

      @Deprecated public double getX()
      Deprecated.
      Returns the x.
      Overrides:
      getX in class Point2D.Double
      Returns:
      the x
    • getY

      @Deprecated public double getY()
      Deprecated.
      Returns the y.
      Overrides:
      getY in class Point2D.Double
      Returns:
      the y
    • setHeight

      public void setHeight(double y)
      Sets the height.
      Parameters:
      y - y coordinate
    • setWidth

      public void setWidth(double x)
      Sets the width.
      Parameters:
      x - x coordinate
    • setX

      @Deprecated public void setX(double x)
      Deprecated.
      Sets the x.
      Parameters:
      x - x coordinate
    • setY

      @Deprecated public void setY(double y)
      Deprecated.
      Sets the y.
      Parameters:
      y - y coordinate