Interface PaintedObject

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.awt.geom.Rectangle2D getBounds()
      Get the bounding box of the object when painted.
      void paint​(java.awt.Graphics2D g)
      Paint the shape.
    • Method Detail

      • getBounds

        java.awt.geom.Rectangle2D getBounds()
        Get the bounding box of the object when painted. Implementations of this method should take account of the thickness of the stroke, if there is one.
      • paint

        void paint​(java.awt.Graphics2D g)
        Paint the shape. Implementations are expected to redraw the entire object. Whether or not the paint overwrites fields in the graphics context such as the current paint, stroke, and composite, depends on the implementing class.