KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > jasperreports > engine > JRChart


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;
29
30 import java.awt.Color JavaDoc;
31
32
33 /**
34  * Implementations of this interface can be used for rendering chart components. Data obtained from the report
35  * datasource can be also displayed in a chart, embedded in the report. There are a lot of chart types, each with
36  * its own dataset and characteristics. This interface only defines the common properties.
37  * @author Teodor Danciu (teodord@users.sourceforge.net)
38  * @version $Id: JRChart.java 1393 2006-09-06 01:04:21 +0300 (Wed, 06 Sep 2006) bklawans $
39  */

40 public interface JRChart extends JRElement, JRAnchor, JRHyperlink, JRBox
41 {
42
43
44     /**
45      *
46      */

47     public static final byte TITLE_POSITION_TOP = 1;
48     public static final byte TITLE_POSITION_BOTTOM = 2;
49     public static final byte TITLE_POSITION_LEFT = 3;
50     public static final byte TITLE_POSITION_RIGHT = 4;
51
52
53     /**
54      *
55      */

56     public static final byte CHART_TYPE_AREA = 1;
57     public static final byte CHART_TYPE_BAR3D = 2;
58     public static final byte CHART_TYPE_BAR = 3;
59     public static final byte CHART_TYPE_BUBBLE = 4;
60     public static final byte CHART_TYPE_CANDLESTICK = 5;
61     public static final byte CHART_TYPE_HIGHLOW = 6;
62     public static final byte CHART_TYPE_LINE = 7;
63     public static final byte CHART_TYPE_PIE3D = 8;
64     public static final byte CHART_TYPE_PIE = 9;
65     public static final byte CHART_TYPE_SCATTER = 10;
66     public static final byte CHART_TYPE_STACKEDBAR3D = 11;
67     public static final byte CHART_TYPE_STACKEDBAR = 12;
68     public static final byte CHART_TYPE_XYAREA = 13;
69     public static final byte CHART_TYPE_XYBAR = 14;
70     public static final byte CHART_TYPE_XYLINE = 15;
71     public static final byte CHART_TYPE_TIMESERIES = 16;
72     public static final byte CHART_TYPE_METER = 17;
73     public static final byte CHART_TYPE_THERMOMETER = 18;
74     public static final byte CHART_TYPE_MULTI_AXIS = 19;
75
76
77     /**
78      *
79      */

80     public boolean isShowLegend();
81
82     /**
83      *
84      */

85     public void setShowLegend(boolean isShowLegend);
86
87     /**
88      * Returns the evaluation time for this chart.
89      */

90     public byte getEvaluationTime();
91         
92     /**
93      * Gets the evaluation group for this chart (only applies when evaluation time is group).
94      */

95     public JRGroup getEvaluationGroup();
96         
97     /**
98      * Gets the box around the element.
99      * @deprecated
100      */

101     public JRBox getBox();
102
103
104     /**
105      * Gets the expression whose evaluation will form the title.
106      */

107     public JRExpression getTitleExpression();
108
109
110     /**
111      *
112      */

113     public JRFont getTitleFont();
114
115
116     /**
117      * Gets the title position relative to the chart.
118      */

119     public byte getTitlePosition();
120
121
122     /**
123      * Sets the title position relative to the chart.
124      */

125     public void setTitlePosition(byte titlePosition);
126     
127
128     /**
129      *
130      */

131     public Color JavaDoc getTitleColor();
132
133
134     /**
135      *
136      */

137     public void setTitleColor(Color JavaDoc titleColor);
138
139     
140     /**
141      * Gets the expression whose evaluation will form the subtitle.
142      */

143     public JRExpression getSubtitleExpression();
144
145
146     /**
147      *
148      */

149     public JRFont getSubtitleFont();
150
151
152     /**
153      *
154      */

155     public Color JavaDoc getSubtitleColor();
156
157
158     /**
159      *
160      */

161     public void setSubtitleColor(Color JavaDoc subtitleColor);
162
163     
164     /**
165      *
166      */

167     public Color JavaDoc getLegendColor();
168     
169     /**
170      *
171      */

172     public void setLegendColor(Color JavaDoc legendColor);
173     
174     /**
175      *
176      */

177     public Color JavaDoc getLegendBackgroundColor();
178     
179     /**
180      *
181      */

182     public void setLegendBackgroundColor(Color JavaDoc legendBackgroundColor);
183     
184     /**
185      *
186      */

187     public JRFont getLegendFont();
188     
189     /**
190      * Gets the chart dataset. Most chart types have different dataset structures, depending on the chart type.
191      */

192     public JRChartDataset getDataset();
193
194
195     /**
196      * Gets the chart plot. Plots are used to define various chart visual properties, such as colors and transparency.
197      */

198     public JRChartPlot getPlot();
199
200
201     /**
202      * Gets the chart type. It must be one of the chart type constants in this class.
203      */

204     public byte getChartType();
205     
206     /**
207      * Gets a user specified chart customizer class name.
208      * @see JRChartCustomizer
209      */

210     public String JavaDoc getCustomizerClass();
211
212
213 }
214
Popular Tags