comparison flys-artifacts/src/main/java/de/intevation/flys/exports/ChartExportHelper.java @ 3270:4ac581062c40

Fix various documentation issues. flys-artifacts/trunk@4913 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Tue, 10 Jul 2012 12:19:35 +0000
parents 5648b5b34ae2
children d9af29a4bb85
comparison
equal deleted inserted replaced
3269:b2ea89a665bc 3270:4ac581062c40
88 * <code>OutputStream</code> with a given format, width and height. 88 * <code>OutputStream</code> with a given format, width and height.
89 * 89 *
90 * @param out OutputStream 90 * @param out OutputStream
91 * @param chart JFreeChart object to be exported. 91 * @param chart JFreeChart object to be exported.
92 * @param format Format (e.g. png, gif, jpg) 92 * @param format Format (e.g. png, gif, jpg)
93 * @param width Width, the image used to be 93 * @param cc context, in which e.g. size is stored.
94 * @param height Height, the image used to be
95 * 94 *
96 * @throws IOException if writing image to OutputStream failed. 95 * @throws IOException if writing image to OutputStream failed.
97 */ 96 */
98 public static void exportImage( 97 public static void exportImage(
99 OutputStream out, 98 OutputStream out,
166 * A method to export a <code>JFreeChart</code> as PDF to an 165 * A method to export a <code>JFreeChart</code> as PDF to an
167 * <code>OutputStream</code>. 166 * <code>OutputStream</code>.
168 * 167 *
169 * @param out OutputStream 168 * @param out OutputStream
170 * @param chart JFreeChart 169 * @param chart JFreeChart
171 * @param pageFormat String to specify a page format, {@link
172 * #DEFAULT_PAGE_SIZE} is used if no pageFormat is given
173 * @param landscape If this is true, the pdf is delivered in landscape
174 * format
175 * @param marginLeft Space to left border
176 * @param marginRight Space to right border
177 * @param marginTop Space to upper border
178 * @param marginBottom Space to lower border
179 */ 170 */
180 public static void exportPDF( 171 public static void exportPDF(
181 OutputStream out, 172 OutputStream out,
182 JFreeChart chart, 173 JFreeChart chart,
183 CallContext cc 174 CallContext cc
187 String pageFormat = (String) cc.getContextValue("chart.page.format"); 178 String pageFormat = (String) cc.getContextValue("chart.page.format");
188 179
189 if (pageFormat == null) 180 if (pageFormat == null)
190 pageFormat = DEFAULT_PAGE_SIZE; 181 pageFormat = DEFAULT_PAGE_SIZE;
191 182
192 // max size of the chart 183 // Max size of the chart.
193 Rectangle page = PageSize.getRectangle(pageFormat); 184 Rectangle page = PageSize.getRectangle(pageFormat);
194 float pageWidth = page.getWidth(); 185 float pageWidth = page.getWidth();
195 float pageHeight = page.getHeight(); 186 float pageHeight = page.getHeight();
196 187
197 // the chart width 188 // The chart width.
198 int[] size = getSize(cc); 189 int[] size = getSize(cc);
199 190
200 boolean landscape = size[0] > size[1]; 191 boolean landscape = size[0] > size[1];
201 192
202 float width = 0; 193 float width = 0;

http://dive4elements.wald.intevation.org