Source code: jbreport/ReportSection.java
1 /*
2 * $Id: ReportSection.java,v 1.1.1.1 2000/08/31 13:14:23 grantfin Exp $
3 *
4 * jbReport - A reporting library for Java
5 * Copyright (C) 2000 Grant Finnemore <grantfin@users.sourceforge.net>
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21 package jbreport;
22
23 import java.io.PrintWriter;
24
25 /**
26 * This defines a logical group of elements inside a report.
27 *
28 * @author Grant Finnemore
29 * @version $Revision: 1.1.1.1 $
30 */
31 public
32 interface ReportSection extends ReportElement {
33
34 /** This constant is used to fetch an HTML renderer from the package */
35 public static final String HTMLRenderer = "html";
36
37 /**
38 * Add another renderer that will be used during traversal of the report.
39 *
40 * @param rendererType the rendering type to be used. For available types
41 * see the *Renderer constants in this interface.
42 * @param output the location to which the renderer should write its output.
43 */
44 public void addRenderer(String rendererType, PrintWriter output);
45
46 /**
47 * This will create a binding that will be used during report creation to
48 * substitute a variable with the given parameter.
49 */
50 public void setBoundParamValue(String paramName, String value);
51
52 /**
53 * Render the report using the given renderers.
54 */
55 public void render() throws ReportException;
56
57 /**
58 * Adds a header element to this element. Some element types might not allow
59 * children.
60 */
61 public void setHeader(ReportElement elem);
62
63 /**
64 * Returns the header element of this section.
65 */
66 public ReportElement getHeader();
67
68 /**
69 * Adds a body element to this element. Some element types might not allow
70 * children.
71 */
72 public void setBody(ReportElement elem);
73
74 /**
75 * Returns the body element of this section
76 */
77 public ReportElement getBody();
78
79 /**
80 * Adds a footer element to this element. Some element types might not allow
81 * children.
82 */
83 public void setFooter(ReportElement elem);
84
85 /**
86 * Returns the footer element of this section
87 */
88 public ReportElement getFooter();
89
90 }