001: /*
002: * ============================================================================
003: * GNU Lesser General Public License
004: * ============================================================================
005: *
006: * JasperReports - Free Java report-generating library.
007: * Copyright (C) 2001-2006 JasperSoft Corporation http://www.jaspersoft.com
008: *
009: * This library is free software; you can redistribute it and/or
010: * modify it under the terms of the GNU Lesser General Public
011: * License as published by the Free Software Foundation; either
012: * version 2.1 of the License, or (at your option) any later version.
013: *
014: * This library is distributed in the hope that it will be useful,
015: * but WITHOUT ANY WARRANTY; without even the implied warranty of
016: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
017: * Lesser General Public License for more details.
018: *
019: * You should have received a copy of the GNU Lesser General Public
020: * License along with this library; if not, write to the Free Software
021: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
022: *
023: * JasperSoft Corporation
024: * 303 Second Street, Suite 450 North
025: * San Francisco, CA 94107
026: * http://www.jaspersoft.com
027: */
028: package net.sf.jasperreports.engine;
029:
030: import java.awt.Color;
031:
032: /**
033: * Implementations of this interface can be used for rendering chart components. Data obtained from the report
034: * datasource can be also displayed in a chart, embedded in the report. There are a lot of chart types, each with
035: * its own dataset and characteristics. This interface only defines the common properties.
036: * @author Teodor Danciu (teodord@users.sourceforge.net)
037: * @version $Id: JRChart.java 1573 2007-02-07 16:58:50Z shertage $
038: */
039: public interface JRChart extends JRElement, JRAnchor, JRHyperlink,
040: JRBox {
041:
042: /**
043: *
044: */
045: public static final byte TITLE_POSITION_TOP = 1;
046: public static final byte TITLE_POSITION_BOTTOM = 2;
047: public static final byte TITLE_POSITION_LEFT = 3;
048: public static final byte TITLE_POSITION_RIGHT = 4;
049:
050: /**
051: *
052: */
053: public static final byte CHART_TYPE_AREA = 1;
054: public static final byte CHART_TYPE_BAR3D = 2;
055: public static final byte CHART_TYPE_BAR = 3;
056: public static final byte CHART_TYPE_BUBBLE = 4;
057: public static final byte CHART_TYPE_CANDLESTICK = 5;
058: public static final byte CHART_TYPE_HIGHLOW = 6;
059: public static final byte CHART_TYPE_LINE = 7;
060: public static final byte CHART_TYPE_PIE3D = 8;
061: public static final byte CHART_TYPE_PIE = 9;
062: public static final byte CHART_TYPE_SCATTER = 10;
063: public static final byte CHART_TYPE_STACKEDBAR3D = 11;
064: public static final byte CHART_TYPE_STACKEDBAR = 12;
065: public static final byte CHART_TYPE_XYAREA = 13;
066: public static final byte CHART_TYPE_XYBAR = 14;
067: public static final byte CHART_TYPE_XYLINE = 15;
068: public static final byte CHART_TYPE_TIMESERIES = 16;
069: public static final byte CHART_TYPE_METER = 17;
070: public static final byte CHART_TYPE_THERMOMETER = 18;
071: public static final byte CHART_TYPE_MULTI_AXIS = 19;
072: public static final byte CHART_TYPE_STACKEDAREA = 20;
073:
074: /**
075: *
076: */
077: public boolean isShowLegend();
078:
079: /**
080: *
081: */
082: public void setShowLegend(boolean isShowLegend);
083:
084: /**
085: * Returns the evaluation time for this chart.
086: */
087: public byte getEvaluationTime();
088:
089: /**
090: * Gets the evaluation group for this chart (only applies when evaluation time is group).
091: */
092: public JRGroup getEvaluationGroup();
093:
094: /**
095: * Gets the box around the element.
096: * @deprecated
097: */
098: public JRBox getBox();
099:
100: /**
101: * Gets the expression whose evaluation will form the title.
102: */
103: public JRExpression getTitleExpression();
104:
105: /**
106: *
107: */
108: public JRFont getTitleFont();
109:
110: /**
111: * Gets the title position relative to the chart.
112: */
113: public byte getTitlePosition();
114:
115: /**
116: * Sets the title position relative to the chart.
117: */
118: public void setTitlePosition(byte titlePosition);
119:
120: /**
121: *
122: */
123: public Color getTitleColor();
124:
125: /**
126: *
127: */
128: public Color getOwnTitleColor();
129:
130: /**
131: *
132: */
133: public void setTitleColor(Color titleColor);
134:
135: /**
136: * Gets the expression whose evaluation will form the subtitle.
137: */
138: public JRExpression getSubtitleExpression();
139:
140: /**
141: *
142: */
143: public JRFont getSubtitleFont();
144:
145: /**
146: *
147: */
148: public Color getSubtitleColor();
149:
150: /**
151: *
152: */
153: public Color getOwnSubtitleColor();
154:
155: /**
156: *
157: */
158: public void setSubtitleColor(Color subtitleColor);
159:
160: /**
161: *
162: */
163: public Color getLegendColor();
164:
165: /**
166: *
167: */
168: public Color getOwnLegendColor();
169:
170: /**
171: *
172: */
173: public void setLegendColor(Color legendColor);
174:
175: /**
176: *
177: */
178: public Color getOwnLegendBackgroundColor();
179:
180: /**
181: *
182: */
183: public Color getLegendBackgroundColor();
184:
185: /**
186: *
187: */
188: public void setLegendBackgroundColor(Color legendBackgroundColor);
189:
190: /**
191: *
192: */
193: public JRFont getLegendFont();
194:
195: /**
196: * Gets the chart dataset. Most chart types have different dataset structures, depending on the chart type.
197: */
198: public JRChartDataset getDataset();
199:
200: /**
201: * Gets the chart plot. Plots are used to define various chart visual properties, such as colors and transparency.
202: */
203: public JRChartPlot getPlot();
204:
205: /**
206: * Gets the chart type. It must be one of the chart type constants in this class.
207: */
208: public byte getChartType();
209:
210: /**
211: * Gets a user specified chart customizer class name.
212: * @see JRChartCustomizer
213: */
214: public String getCustomizerClass();
215:
216: }
|