Class RegionPainter.Image

java.lang.Object
com.intellij.util.ui.RegionPainter.Image
All Implemented Interfaces:
RegionPainter<Object>
Enclosing interface:
RegionPainter<T>

public static class RegionPainter.Image extends Object implements RegionPainter<Object>
This class provides a caching functionality for a region painter.
  • Constructor Details

    • Image

      public Image()
  • Method Details

    • updateImage

      protected void updateImage(BufferedImage image)
      This method is called for the cached image before drawImage. It should be overridden if the image must be updated without creating a new image.
      Parameters:
      image - the cached image to update
    • createImage

      protected BufferedImage createImage(int width, int height)
      This method is called if the cached image is invalidated or it's size is changed. It must be overridden to paint on newly created image.
      Parameters:
      width - width of the new image
      height - height of the new image
      Returns:
      new BufferedImage object
    • invalidate

      protected void invalidate()
      This method is called to invalidate the cached image.
    • paint

      public void paint(Graphics2D g, int x, int y, int width, int height, Object object)
      Description copied from interface: RegionPainter
      Renders to the given Graphics2D object.
      Specified by:
      paint in interface RegionPainter<Object>
      Parameters:
      g - the Graphics2D object to render to
      x - X position of the area to paint
      y - Y position of the area to paint
      width - width of the area to paint
      height - height of the area to paint
      object - an optional configuration parameter