Class Rectangle


  • public class Rectangle
    extends java.lang.Object
    Simple rect class
    • Field Summary

      Fields 
      Modifier and Type Field Description
      int height  
      int width  
      int x  
      int y  
    • Constructor Summary

      Constructors 
      Constructor Description
      Rectangle()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean contains​(int x, int y)  
      int getCenterX()  
      int getCenterY()  
      void setBounds​(int x, int y, int width, int height)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • x

        public int x
      • y

        public int y
      • width

        public int width
      • height

        public int height
    • Constructor Detail

      • Rectangle

        public Rectangle()
    • Method Detail

      • setBounds

        public void setBounds​(int x,
                              int y,
                              int width,
                              int height)
      • contains

        public boolean contains​(int x,
                                int y)
      • getCenterX

        public int getCenterX()
      • getCenterY

        public int getCenterY()