1 28 package net.sf.jasperreports.charts.xml; 29 30 import net.sf.jasperreports.charts.design.JRDesignValueDisplay; 31 import net.sf.jasperreports.engine.xml.JRBaseFactory; 32 import net.sf.jasperreports.engine.xml.JRXmlConstants; 33 34 import org.xml.sax.Attributes ; 35 36 37 41 public class JRValueDisplayFactory extends JRBaseFactory 42 { 43 private static final String ATTRIBUTE_color = "color"; 44 private static final String ATTRIBUTE_mask = "mask"; 45 46 49 public Object createObject(Attributes atts) 50 { 51 JRDesignValueDisplay valueDisplay = new JRDesignValueDisplay(null); 52 53 String color = atts.getValue(ATTRIBUTE_color); 54 if (color != null && color.length() > 0) 55 { 56 valueDisplay.setColor(JRXmlConstants.getColor(color, null)); 57 } 58 59 String mask = atts.getValue(ATTRIBUTE_mask); 60 if (mask != null && mask.length() > 0) 61 { 62 valueDisplay.setMask(mask); 63 } 64 65 return valueDisplay; 66 } 67 } 68 | Popular Tags |