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;
029:
030: /**
031: * Groups represent a flexible way to organize data on a report. A report group is represented by sequence
032: * of consecutive records in the data source that have something in common, like the value of a certain report
033: * field for example.
034: * <p>
035: * The value of the associated group expression is what makes group records stick together. This value is the
036: * thing that they have in common.
037: * @author Teodor Danciu (teodord@users.sourceforge.net)
038: * @version $Id: JRGroup.java 1229 2006-04-19 10:27:35Z teodord $
039: */
040: public interface JRGroup {
041:
042: /**
043: * Gets the group name
044: */
045: public String getName();
046:
047: /**
048: * Gets the flag that signals if the group header should be printed always on a new column.
049: */
050: public boolean isStartNewColumn();
051:
052: /**
053: * Sets the flag that signals if the group header should be printed always on a new column.
054: */
055: public void setStartNewColumn(boolean isStart);
056:
057: /**
058: * Gets the flag that signals if the group header should be printed always on a new page.
059: */
060: public boolean isStartNewPage();
061:
062: /**
063: * Sets the flag that signals if the group header should be printed always on a new page.
064: */
065: public void setStartNewPage(boolean isStart);
066:
067: /**
068: * Gets the flag that signals if the group header should be printed always on a new page, along with the
069: * re-initialization of the page number.
070: */
071: public boolean isResetPageNumber();
072:
073: /**
074: * Sets the flag that signals if the group header should be printed always on a new page, along with the
075: * re-initialization of the page number.
076: */
077: public void setResetPageNumber(boolean isReset);
078:
079: /**
080: * Gets the flag that signals if the group header should be reprinted at the beginning of each page.
081: */
082: public boolean isReprintHeaderOnEachPage();
083:
084: /**
085: * Sets the flag that signals if the group header should be reprinted at the beginning of each page.
086: */
087: public void setReprintHeaderOnEachPage(boolean isReprint);
088:
089: /**
090: * Gets the minimum amount of vertical space needed at the bottom of the column in order to place the
091: * group header on the current column.
092: */
093: public int getMinHeightToStartNewPage();
094:
095: /**
096: * Gets the minimum amount of vertical space needed at the bottom of the column in order to place the
097: * group header on the current column.
098: */
099: public void setMinHeightToStartNewPage(int minHeight);
100:
101: /**
102: * Gets the expression that defines what records in the group have in common.
103: */
104: public JRExpression getExpression();
105:
106: /**
107: * Gets the header band created for this group.
108: */
109: public JRBand getGroupHeader();
110:
111: /**
112: * Gets the footer band created for this group.
113: */
114: public JRBand getGroupFooter();
115:
116: /**
117: *
118: */
119: public JRVariable getCountVariable();
120:
121: }
|