001: /*
002: * ============================================================================
003: * GNU Lesser General Public License
004: * ============================================================================
005: *
006: * JasperReports - Free Java report-generating library.
007: * Copyright (C) 2001-2006 JasperSoft Corporation http://www.jaspersoft.com
008: *
009: * This library is free software; you can redistribute it and/or
010: * modify it under the terms of the GNU Lesser General Public
011: * License as published by the Free Software Foundation; either
012: * version 2.1 of the License, or (at your option) any later version.
013: *
014: * This library is distributed in the hope that it will be useful,
015: * but WITHOUT ANY WARRANTY; without even the implied warranty of
016: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
017: * Lesser General Public License for more details.
018: *
019: * You should have received a copy of the GNU Lesser General Public
020: * License along with this library; if not, write to the Free Software
021: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
022: *
023: * JasperSoft Corporation
024: * 303 Second Street, Suite 450 North
025: * San Francisco, CA 94107
026: * http://www.jaspersoft.com
027: */
028: package net.sf.jasperreports.engine.fill;
029:
030: import net.sf.jasperreports.engine.JRBand;
031: import net.sf.jasperreports.engine.JRExpression;
032: import net.sf.jasperreports.engine.JRGroup;
033: import net.sf.jasperreports.engine.JRVariable;
034:
035: /**
036: * @author Teodor Danciu (teodord@users.sourceforge.net)
037: * @version $Id: JRFillGroup.java 1501 2006-11-21 16:12:33Z teodord $
038: */
039: public class JRFillGroup implements JRGroup {
040:
041: /**
042: *
043: */
044: protected JRGroup parent = null;
045:
046: /**
047: *
048: */
049: private JRBand groupHeader = null;
050: private JRBand groupFooter = null;
051: private JRVariable countVariable = null;
052:
053: /**
054: *
055: */
056: private boolean hasChanged = true;
057: private boolean isTopLevelChange = false;
058: private boolean isHeaderPrinted = false;
059: private boolean isFooterPrinted = true;
060:
061: /**
062: *
063: */
064: public JRFillGroup(JRGroup group, JRFillObjectFactory factory) {
065: factory.put(group, this );
066:
067: parent = group;
068:
069: groupHeader = factory.getBand(group.getGroupHeader());
070: groupFooter = factory.getBand(group.getGroupFooter());
071: countVariable = factory.getVariable(group.getCountVariable());
072: }
073:
074: /**
075: *
076: */
077: public String getName() {
078: return parent.getName();
079: }
080:
081: /**
082: *
083: */
084: public JRExpression getExpression() {
085: return parent.getExpression();
086: }
087:
088: /**
089: *
090: */
091: public boolean isStartNewColumn() {
092: return parent.isStartNewColumn();
093: }
094:
095: /**
096: *
097: */
098: public void setStartNewColumn(boolean isStart) {
099: parent.setStartNewColumn(isStart);
100: }
101:
102: /**
103: *
104: */
105: public boolean isStartNewPage() {
106: return parent.isStartNewPage();
107: }
108:
109: /**
110: *
111: */
112: public void setStartNewPage(boolean isStart) {
113: parent.setStartNewPage(isStart);
114: }
115:
116: /**
117: *
118: */
119: public boolean isResetPageNumber() {
120: return parent.isResetPageNumber();
121: }
122:
123: /**
124: *
125: */
126: public void setResetPageNumber(boolean isReset) {
127: parent.setResetPageNumber(isReset);
128: }
129:
130: /**
131: *
132: */
133: public boolean isReprintHeaderOnEachPage() {
134: return parent.isReprintHeaderOnEachPage();
135: }
136:
137: /**
138: *
139: */
140: public void setReprintHeaderOnEachPage(boolean isReprint) {
141: }
142:
143: /**
144: *
145: */
146: public int getMinHeightToStartNewPage() {
147: return parent.getMinHeightToStartNewPage();
148: }
149:
150: /**
151: *
152: */
153: public void setMinHeightToStartNewPage(int minHeight) {
154: }
155:
156: /**
157: *
158: */
159: public JRBand getGroupHeader() {
160: return groupHeader;
161: }
162:
163: /**
164: *
165: */
166: public JRBand getGroupFooter() {
167: return groupFooter;
168: }
169:
170: /**
171: *
172: */
173: public JRVariable getCountVariable() {
174: return countVariable;
175: }
176:
177: /**
178: *
179: */
180: public boolean hasChanged() {
181: return hasChanged;
182: }
183:
184: /**
185: *
186: */
187: public void setHasChanged(boolean hasChanged) {
188: this .hasChanged = hasChanged;
189: }
190:
191: /**
192: *
193: */
194: public boolean isTopLevelChange() {
195: return isTopLevelChange;
196: }
197:
198: /**
199: *
200: */
201: public void setTopLevelChange(boolean isTopLevelChange) {
202: this .isTopLevelChange = isTopLevelChange;
203: }
204:
205: /**
206: *
207: */
208: public boolean isHeaderPrinted() {
209: return isHeaderPrinted;
210: }
211:
212: /**
213: *
214: */
215: public void setHeaderPrinted(boolean isHeaderPrinted) {
216: this .isHeaderPrinted = isHeaderPrinted;
217: }
218:
219: /**
220: *
221: */
222: public boolean isFooterPrinted() {
223: return isFooterPrinted;
224: }
225:
226: /**
227: *
228: */
229: public void setFooterPrinted(boolean isFooterPrinted) {
230: this.isFooterPrinted = isFooterPrinted;
231: }
232:
233: }
|