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;
if (sblp.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(getBorderTopShape());
}
}
if (sblp.getBorderRight() > 0)
{
final BorderEdge borderEdge = border.getRight();
final BasicStroke basicStroke = createStroke(borderEdge, staticBoxLayoutProperties.getBorderRight());
if (basicStroke != null)
{
g2d.setColor(borderEdge.getColor());
g2d.setStroke(basicStroke);
g2d.draw(getBorderRightShape());
}
}
if (sblp.getBorderBottom() > 0)
{
final BorderEdge borderEdge = border.getBottom();
final BasicStroke basicStroke = createStroke(borderEdge, staticBoxLayoutProperties.getBorderBottom());
if (basicStroke != null)
{
g2d.setColor(borderEdge.getColor());
g2d.setStroke(basicStroke);
g2d.draw(getBorderBottomShape());
}
}
if (sblp.getBorderLeft() > 0)
{
final BorderEdge borderEdge = border.getLeft();
final BasicStroke basicStroke = createStroke(borderEdge, staticBoxLayoutProperties.getBorderLeft());
if (basicStroke != null)
{
g2d.setColor(borderEdge.getColor());
g2d.setStroke(basicStroke);
g2d.draw(getBorderLeftShape());