KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > de > progra > charting > render > ChartRenderingHints


1 /*
2     JOpenChart Java Charting Library and Toolkit
3     Copyright (C) 2001 Sebastian Müller
4     http://jopenchart.sourceforge.net
5
6     This library is free software; you can redistribute it and/or
7     modify it under the terms of the GNU Lesser General Public
8     License as published by the Free Software Foundation; either
9     version 2.1 of the License, or (at your option) any later version.
10
11     This library is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14     Lesser General Public License for more details.
15
16     You should have received a copy of the GNU Lesser General Public
17     License along with this library; if not, write to the Free Software
18     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
20     ChartRenderingHints.java
21     Created on 21. Juni 2001, 12:17
22 */

23
24 package de.progra.charting.render;
25
26 import java.awt.*;
27
28 /**
29  * This class contains the set of rendering options for a renderer.
30  * It extends RenderingHints to provide specific rendering options
31  * for fonts, colors etc.
32  * @author mueller
33  * @version 1.0
34  */

35 public class ChartRenderingHints extends java.util.HashMap JavaDoc {
36
37     /** the key constant for the Title String
38      */

39     public final static Object JavaDoc TITLE_STRING_KEY = new Integer JavaDoc(1);
40     /** the key constant for the Title font
41      */

42     public final static Object JavaDoc TITLE_FONT_KEY = new Integer JavaDoc(2);
43     /** the key constant for the Legend font
44      */

45     public final static Object JavaDoc LEGEND_FONT_KEY = new Integer JavaDoc(3);
46     /** the key constant for the Legend's colorbox
47      */

48     public final static Object JavaDoc LEGEND_COLORBOX_KEY = new Integer JavaDoc(4);
49     /** the key constant for the Legend's RowColorModel
50      */

51     public final static Object JavaDoc LEGEND_ROWCOLORS_KEY = new Integer JavaDoc(5);
52     
53     /** Creates new ChartRenderingHints */
54     public ChartRenderingHints() {
55         super();
56         
57         // Default Title Properties
58
put(TITLE_STRING_KEY, "Diagramm Titel");
59         put(TITLE_FONT_KEY, new Font("Helvetica", Font.PLAIN, 22));
60         
61         // Default Legend Properties
62
put(LEGEND_FONT_KEY, new Font("Helvetica", Font.PLAIN, 14));
63         put(LEGEND_COLORBOX_KEY, new Rectangle(25, 15));
64     }
65 }
66
Popular Tags