g.fillPolygon(new double[]{0.0-s/2,0.0+yoff, s/2,0.0 +yoff,0,s+yoff});
//center
s = 10;
yoff = 1;
double hue = color.getHue();
MultiGradientFill fill = new LinearGradientFill()
.setStartX(0).setEndX(0).setStartY(0).setEndY(s)
.addStop(0,FlatColor.hsb(hue,0.4,1.0))
.addStop(1,FlatColor.hsb(hue,1.0,1.0))
;
g.setPaint(fill);
g.translate(0,0);
g.fillPolygon(new double[]{0.0-s/2,0.0+yoff, s/2,0.0 +yoff,0,s+yoff});
g.translate(0,0);
} else {
//shadow
g.setPaint(new FlatColor(0x404040).deriveWithAlpha(0.5));
s = 14;
yoff = 1;
g.fillPolygon(new double[]{0.0+yoff, 0.0-s/2, 0.0+yoff, s/2,0.0+s +yoff,0});
//border
g.setPaint(FlatColor.WHITE);
s = 14;
yoff = 0;
g.fillPolygon(new double[]{0.0+yoff, 0.0-s/2, 0.0+yoff, s/2,0.0+s +yoff,0});
//center
s = 10;
yoff = 1;
double hue = color.getHue();
MultiGradientFill fill = new LinearGradientFill()
.setStartX(0).setEndX(s).setStartY(0).setEndY(0)
.addStop(0,FlatColor.hsb(hue,0.4,1.0))
.addStop(1,FlatColor.hsb(hue,1.0,1.0))
;
g.setPaint(fill);