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: * Renderer.java
027: * ------------
028: * (C) Copyright 2001-2007, by Object Refinery Ltd, Pentaho Corporation and Contributors.
029: */package org.jfree.report.layout;
030:
031: import org.jfree.report.Band;
032: import org.jfree.report.PageDefinition;
033: import org.jfree.report.function.ExpressionRuntime;
034: import org.jfree.report.layout.output.ContentProcessingException;
035: import org.jfree.report.layout.output.LayoutPagebreakHandler;
036: import org.jfree.report.layout.output.OutputProcessor;
037:
038: /**
039: * Creation-Date: 08.04.2007, 16:35:29
040: *
041: * @author Thomas Morgner
042: */
043: public interface Renderer extends Cloneable {
044: public static final int TYPE_NORMALFLOW = 0;
045: public static final int TYPE_HEADER = 1;
046: public static final int TYPE_FOOTER = 2;
047: public static final int TYPE_COLUMNS = 3;
048: public static final int TYPE_WATERMARK = 4;
049:
050: public OutputProcessor getOutputProcessor();
051:
052: public void startReport(final PageDefinition pageDefinition);
053:
054: public void startGroup(boolean keepTogether);
055:
056: public void startSection(int type);
057:
058: public void endSection();
059:
060: public void endGroup();
061:
062: public void endReport();
063:
064: public void add(Band band, ExpressionRuntime runtime,
065: final Object stateKey);
066:
067: public boolean validatePages() throws ContentProcessingException;
068:
069: public boolean processPage(final LayoutPagebreakHandler handler,
070: final Object commitMarker, final boolean performOutput)
071: throws ContentProcessingException;
072:
073: public void processIncrementalUpdate(final boolean performOutput)
074: throws ContentProcessingException;
075:
076: public int getPagebreaks();
077:
078: public boolean isOpen();
079:
080: public Object clone() throws CloneNotSupportedException;
081:
082: public Object getLastStateKey();
083:
084: public void addPagebreak(final Object stateKey);
085:
086: public boolean clearPendingPageStart(
087: final LayoutPagebreakHandler layoutPagebreakHandler);
088:
089: public boolean isPageStartPending();
090:
091: public Renderer deriveForStorage();
092:
093: public Renderer deriveForPagebreak();
094:
095: public boolean isValid();
096:
097: public void createRollbackInformation();
098:
099: public void applyRollbackInformation();
100:
101: public void rollback();
102:
103: public void setStateKey(Object stateKey);
104:
105: public void applyAutoCommit();
106: }
|