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