Class RegionDef

  • All Implemented Interfaces:
    java.io.Serializable

    public class RegionDef
    extends java.lang.Object
    implements java.io.Serializable
    Identifies a rectangular region.
    Since:
    3.0-Beta4
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      RegionDef()
      Creates a default instance.
      RegionDef​(int x, int y, int width, int height)
      Creates a rectangular region.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getHeight()
      Returns the height of the region.
      int getWidth()
      Returns the width of the region.
      int getX()
      Returns the x-coordinate of the top-left corner.
      int getY()
      Returns the y-coordinate of the top-left corner.
      void setHeight​(int height)
      Sets the height of the region.
      void setWidth​(int width)
      Sets the width of the region.
      void setX​(int x)
      Sets the x-coordinate of the top-left corner.
      void setY​(int y)
      Sets the y-coordinate of the top-left corner.
      java.lang.String toString()
      Overridden to return the region as a string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • RegionDef

        public RegionDef()
        Creates a default instance.
      • RegionDef

        public RegionDef​(int x,
                         int y,
                         int width,
                         int height)
        Creates a rectangular region.
        Parameters:
        x - The x-coordinate of the top-left corner.
        y - The y-coordinate of the top-left corner.
        width - The width of the region.
        height - The height of the region.
    • Method Detail

      • getX

        public int getX()
        Returns the x-coordinate of the top-left corner.
        Returns:
        See above.
      • getY

        public int getY()
        Returns the y-coordinate of the top-left corner.
        Returns:
        See above.
      • getWidth

        public int getWidth()
        Returns the width of the region.
        Returns:
        See above.
      • getHeight

        public int getHeight()
        Returns the height of the region.
        Returns:
        See above.
      • setX

        public void setX​(int x)
        Sets the x-coordinate of the top-left corner.
        Parameters:
        x - The value to set.
      • setY

        public void setY​(int y)
        Sets the y-coordinate of the top-left corner.
        Parameters:
        y - The value to set.
      • setWidth

        public void setWidth​(int width)
        Sets the width of the region.
        Parameters:
        width - The value to set.
      • setHeight

        public void setHeight​(int height)
        Sets the height of the region.
        Parameters:
        height - The value to set.
      • toString

        public java.lang.String toString()
        Overridden to return the region as a string.
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()