1 28 package net.sf.jasperreports.engine.base; 29 30 import java.io.IOException ; 31 32 import net.sf.jasperreports.engine.JRAbstractObjectFactory; 33 import net.sf.jasperreports.engine.JRBreak; 34 import net.sf.jasperreports.engine.JRChild; 35 import net.sf.jasperreports.engine.JRConstants; 36 import net.sf.jasperreports.engine.JRExpressionCollector; 37 import net.sf.jasperreports.engine.xml.JRXmlWriter; 38 39 40 45 public class JRBaseBreak extends JRBaseElement implements JRBreak 46 { 47 48 49 52 private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID; 53 54 57 protected byte type = TYPE_PAGE; 58 59 60 68 protected JRBaseBreak(JRBreak breakElement, JRBaseObjectFactory factory) 69 { 70 super(breakElement, factory); 71 72 type = breakElement.getType(); 73 } 74 75 76 79 public int getX() 80 { 81 return 0; 82 } 83 84 87 public int getHeight() 88 { 89 return 1; 90 } 91 92 95 public byte getType() 96 { 97 return type; 98 } 99 100 103 public void setType(byte type) 104 { 105 this.type = type; 106 } 107 108 111 public JRChild getCopy(JRAbstractObjectFactory factory) 112 { 113 return factory.getBreak(this); 114 } 115 116 119 public void collectExpressions(JRExpressionCollector collector) 120 { 121 collector.collect(this); 122 } 123 124 127 public void writeXml(JRXmlWriter xmlWriter) throws IOException 128 { 129 xmlWriter.writeBreak(this); 130 } 131 132 133 } 134 | Popular Tags |