Package com.intellij.util.ui
Class RegionPainter.Image
java.lang.Object
com.intellij.util.ui.RegionPainter.Image
- All Implemented Interfaces:
RegionPainter<Object>
- Enclosing interface:
RegionPainter<T>
This class provides a caching functionality for a region painter.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.intellij.util.ui.RegionPainter
RegionPainter.Alpha, RegionPainter.Image -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected BufferedImagecreateImage(int width, int height) This method is called if the cached image is invalidated or it's size is changed.protected voidThis method is called to invalidate the cached image.voidpaint(Graphics2D g, int x, int y, int width, int height, Object object) Renders to the givenGraphics2Dobject.protected voidupdateImage(BufferedImage image) This method is called for the cached image beforedrawImage.
-
Constructor Details
-
Image
public Image()
-
-
Method Details
-
updateImage
This method is called for the cached image beforedrawImage. It should be overridden if the image must be updated without creating a new image.- Parameters:
image- the cached image to update
-
createImage
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 imageheight- height of the new image- Returns:
- new
BufferedImageobject
-
invalidate
protected void invalidate()This method is called to invalidate the cached image. -
paint
Description copied from interface:RegionPainterRenders to the givenGraphics2Dobject.- Specified by:
paintin interfaceRegionPainter<Object>- Parameters:
g- theGraphics2Dobject to render tox- X position of the area to painty- Y position of the area to paintwidth- width of the area to paintheight- height of the area to paintobject- an optional configuration parameter
-