String backcolor = atts.getValue(JRXmlConstants.ATTRIBUTE_backcolor);
style.setBackcolor(JRColorUtil.getColor(backcolor, null));
// get graphic element attributes
PenEnum pen = PenEnum.getByName(atts.getValue(JRXmlConstants.ATTRIBUTE_pen));
if (pen != null)
{
if (log.isWarnEnabled())
{
log.warn("The 'pen' attribute is deprecated. Use the <pen> tag instead.");
}
JRPenUtil.setLinePenFromPen(pen, style.getLinePen());
}
FillEnum fill = FillEnum.getByName(atts.getValue(JRXmlConstants.ATTRIBUTE_fill));
if(fill != null)
{
style.setFill(fill);
}
// get rectangle attributes
String radius = atts.getValue(JRXmlConstants.ATTRIBUTE_radius);
if (radius != null && radius.length() > 0)
{
style.setRadius(Integer.parseInt(radius));
}
// get image attributes
ScaleImageEnum scaleImage = ScaleImageEnum.getByName(atts.getValue(JRXmlConstants.ATTRIBUTE_scaleImage));
if (scaleImage != null)
{
style.setScaleImage(scaleImage);
}
HorizontalAlignEnum horizontalAlignment = HorizontalAlignEnum.getByName(atts.getValue(JRXmlConstants.ATTRIBUTE_hAlign));
if (horizontalAlignment != null)
{
style.setHorizontalAlignment(horizontalAlignment);
}
VerticalAlignEnum verticalAlignment = VerticalAlignEnum.getByName(atts.getValue(JRXmlConstants.ATTRIBUTE_vAlign));
if (verticalAlignment != null)
{
style.setVerticalAlignment(verticalAlignment);
}
// get box attributes
PenEnum border = PenEnum.getByName(atts.getValue(JRXmlConstants.ATTRIBUTE_border));
if (border != null)
{
if (log.isWarnEnabled())
{
log.warn("The 'border' attribute is deprecated. Use the <pen> tag instead.");