Class BackgroundPaintingUtils
- java.lang.Object
-
- org.pushingpixels.radiance.theming.internal.painter.BackgroundPaintingUtils
-
public class BackgroundPaintingUtils extends java.lang.Object
Delegate for painting filled backgrounds.
-
-
Constructor Summary
Constructors Constructor Description BackgroundPaintingUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
fillBackground(java.awt.Graphics g, javax.swing.JComponent c, java.awt.Color fillColor, java.awt.Rectangle rect)
Updates the background of the specified component on the specified graphic context in the specified rectangle.static void
update(java.awt.Graphics g, javax.swing.JComponent c, boolean force)
Updates the background of the specified component on the specified graphic context.static void
updateIfOpaque(java.awt.Graphics g, javax.swing.JComponent c)
Updates the background of the specified component on the specified graphic context.
-
-
-
Method Detail
-
updateIfOpaque
public static void updateIfOpaque(java.awt.Graphics g, javax.swing.JComponent c)
Updates the background of the specified component on the specified graphic context. The background is updated only if the component is opaque.- Parameters:
g
- Graphic context.c
- Component.
-
update
public static void update(java.awt.Graphics g, javax.swing.JComponent c, boolean force)
Updates the background of the specified component on the specified graphic context. The background is not painted when theforce
parameter isfalse
and at least one of the following conditions holds:- The component is in a cell renderer.
- The component is not showing on the screen.
- The component is in the preview mode.
- Parameters:
g
- Graphic context.c
- Component.force
- Iftrue
, the painting of background is enforced.
-
fillBackground
public static void fillBackground(java.awt.Graphics g, javax.swing.JComponent c, java.awt.Color fillColor, java.awt.Rectangle rect)
Updates the background of the specified component on the specified graphic context in the specified rectangle.- Parameters:
g
- Graphic context.c
- Component.fillColor
- Fill color.rect
- The rectangle to fill.
-
-