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