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.charts.fill;
029:
030: import java.awt.Color;
031:
032: import net.sf.jasperreports.charts.JRTimeSeriesPlot;
033: import net.sf.jasperreports.engine.JRExpression;
034: import net.sf.jasperreports.engine.JRFont;
035: import net.sf.jasperreports.engine.base.JRBaseFont;
036: import net.sf.jasperreports.engine.fill.JRFillChartPlot;
037: import net.sf.jasperreports.engine.fill.JRFillObjectFactory;
038: import net.sf.jasperreports.engine.util.JRStyleResolver;
039:
040: /**
041: * @author Flavius Sana (flavius_sana@users.sourceforge.net)
042: * @version $Id: JRFillTimeSeriesPlot.java 1577 2007-02-09 11:25:48Z teodord $
043: */
044:
045: public class JRFillTimeSeriesPlot extends JRFillChartPlot implements
046: JRTimeSeriesPlot {
047:
048: /**
049: *
050: */
051: protected JRFont timeAxisLabelFont = null;
052: protected Color timeAxisLabelColor = null;
053: protected JRFont timeAxisTickLabelFont = null;
054: protected Color timeAxisTickLabelColor = null;
055: protected Color timeAxisLineColor = null;
056:
057: protected JRFont valueAxisLabelFont = null;
058: protected Color valueAxisLabelColor = null;
059: protected JRFont valueAxisTickLabelFont = null;
060: protected Color valueAxisTickLabelColor = null;
061: protected Color valueAxisLineColor = null;
062:
063: /**
064: *
065: */
066: public JRFillTimeSeriesPlot(JRTimeSeriesPlot plot,
067: JRFillObjectFactory factory) {
068: super (plot, factory);
069:
070: timeAxisLabelFont = new JRBaseFont(null, null, plot.getChart(),
071: plot.getTimeAxisLabelFont());
072: timeAxisLabelColor = plot.getOwnTimeAxisLabelColor();
073: timeAxisTickLabelFont = new JRBaseFont(null, null, plot
074: .getChart(), plot.getTimeAxisTickLabelFont());
075: timeAxisTickLabelColor = plot.getOwnTimeAxisTickLabelColor();
076: timeAxisLineColor = plot.getTimeAxisLineColor();
077:
078: valueAxisLabelFont = new JRBaseFont(null, null,
079: plot.getChart(), plot.getValueAxisLabelFont());
080: valueAxisLabelColor = plot.getOwnValueAxisLabelColor();
081: valueAxisTickLabelFont = new JRBaseFont(null, null, plot
082: .getChart(), plot.getValueAxisTickLabelFont());
083: valueAxisTickLabelColor = plot.getOwnValueAxisTickLabelColor();
084: valueAxisLineColor = plot.getValueAxisTickLabelColor();
085: }
086:
087: /**
088: *
089: */
090: public JRExpression getTimeAxisLabelExpression() {
091: return ((JRTimeSeriesPlot) parent).getTimeAxisLabelExpression();
092: }
093:
094: /**
095: *
096: */
097: public JRFont getTimeAxisLabelFont() {
098: return timeAxisLabelFont;
099: }
100:
101: /**
102: *
103: */
104: public void setTimeAxisLabelFont(JRFont font) {
105: }
106:
107: /**
108: *
109: */
110: public Color getTimeAxisLabelColor() {
111: return JRStyleResolver.getTimeAxisLabelColor(this , this );
112: }
113:
114: /**
115: *
116: */
117: public Color getOwnTimeAxisLabelColor() {
118: return timeAxisLabelColor;
119: }
120:
121: /**
122: *
123: */
124: public void setTimeAxisLabelColor(Color color) {
125: }
126:
127: /**
128: *
129: */
130: public JRFont getTimeAxisTickLabelFont() {
131: return timeAxisTickLabelFont;
132: }
133:
134: /**
135: *
136: */
137: public void setTimeAxisTickLabelFont(JRFont font) {
138: }
139:
140: /**
141: *
142: */
143: public Color getTimeAxisTickLabelColor() {
144: return JRStyleResolver.getTimeAxisTickLabelColor(this , this );
145: }
146:
147: /**
148: *
149: */
150: public Color getOwnTimeAxisTickLabelColor() {
151: return timeAxisTickLabelColor;
152: }
153:
154: /**
155: *
156: */
157: public void setTimeAxisTickLabelColor(Color color) {
158: }
159:
160: /**
161: *
162: */
163: public String getTimeAxisTickLabelMask() {
164: return ((JRTimeSeriesPlot) parent).getTimeAxisTickLabelMask();
165: }
166:
167: /**
168: *
169: */
170: public void setTimeAxisTickLabelMask(String mask) {
171: }
172:
173: /**
174: *
175: */
176: public Color getTimeAxisLineColor() {
177: return JRStyleResolver.getTimeAxisLineColor(this , this );
178: }
179:
180: /**
181: *
182: */
183: public Color getOwnTimeAxisLineColor() {
184: return timeAxisLineColor;
185: }
186:
187: /**
188: *
189: */
190: public void setTimeAxisLineColor(Color color) {
191: }
192:
193: /**
194: *
195: */
196: public JRExpression getValueAxisLabelExpression() {
197: return ((JRTimeSeriesPlot) parent)
198: .getValueAxisLabelExpression();
199: }
200:
201: /**
202: *
203: */
204: public JRFont getValueAxisLabelFont() {
205: return valueAxisLabelFont;
206: }
207:
208: /**
209: *
210: */
211: public void setValueAxisLabelFont(JRFont font) {
212: }
213:
214: /**
215: *
216: */
217: public Color getValueAxisLabelColor() {
218: return JRStyleResolver.getValueAxisLabelColor(this , this );
219: }
220:
221: /**
222: *
223: */
224: public Color getOwnValueAxisLabelColor() {
225: return valueAxisLabelColor;
226: }
227:
228: /**
229: *
230: */
231: public void setValueAxisLabelColor(Color color) {
232: }
233:
234: /**
235: *
236: */
237: public JRFont getValueAxisTickLabelFont() {
238: return valueAxisTickLabelFont;
239: }
240:
241: /**
242: *
243: */
244: public void setValueAxisTickLabelFont(JRFont font) {
245: }
246:
247: /**
248: *
249: */
250: public Color getValueAxisTickLabelColor() {
251: return JRStyleResolver.getValueAxisTickLabelColor(this , this );
252: }
253:
254: /**
255: *
256: */
257: public Color getOwnValueAxisTickLabelColor() {
258: return valueAxisTickLabelColor;
259: }
260:
261: /**
262: *
263: */
264: public void setValueAxisTickLabelColor(Color color) {
265: }
266:
267: /**
268: *
269: */
270: public String getValueAxisTickLabelMask() {
271: return ((JRTimeSeriesPlot) parent).getValueAxisTickLabelMask();
272: }
273:
274: /**
275: *
276: */
277: public void setValueAxisTickLabelMask(String mask) {
278: }
279:
280: /**
281: *
282: */
283: public Color getValueAxisLineColor() {
284: return JRStyleResolver.getValueAxisLineColor(this , this );
285: }
286:
287: /**
288: *
289: */
290: public Color getOwnValueAxisLineColor() {
291: return valueAxisLineColor;
292: }
293:
294: public boolean isShowLines() {
295: return ((JRTimeSeriesPlot) parent).isShowLines();
296: }
297:
298: public void setShowLines() {
299: }
300:
301: public boolean isShowShapes() {
302: return ((JRTimeSeriesPlot) parent).isShowShapes();
303: }
304:
305: public void setShowShapes() {
306: }
307: }
|