Package com.intellij.util.ui
Interface RegionPainter<T>
- All Known Implementing Classes:
ButtonlessScrollBarUI.ThumbPainter,EffectPainter,RectanglePainter,RegionPainter.Alpha,RegionPainter.Image
public interface RegionPainter<T>
The
RegionPainter interface defines exactly one method, paint.
It is used in situations where the developer can change the painting routine
of a component without having to resort to subclassing the component.
It is also generically useful when doing any form of painting delegation.
Painters are simply encapsulations of Java2D code and make it fairly trivial to reuse existing painters or to combine them together. Implementations of this interface are also trivial to write, such that if you can't find a painter that does what you need, you can write one with minimal effort.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classThis class provides a base functionality to paint a region with the specified alpha.static classThis class provides a caching functionality for a region painter. -
Method Summary
Modifier and TypeMethodDescriptionvoidpaint(Graphics2D g, int x, int y, int width, int height, T object) Renders to the givenGraphics2Dobject.
-
Method Details
-
paint
Renders to the givenGraphics2Dobject.- 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
-