001: /**
002: * ===========================================
003: * JFreeReport : a free Java reporting library
004: * ===========================================
005: *
006: * Project Info: http://reporting.pentaho.org/
007: *
008: * (C) Copyright 2001-2007, by Object Refinery Ltd, Pentaho Corporation and Contributors.
009: *
010: * This library is free software; you can redistribute it and/or modify it under the terms
011: * of the GNU Lesser General Public License as published by the Free Software Foundation;
012: * either 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, but WITHOUT ANY WARRANTY;
015: * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
016: * See the GNU Lesser General Public License for more details.
017: *
018: * You should have received a copy of the GNU Lesser General Public License along with this
019: * library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
020: * Boston, MA 02111-1307, USA.
021: *
022: * [Java is a trademark or registered trademark of Sun Microsystems, Inc.
023: * in the United States and other countries.]
024: *
025: * ------------
026: * ReportState.java
027: * ------------
028: * (C) Copyright 2001-2007, by Object Refinery Ltd, Pentaho Corporation and Contributors.
029: */package org.jfree.report.states;
030:
031: import org.jfree.report.DataRow;
032: import org.jfree.report.ReportDefinition;
033: import org.jfree.report.SubReport;
034: import org.jfree.report.states.datarow.DefaultFlowController;
035: import org.jfree.report.util.ReportProperties;
036:
037: /**
038: * Creation-Date: 03.07.2007, 13:18:11
039: *
040: * @author Thomas Morgner
041: */
042: public interface ReportState extends Cloneable {
043: /**
044: * A row number that is 'before' the first row.
045: */
046: public static final int BEFORE_FIRST_ROW = -1;
047: /**
048: * A group number that is 'before' the first group.
049: */
050: public static final int BEFORE_FIRST_GROUP = -1;
051: /**
052: * The first page.
053: */
054: public static final int BEFORE_FIRST_PAGE = 0;
055:
056: ReportProperties getReportProperties();
057:
058: int getCurrentSubReport();
059:
060: int getNumberOfRows();
061:
062: DataRow getDataRow();
063:
064: ReportDefinition getReport();
065:
066: int getCurrentDataItem();
067:
068: int getCurrentGroupIndex();
069:
070: Object getProperty(String key);
071:
072: Object getProperty(String key, Object def);
073:
074: void setProperty(String key, Object o);
075:
076: ReportProperties getProperties();
077:
078: boolean isPrepareRun();
079:
080: boolean isFinish();
081:
082: int getLevel();
083:
084: int getProgressLevel();
085:
086: int getProgressLevelCount();
087:
088: /**
089: * Returns the unique event code for this report state type.
090: *
091: * @return the event code for this state type.
092: */
093: int getEventCode();
094:
095: public Object clone() throws CloneNotSupportedException;
096:
097: public DefaultFlowController getFlowController();
098:
099: public boolean isDeepTraversing();
100:
101: public int getCurrentPage();
102:
103: public void setCurrentPage(int page);
104:
105: public void setErrorHandler(
106: ReportProcessingErrorHandler errorHandler);
107:
108: public ReportProcessingErrorHandler getErrorHandler();
109:
110: LayoutProcess getLayoutProcess();
111:
112: public void firePageFinishedEvent();
113:
114: public void firePageStartedEvent(final int eventCode);
115:
116: public ReportState getParentSubReportState();
117:
118: public ReportStateKey getProcessKey();
119:
120: public SubReport[] getSubReports();
121:
122: }
|