int b = 40;
if (rollover)
{
b = 60;
}
final GradientPaint gp = new GradientPaint(0, o,
new Color(Math.min(164 + b, 255), Math.min(166 + b, 255), Math.min(172 + b, 255)), 0, h + o,
new Color(Math.min(189 + b, 255), Math.min(192 + b, 255), Math.min(198 + b, 255)), true);
g.setPaint(gp);
}
else
{
final int o = -5;
int b = 0;
if (rollover)
{
b = 60;
}
final GradientPaint gp = new GradientPaint(0, o,
new Color(Math.min(251 + b, 255), Math.min(251 + b, 255), Math.min(252 + b, 255)), 0, h + o,
new Color(Math.min(215 + b, 255), Math.min(218 + b, 255), Math.min(224 + b, 255)), true);
g.setPaint(gp);
}
final RoundRectangle2D roundRectangle2D = new RoundRectangle2D.Double(0, 0, w - 1, h - 1, 6, 6);
//if (!selected || rollover)
{
g.fill(roundRectangle2D);
}
if (selected)
{
final GradientPaint gp = new GradientPaint(0, 0,
new Color(Math.min(125, 255), Math.min(127, 255), Math.min(131, 255)), 0, h,
new Color(Math.min(162, 255), Math.min(164, 255), Math.min(169, 255)), true);
g.setPaint(gp);
}
else
{
final GradientPaint gp = new GradientPaint(0, 0,
new Color(Math.min(149, 255), Math.min(155, 255), Math.min(158, 255)), 0, h,
new Color(Math.min(85, 255), Math.min(88, 255), Math.min(94, 255)), true);
g.setPaint(gp);
}