KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > jasperreports > engine > export > JRHtmlExporterParameter


1 /*
2  * ============================================================================
3  * GNU Lesser General Public License
4  * ============================================================================
5  *
6  * JasperReports - Free Java report-generating library.
7  * Copyright (C) 2001-2006 JasperSoft Corporation http://www.jaspersoft.com
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
22  *
23  * JasperSoft Corporation
24  * 303 Second Street, Suite 450 North
25  * San Francisco, CA 94107
26  * http://www.jaspersoft.com
27  */

28 package net.sf.jasperreports.engine.export;
29
30 import net.sf.jasperreports.engine.JRExporterParameter;
31
32
33 /**
34  * Contains parameters useful for export in HTML format.
35  * <p>
36  * The HTML exporter can send data to a string buffer, output stream, character stream or file on disk. The engine looks
37  * among the export parameters in order to find the selected output type in this order: OUTPUT_STRING_BUFFER, OUTPUT_WRITER,
38  * OUTPUT_STREAM, OUTPUT_FILE, OUTPUT_FILE_NAME.
39  * <p>
40  * An important issue is images. The HTML format stores images as separate files, so the exporter needs to know
41  * where these images will be stored. If they are stored on disk, the IMAGES_URI parameter will be initialized with a string
42  * containing the file name on disk. If they remain in memory, IMAGES_URI must point to a resource that is able to send the images
43  * to the browser (such as an image servlet, as shown in the <i>webapp</i> example).
44  *
45  * @author Teodor Danciu (teodord@users.sourceforge.net)
46  * @version $Id: JRHtmlExporterParameter.java 1355 2006-08-04 17:31:54 +0300 (Fri, 04 Aug 2006) lucianc $
47  */

48 public class JRHtmlExporterParameter extends JRExporterParameter
49 {
50
51
52     /**
53      *
54      */

55     protected JRHtmlExporterParameter(String JavaDoc name)
56     {
57         super(name);
58     }
59
60
61     /**
62      * A map containing all the images that were used for generating the report. The JasperReports engine stores all the
63      * images in this map, and uses the map keys for referencing images throughout the export process.
64      */

65     public static final JRHtmlExporterParameter IMAGES_MAP = new JRHtmlExporterParameter("Images Map Object");
66
67
68     /**
69      * A <tt>java.io.File</tt> instance representing an absolute path to a folder on a local disk, where all the images are stored.
70      */

71     public static final JRHtmlExporterParameter IMAGES_DIR = new JRHtmlExporterParameter("Images Directory");
72
73
74     /**
75      * An absolute path to a folder on a local disk, where all the images are stored. This is an alternative to IMAGES_DIR
76      */

77     public static final JRHtmlExporterParameter IMAGES_DIR_NAME = new JRHtmlExporterParameter("Images Directory Name");
78
79
80     /**
81      * A boolean value specifying whether the images should be stored on disk. The default value is true. If this parameter is
82      * specified, IMAGES_DIR or IMAGES_DIR_NAME must also be specified and point to a valid directory.
83      */

84     public static final JRHtmlExporterParameter IS_OUTPUT_IMAGES_TO_DIR = new JRHtmlExporterParameter("Is Output Images to Directory Flag");
85
86
87     /**
88      * An URI to the folder where all the images are stored. It could also point to a different resource, such as an image servlet.
89      * It is used in the generated HTML to point to the actual location of the image in the <img> tag (as a file on disk or a
90      * web resource).
91      */

92     public static final JRHtmlExporterParameter IMAGES_URI = new JRHtmlExporterParameter("Images URI");
93
94
95     /**
96      * A string representing HTML code that will be inserted in front of the generated report. The JasperReports engine places
97      * a piece of HTML code at the top of the page but users can define their own headers and stylesheet links.
98      */

99     public static final JRHtmlExporterParameter HTML_HEADER = new JRHtmlExporterParameter("HTML Header");
100
101
102     /**
103      * A string representing HTML code that will be inserted between pages of the generated report. By default, JasperReports
104      * separates pages by two empty lines, but this behaviour can be overriden by this parameter.
105      */

106     public static final JRHtmlExporterParameter BETWEEN_PAGES_HTML = new JRHtmlExporterParameter("Between Pages HTML");
107
108
109     /**
110      * A string representing HTML code that will be inserted after the generated report. By default, JasperReports closes
111      * the usual HTML tags that were opened in HTML_HEADER. If the default HTML_HEADER was overriden, it is recommended that
112      * this parameter is overriden too, in order to ensure proper construction of HTML page.
113      */

114     public static final JRHtmlExporterParameter HTML_FOOTER = new JRHtmlExporterParameter("HTML Footer");
115
116
117
118     /**
119      * A boolean value specifying whether the blank lines, that sometimes appear between rows, should be deleted. Sometimes page
120      * break occurs before the entire page is filled with data (i.e. having a group with the <i>isStartNewPage</i> attribute set to true).
121      * All the remaining empty space could be removed by setting this parameter to true.
122      */

123     public static final JRHtmlExporterParameter IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS = new JRHtmlExporterParameter("Is Remove Empty Space Between Rows");
124
125
126     /**
127      * A boolean value specifying whether the report background should be white. If this parameter is not set, the default
128      * background will appear, depending on the selected CSS styles.
129      */

130     public static final JRHtmlExporterParameter IS_WHITE_PAGE_BACKGROUND = new JRHtmlExporterParameter("Is White Page Background");
131
132
133     /**
134      * A boolean value specifying whether the export engine should use small images for aligning. This is useful when you don't have
135      * images in your report anyway and you don't want to have to handle images at all.
136      */

137     public static final JRHtmlExporterParameter IS_USING_IMAGES_TO_ALIGN = new JRHtmlExporterParameter("Is Using Images To Align");
138
139
140     /**
141      * A boolean value specifying whether the export engine should use force wrapping by breaking words (CSS <code>word-wrap: break-word</code>).
142      */

143     public static final JRHtmlExporterParameter IS_WRAP_BREAK_WORD = new JRHtmlExporterParameter("Is Wrap Break Word");
144
145
146     /**
147      * A String value specifying the unit to use when measuring lengths or font size.
148      * This can be one of the supported size units from the CSS specifications like "px" for pixels
149      * or "pt" for points. The default value is "px", meaning that lengths and font sizes are specified in pixels.
150      */

151     public static final JRHtmlExporterParameter SIZE_UNIT = new JRHtmlExporterParameter("Size Unit");
152
153     /**
154      * Possible value for the {@link JRHtmlExporterParameter#SIZE_UNIT} parameter indicated that measurements are made in pixels.
155      */

156     public static final String JavaDoc SIZE_UNIT_PIXEL = "px";
157
158     /**
159      * Possible value for the {@link JRHtmlExporterParameter#SIZE_UNIT} parameter indicated that measurements are made in points.
160      */

161     public static final String JavaDoc SIZE_UNIT_POINT = "pt";
162
163     
164     /**
165      * A {@link JRHyperlinkProducerFactory JRHyperlinkProducerFactory} which should be used for custom
166      * hyperlink types during export.
167      */

168     public static final JRHtmlExporterParameter HYPERLINK_PRODUCER_FACTORY = new JRHtmlExporterParameter("Hyperlink producer factory");
169
170 }
171
Popular Tags