final Color oldColor = g2d.getColor();
final Stroke oldStroke = g2d.getStroke();
if (isSameForAllSides())
{
final Shape borderShape = getBorderShape();
if (backgroundColor != null)
{
g2d.setColor(backgroundColor);
g2d.fill(borderShape);
}
if (staticBoxLayoutProperties.getBorderTop() > 0)
{
final BorderEdge borderEdge = border.getTop();
final BasicStroke basicStroke = createStroke(borderEdge, staticBoxLayoutProperties.getBorderTop());
if (basicStroke != null)
{
g2d.setColor(borderEdge.getColor());
g2d.setStroke(basicStroke);
g2d.draw(borderShape);
}
}
g2d.setColor(oldColor);
g2d.setStroke(oldStroke);
return;
}
if (backgroundColor != null)
{
final Shape borderShape = getBorderShape();
g2d.setColor(backgroundColor);
g2d.fill(borderShape);
}
final StaticBoxLayoutProperties sblp = this.staticBoxLayoutProperties;