1 28 package net.sf.jasperreports.engine.xml; 29 30 import net.sf.jasperreports.engine.design.JRDesignBreak; 31 import net.sf.jasperreports.engine.design.JasperDesign; 32 33 import org.xml.sax.Attributes ; 34 35 36 40 public class JRBreakFactory extends JRBaseFactory 41 { 42 43 44 47 private static final String ATTRIBUTE_type = "type"; 48 49 50 53 public Object createObject(Attributes atts) 54 { 55 JasperDesign jasperDesign = (JasperDesign)digester.peek(digester.getCount() - 2); 56 57 JRDesignBreak breakElement = new JRDesignBreak(jasperDesign); 58 59 Byte type = (Byte )JRXmlConstants.getBreakTypeMap().get(atts.getValue(ATTRIBUTE_type)); 60 if (type != null) 61 { 62 breakElement.setType(type.byteValue()); 63 } 64 65 return breakElement; 66 } 67 68 69 } 70 | Popular Tags |