*
*/
public Object createObject(Attributes atts) throws JRException
{
JRChart chart = (JRChart)digester.peek();
JRDesignMeterPlot meterPlot = (JRDesignMeterPlot)chart.getPlot();
MeterShapeEnum shape = MeterShapeEnum.getByName(atts.getValue(ATTRIBUTE_shape));
if (shape != null)
{
meterPlot.setShape(shape);
}
String angle = atts.getValue(ATTRIBUTE_angle);
if (angle != null && angle.length() > 0)
{
meterPlot.setMeterAngle(Integer.valueOf(angle));
}
String units = atts.getValue(ATTRIBUTE_units);
if (units != null && units.length() > 0)
{
meterPlot.setUnits(units);
}
String tickInterval = atts.getValue(ATTRIBUTE_tickInterval);
if (tickInterval != null && tickInterval.length() > 0)
{
meterPlot.setTickInterval(Double.valueOf(tickInterval));
}
String meterColor = atts.getValue(ATTRIBUTE_meterColor);
if (meterColor != null && meterColor.length() > 0)
{
meterPlot.setMeterBackgroundColor(JRColorUtil.getColor(meterColor, null));
}
String needleColor = atts.getValue(ATTRIBUTE_needleColor);
if (needleColor != null && needleColor.length() > 0)
{
meterPlot.setNeedleColor(JRColorUtil.getColor(needleColor, null));
}
String tickColor = atts.getValue(ATTRIBUTE_tickColor);
if (tickColor != null && tickColor.length() > 0)
{
meterPlot.setTickColor(JRColorUtil.getColor(tickColor, null));
}
return meterPlot;
}