*
*/
public Object createObject(Attributes atts) throws JRException
{
JRChart chart = (JRChart)digester.peek();
JRDesignThermometerPlot thermometerPlot = (JRDesignThermometerPlot)chart.getPlot();
String location = atts.getValue(ATTRIBUTE_valueLocation);
ValueLocationEnum loc = ValueLocationEnum.getByName(atts.getValue(ATTRIBUTE_valueLocation));
if (loc == null)
{
throw new JRException("Invalid thermometer value location: " + location);
}
else
{
thermometerPlot.setValueLocation(loc);
}
String mercuryColor = atts.getValue(ATTRIBUTE_mercuryColor);
if (mercuryColor != null && mercuryColor.length() > 0)
{
thermometerPlot.setMercuryColor(JRColorUtil.getColor(mercuryColor, null));
}
return thermometerPlot;
}