Class Rectangle.OfFloat

java.lang.Object
org.eclipse.swt.graphics.Rectangle
org.eclipse.swt.graphics.Rectangle.OfFloat
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
Rectangle.WithMonitor
Enclosing class:
Rectangle

public static sealed class Rectangle.OfFloat extends Rectangle permits Rectangle.WithMonitor
Instances of this class represent Rectangle objects which supports values of Float type for it's fields
Since:
3.131
See Also:
Restriction:
This class is not intended to be referenced by clients
  • Constructor Details

    • OfFloat

      public OfFloat(int x, int y, int width, int height)
    • OfFloat

      public OfFloat(float x, float y, float width, float height)
  • Method Details

    • getX

      public float getX()
    • getY

      public float getY()
    • getWidth

      public float getWidth()
    • getHeight

      public float getHeight()
    • setX

      public void setX(float x)
    • setY

      public void setY(float y)
    • setWidth

      public void setWidth(float width)
    • setHeight

      public void setHeight(float height)
    • clone

      public Rectangle.OfFloat clone()
      Description copied from class: Rectangle
      Creates and returns a copy of this Rectangle.

      This method performs a shallow copy of the rectangle's fields: x, y, width, and height. It does not copy any subclass-specific fields, so subclasses should override this method if additional fields exist.

      Overrides:
      clone in class Rectangle
      Returns:
      a new Rectangle instance with the same position and size as this one
    • from

      public static Rectangle.OfFloat from(Rectangle rectangle)
      Creates a shallow copy of the provided Rectangle as a Rectangle.OfFloat instance.