KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > it > businesslogic > ireport > Group


1 /*
2  * Copyright (C) 2005 - 2006 JasperSoft Corporation. All rights reserved.
3  * http://www.jaspersoft.com.
4  *
5  * Unless you have purchased a commercial license agreement from JasperSoft,
6  * the following license terms apply:
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License version 2 as published by
10  * the Free Software Foundation.
11  *
12  * This program is distributed WITHOUT ANY WARRANTY; and without the
13  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14  * See the GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, see http://www.gnu.org/licenses/gpl.txt
18  * or write to:
19  *
20  * Free Software Foundation, Inc.,
21  * 59 Temple Place - Suite 330,
22  * Boston, MA USA 02111-1307
23  *
24  *
25  *
26  *
27  * Group.java
28  *
29  */

30
31 package it.businesslogic.ireport;
32
33 public class Group
34 {
35     private SubDataset parent;
36     private String JavaDoc name;
37     private String JavaDoc groupExpression = "";
38     private boolean isStartNewColumn=false;
39     private boolean isStartNewPage=false;
40     private boolean isResetPageNumber=false;
41     private boolean isReprintHeaderOnEachPage=false;
42     private int minHeightToStartNewPage=0;
43     
44     private Band groupHeader=null;
45     private Band groupFooter=null;
46
47     public Group(SubDataset parent, String JavaDoc name)
48     {
49         this(parent, name, 0, 0);
50     }
51     
52     public Group(SubDataset parent, String JavaDoc name, int headerHeight, int footerHeight)
53     {
54         this.parent = parent;
55         this.name = name;
56                 if (parent instanceof Report)
57                 {
58                     groupFooter = new Band((Report)parent, name+"Footer", headerHeight);
59                     groupHeader = new Band((Report)parent, name+"Header", footerHeight);
60                 }
61     }
62         
63         /** Getter for property groupExpression.
64          * @return Value of property groupExpression.
65          *
66          */

67         public java.lang.String JavaDoc getGroupExpression() {
68             return groupExpression;
69         }
70         
71         /** Setter for property groupExpression.
72          * @param groupExpression New value of property groupExpression.
73          *
74          */

75         public void setGroupExpression(java.lang.String JavaDoc groupExpression) {
76             this.groupExpression = groupExpression;
77         }
78         
79         /** Getter for property groupFooter.
80          * @return Value of property groupFooter.
81          *
82          */

83         public it.businesslogic.ireport.Band getGroupFooter() {
84             return groupFooter;
85         }
86         
87         /** Setter for property groupFooter.
88          * @param groupFooter New value of property groupFooter.
89          *
90          */

91         public void setGroupFooter(it.businesslogic.ireport.Band groupFooter) {
92             this.groupFooter = groupFooter;
93         }
94         
95         /** Getter for property groupHeader.
96          * @return Value of property groupHeader.
97          *
98          */

99         public it.businesslogic.ireport.Band getGroupHeader() {
100             return groupHeader;
101         }
102         
103         /** Setter for property groupHeader.
104          * @param groupHeader New value of property groupHeader.
105          *
106          */

107         public void setGroupHeader(it.businesslogic.ireport.Band groupHeader) {
108             this.groupHeader = groupHeader;
109         }
110         
111         /** Getter for property isReprintHeaderOnEachPage.
112          * @return Value of property isReprintHeaderOnEachPage.
113          *
114          */

115         public boolean isIsReprintHeaderOnEachPage() {
116             return isReprintHeaderOnEachPage;
117         }
118         
119         /** Setter for property isReprintHeaderOnEachPage.
120          * @param isReprintHeaderOnEachPage New value of property isReprintHeaderOnEachPage.
121          *
122          */

123         public void setIsReprintHeaderOnEachPage(boolean isReprintHeaderOnEachPage) {
124             this.isReprintHeaderOnEachPage = isReprintHeaderOnEachPage;
125         }
126         
127         /** Getter for property isResetPageNumber.
128          * @return Value of property isResetPageNumber.
129          *
130          */

131         public boolean isIsResetPageNumber() {
132             return isResetPageNumber;
133         }
134         
135         /** Setter for property isResetPageNumber.
136          * @param isResetPageNumber New value of property isResetPageNumber.
137          *
138          */

139         public void setIsResetPageNumber(boolean isResetPageNumber) {
140             this.isResetPageNumber = isResetPageNumber;
141         }
142         
143         /** Getter for property isStartNewColumn.
144          * @return Value of property isStartNewColumn.
145          *
146          */

147         public boolean isIsStartNewColumn() {
148             return isStartNewColumn;
149         }
150         
151         /** Setter for property isStartNewColumn.
152          * @param isStartNewColumn New value of property isStartNewColumn.
153          *
154          */

155         public void setIsStartNewColumn(boolean isStartNewColumn) {
156             this.isStartNewColumn = isStartNewColumn;
157         }
158         
159         /** Getter for property isStartNewPage.
160          * @return Value of property isStartNewPage.
161          *
162          */

163         public boolean isIsStartNewPage() {
164             return isStartNewPage;
165         }
166         
167         /** Setter for property isStartNewPage.
168          * @param isStartNewPage New value of property isStartNewPage.
169          *
170          */

171         public void setIsStartNewPage(boolean isStartNewPage) {
172             this.isStartNewPage = isStartNewPage;
173         }
174         
175         /** Getter for property minHeightToStartNewPage.
176          * @return Value of property minHeightToStartNewPage.
177          *
178          */

179         public int getMinHeightToStartNewPage() {
180             return minHeightToStartNewPage;
181         }
182         
183         /** Setter for property minHeightToStartNewPage.
184          * @param minHeightToStartNewPage New value of property minHeightToStartNewPage.
185          *
186          */

187         public void setMinHeightToStartNewPage(int minHeightToStartNewPage) {
188             this.minHeightToStartNewPage = minHeightToStartNewPage;
189         }
190         
191         /** Getter for property name.
192          * @return Value of property name.
193          *
194          */

195         public java.lang.String JavaDoc getName() {
196             return name;
197         }
198         
199         /** Setter for property name.
200          * @param name New value of property name.
201          *
202          */

203         public void setName(java.lang.String JavaDoc name) {
204             this.name = name;
205         }
206         
207         /** Getter for property parent.
208          * @return Value of property parent.
209          *
210          */

211         public it.businesslogic.ireport.SubDataset getParent() {
212             return parent;
213         }
214         
215         public String JavaDoc toString()
216         {
217             return this.getName();
218         }
219 }
220
Popular Tags