public class BackgroundPainter
extends java.lang.Object
implements javax.swing.Painter<javax.swing.JComponent>
Custom background painter for Nimbus components without color gradients.
Used for painting:
Modifier and Type | Field and Description |
---|---|
private java.awt.Color |
bgColor |
private java.awt.Color |
secondColor |
Constructor and Description |
---|
BackgroundPainter(java.awt.Color bgColor)
Creates a background painter using one color.
|
BackgroundPainter(java.awt.Color bgColor,
java.awt.Color secondColor)
Creates a background painter using two colors.
|
Modifier and Type | Method and Description |
---|---|
void |
paint(java.awt.Graphics2D g,
javax.swing.JComponent component,
int width,
int height) |
public BackgroundPainter(java.awt.Color bgColor, java.awt.Color secondColor)
Creates a background painter using two colors. Used for selected tree cells, slider tracks or inactive (disabled) buttons.
bgColor
- background colorsecondColor
- border color (for inactive buttons and slider tracks) or background color (for message trees)public BackgroundPainter(java.awt.Color bgColor)
Creates a background painter using one color. Used for inactive (disabled) text fields.
bgColor
- background color