KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > jasperreports > engine > fill > JRFillGroup


1 /*
2  * ============================================================================
3  * GNU Lesser General Public License
4  * ============================================================================
5  *
6  * JasperReports - Free Java report-generating library.
7  * Copyright (C) 2001-2006 JasperSoft Corporation http://www.jaspersoft.com
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
22  *
23  * JasperSoft Corporation
24  * 303 Second Street, Suite 450 North
25  * San Francisco, CA 94107
26  * http://www.jaspersoft.com
27  */

28 package net.sf.jasperreports.engine.fill;
29
30 import net.sf.jasperreports.engine.JRBand;
31 import net.sf.jasperreports.engine.JRExpression;
32 import net.sf.jasperreports.engine.JRGroup;
33 import net.sf.jasperreports.engine.JRVariable;
34
35
36 /**
37  * @author Teodor Danciu (teodord@users.sourceforge.net)
38  * @version $Id: JRFillGroup.java 1501 2006-11-21 18:12:33 +0200 (Tue, 21 Nov 2006) teodord $
39  */

40 public class JRFillGroup implements JRGroup
41 {
42
43
44     /**
45      *
46      */

47     protected JRGroup parent = null;
48
49     /**
50      *
51      */

52     private JRBand groupHeader = null;
53     private JRBand groupFooter = null;
54     private JRVariable countVariable = null;
55
56     /**
57      *
58      */

59     private boolean hasChanged = true;
60     private boolean isTopLevelChange = false;
61     private boolean isHeaderPrinted = false;
62     private boolean isFooterPrinted = true;
63     
64
65     /**
66      *
67      */

68     public JRFillGroup(
69         JRGroup group,
70         JRFillObjectFactory factory
71         )
72     {
73         factory.put(group, this);
74
75         parent = group;
76
77         groupHeader = factory.getBand(group.getGroupHeader());
78         groupFooter = factory.getBand(group.getGroupFooter());
79         countVariable = factory.getVariable(group.getCountVariable());
80     }
81
82
83     /**
84      *
85      */

86     public String JavaDoc getName()
87     {
88         return parent.getName();
89     }
90     
91     /**
92      *
93      */

94     public JRExpression getExpression()
95     {
96         return parent.getExpression();
97     }
98         
99     /**
100      *
101      */

102     public boolean isStartNewColumn()
103     {
104         return parent.isStartNewColumn();
105     }
106         
107     /**
108      *
109      */

110     public void setStartNewColumn(boolean isStart)
111     {
112         parent.setStartNewColumn(isStart);
113     }
114         
115     /**
116      *
117      */

118     public boolean isStartNewPage()
119     {
120         return parent.isStartNewPage();
121     }
122         
123     /**
124      *
125      */

126     public void setStartNewPage(boolean isStart)
127     {
128         parent.setStartNewPage(isStart);
129     }
130         
131     /**
132      *
133      */

134     public boolean isResetPageNumber()
135     {
136         return parent.isResetPageNumber();
137     }
138         
139     /**
140      *
141      */

142     public void setResetPageNumber(boolean isReset)
143     {
144         parent.setResetPageNumber(isReset);
145     }
146         
147     /**
148      *
149      */

150     public boolean isReprintHeaderOnEachPage()
151     {
152         return parent.isReprintHeaderOnEachPage();
153     }
154         
155     /**
156      *
157      */

158     public void setReprintHeaderOnEachPage(boolean isReprint)
159     {
160     }
161         
162     /**
163      *
164      */

165     public int getMinHeightToStartNewPage()
166     {
167         return parent.getMinHeightToStartNewPage();
168     }
169         
170     /**
171      *
172      */

173     public void setMinHeightToStartNewPage(int minHeight)
174     {
175     }
176         
177     /**
178      *
179      */

180     public JRBand getGroupHeader()
181     {
182         return groupHeader;
183     }
184         
185     /**
186      *
187      */

188     public JRBand getGroupFooter()
189     {
190         return groupFooter;
191     }
192         
193     /**
194      *
195      */

196     public JRVariable getCountVariable()
197     {
198         return countVariable;
199     }
200     
201     /**
202      *
203      */

204     public boolean hasChanged()
205     {
206         return hasChanged;
207     }
208         
209     /**
210      *
211      */

212     public void setHasChanged(boolean hasChanged)
213     {
214         this.hasChanged = hasChanged;
215     }
216
217     /**
218      *
219      */

220     public boolean isTopLevelChange()
221     {
222         return isTopLevelChange;
223     }
224         
225     /**
226      *
227      */

228     public void setTopLevelChange(boolean isTopLevelChange)
229     {
230         this.isTopLevelChange = isTopLevelChange;
231     }
232
233     /**
234      *
235      */

236     public boolean isHeaderPrinted()
237     {
238         return isHeaderPrinted;
239     }
240             
241     /**
242      *
243      */

244     public void setHeaderPrinted(boolean isHeaderPrinted)
245     {
246         this.isHeaderPrinted = isHeaderPrinted;
247     }
248
249     /**
250      *
251      */

252     public boolean isFooterPrinted()
253     {
254         return isFooterPrinted;
255     }
256         
257     /**
258      *
259      */

260     public void setFooterPrinted(boolean isFooterPrinted)
261     {
262         this.isFooterPrinted = isFooterPrinted;
263     }
264
265
266 }
267
Popular Tags