1 28 package net.sf.jasperreports.engine.xml; 29 30 import net.sf.jasperreports.engine.design.JRDesignField; 31 32 import org.xml.sax.Attributes ; 33 34 35 39 public class JRFieldFactory extends JRBaseFactory 40 { 41 42 43 46 private static final String ATTRIBUTE_name = "name"; 47 private static final String ATTRIBUTE_class = "class"; 48 49 50 53 public Object createObject(Attributes atts) 54 { 55 JRDesignField field = new JRDesignField(); 56 57 field.setName(atts.getValue(ATTRIBUTE_name)); 58 59 if (atts.getValue(ATTRIBUTE_class) != null) 60 { 61 field.setValueClassName(atts.getValue(ATTRIBUTE_class)); 62 } 63 64 return field; 65 } 66 67 68 } 69 | Popular Tags |