Class GUIBounds

java.lang.Object
com.blackrook.gui.GUIBounds

public class GUIBounds extends Object
Object that describes a rectangular area (single-precision coordinates).
Author:
Matthew Tropiano
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    float
    Rectangle height.
    float
    Rectangle width.
    float
    Starting X-coordinate.
    float
    Starting Y-coordinate.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a rectangle at (0,0) with width and height of 0.
    GUIBounds(float x, float y, float width, float height)
    Creates a new rectangle.
    Creates a copy of a rectangle.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    set(float x, float y, float width, float height)
    Sets the values in this rectangle.
    void
    Sets the values in this rectangle using another rectangle.
     

    Methods inherited from class Object

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

    • x

      public float x
      Starting X-coordinate.
    • y

      public float y
      Starting Y-coordinate.
    • width

      public float width
      Rectangle width.
    • height

      public float height
      Rectangle height.
  • Constructor Details

    • GUIBounds

      public GUIBounds()
      Creates a rectangle at (0,0) with width and height of 0.
    • GUIBounds

      public GUIBounds(GUIBounds r)
      Creates a copy of a rectangle.
      Parameters:
      r - the source rectangle to copy.
    • GUIBounds

      public GUIBounds(float x, float y, float width, float height)
      Creates a new rectangle.
      Parameters:
      x - Starting X-coordinate.
      y - Starting Y-coordinate.
      width - Rectangle width.
      height - Rectangle height.
  • Method Details

    • set

      public void set(GUIBounds r)
      Sets the values in this rectangle using another rectangle.
      Parameters:
      r - the other rectangle.
    • set

      public void set(float x, float y, float width, float height)
      Sets the values in this rectangle.
      Parameters:
      x - Starting X-coordinate.
      y - Starting Y-coordinate.
      width - Rectangle width.
      height - Rectangle height.
    • toString

      public String toString()
      Overrides:
      toString in class Object