1 28 package net.sf.jasperreports.engine.base; 29 30 import java.io.Serializable ; 31 32 import net.sf.jasperreports.engine.JRBand; 33 import net.sf.jasperreports.engine.JRConstants; 34 import net.sf.jasperreports.engine.JRExpression; 35 import net.sf.jasperreports.engine.JRGroup; 36 import net.sf.jasperreports.engine.JRVariable; 37 38 39 43 public class JRBaseGroup implements JRGroup, Serializable 44 { 45 46 47 50 private static final long serialVersionUID = JRConstants.SERIAL_VERSION_UID; 51 52 55 protected String name = null; 56 protected boolean isStartNewColumn = false; 57 protected boolean isStartNewPage = false; 58 protected boolean isResetPageNumber = false; 59 protected boolean isReprintHeaderOnEachPage = false; 60 protected int minHeightToStartNewPage = 0; 61 62 65 protected JRExpression expression = null; 66 protected JRBand groupHeader = null; 67 protected JRBand groupFooter = null; 68 protected JRVariable countVariable = null; 69 70 71 74 protected JRBaseGroup() 75 { 76 } 77 78 79 82 protected JRBaseGroup(JRGroup group, JRBaseObjectFactory factory) 83 { 84 factory.put(group, this); 85 86 name = group.getName(); 87 isStartNewColumn = group.isStartNewColumn(); 88 isStartNewPage = group.isStartNewPage(); 89 isResetPageNumber = group.isResetPageNumber(); 90 isReprintHeaderOnEachPage = group.isReprintHeaderOnEachPage(); 91 minHeightToStartNewPage = group.getMinHeightToStartNewPage(); 92 93 expression = factory.getExpression(group.getExpression()); 94 95 groupHeader = factory.getBand(group.getGroupHeader()); 96 groupFooter = factory.getBand(group.getGroupFooter()); 97 countVariable = factory.getVariable(group.getCountVariable()); 98 } 99 100 101 104 public String getName() 105 { 106 return this.name; 107 } 108 109 112 public boolean isStartNewColumn() 113 { 114 return this.isStartNewColumn; 115 } 116 117 120 public void setStartNewColumn(boolean isStart) 121 { 122 this.isStartNewColumn = isStart; 123 } 124 125 128 public boolean isStartNewPage() 129 { 130 return this.isStartNewPage; 131 } 132 133 136 public void setStartNewPage(boolean isStart) 137 { 138 this.isStartNewPage = isStart; 139 } 140 141 144 public boolean isResetPageNumber() 145 { 146 return this.isResetPageNumber; 147 } 148 149 152 public void setResetPageNumber(boolean isReset) 153 { 154 this.isResetPageNumber = isReset; 155 } 156 157 160 public boolean isReprintHeaderOnEachPage() 161 { 162 return this.isReprintHeaderOnEachPage; 163 } 164 165 168 public void setReprintHeaderOnEachPage(boolean isReprint) 169 { 170 this.isReprintHeaderOnEachPage = isReprint; 171 } 172 173 176 public int getMinHeightToStartNewPage() 177 { 178 return this.minHeightToStartNewPage; 179 } 180 181 184 public void setMinHeightToStartNewPage(int minHeight) 185 { 186 this.minHeightToStartNewPage = minHeight; 187 } 188 189 192 public JRExpression getExpression() 193 { 194 return this.expression; 195 } 196 197 200 public JRBand getGroupHeader() 201 { 202 return this.groupHeader; 203 } 204 205 208 public JRBand getGroupFooter() 209 { 210 return this.groupFooter; 211 } 212 213 216 public JRVariable getCountVariable() 217 { 218 return this.countVariable; 219 } 220 221 222 } 223 | Popular Tags |