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.JRHighLowPlot;
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: JRFillHighLowPlot.java 1577 2007-02-09 11:25:48Z teodord $
043: */
044: public class JRFillHighLowPlot extends JRFillChartPlot implements
045: JRHighLowPlot {
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 JRFillHighLowPlot(JRHighLowPlot highLowPlot,
066: JRFillObjectFactory factory) {
067: super (highLowPlot, factory);
068:
069: timeAxisLabelFont = new JRBaseFont(null, null, highLowPlot
070: .getChart(), highLowPlot.getTimeAxisLabelFont());
071: timeAxisLabelColor = highLowPlot.getOwnTimeAxisLabelColor();
072: timeAxisTickLabelFont = new JRBaseFont(null, null, highLowPlot
073: .getChart(), highLowPlot.getTimeAxisTickLabelFont());
074: timeAxisTickLabelColor = highLowPlot
075: .getOwnTimeAxisTickLabelColor();
076: timeAxisLineColor = highLowPlot.getTimeAxisLineColor();
077:
078: valueAxisLabelFont = new JRBaseFont(null, null, highLowPlot
079: .getChart(), highLowPlot.getValueAxisLabelFont());
080: valueAxisLabelColor = highLowPlot.getOwnValueAxisLabelColor();
081: valueAxisTickLabelFont = new JRBaseFont(null, null, highLowPlot
082: .getChart(), highLowPlot.getValueAxisTickLabelFont());
083: valueAxisTickLabelColor = highLowPlot
084: .getOwnValueAxisTickLabelColor();
085: valueAxisLineColor = highLowPlot.getValueAxisTickLabelColor();
086: }
087:
088: /**
089: *
090: */
091: public JRExpression getTimeAxisLabelExpression() {
092: return ((JRHighLowPlot) parent).getTimeAxisLabelExpression();
093: }
094:
095: /**
096: *
097: */
098: public JRFont getTimeAxisLabelFont() {
099: return timeAxisLabelFont;
100: }
101:
102: /**
103: *
104: */
105: public void setTimeAxisLabelFont(JRFont font) {
106: }
107:
108: /**
109: *
110: */
111: public Color getTimeAxisLabelColor() {
112: return JRStyleResolver.getTimeAxisLabelColor(this , this );
113: }
114:
115: /**
116: *
117: */
118: public Color getOwnTimeAxisLabelColor() {
119: return timeAxisLabelColor;
120: }
121:
122: /**
123: *
124: */
125: public void setTimeAxisLabelColor(Color color) {
126: }
127:
128: /**
129: *
130: */
131: public JRFont getTimeAxisTickLabelFont() {
132: return timeAxisTickLabelFont;
133: }
134:
135: /**
136: *
137: */
138: public void setTimeAxisTickLabelFont(JRFont font) {
139: }
140:
141: /**
142: *
143: */
144: public Color getTimeAxisTickLabelColor() {
145: return JRStyleResolver.getTimeAxisTickLabelColor(this , this );
146: }
147:
148: /**
149: *
150: */
151: public Color getOwnTimeAxisTickLabelColor() {
152: return timeAxisTickLabelColor;
153: }
154:
155: /**
156: *
157: */
158: public void setTimeAxisTickLabelColor(Color color) {
159: }
160:
161: /**
162: *
163: */
164: public String getTimeAxisTickLabelMask() {
165: return ((JRHighLowPlot) parent).getTimeAxisTickLabelMask();
166: }
167:
168: /**
169: *
170: */
171: public void setTimeAxisTickLabelMask(String mask) {
172: }
173:
174: /**
175: *
176: */
177: public Color getTimeAxisLineColor() {
178: return JRStyleResolver.getTimeAxisLineColor(this , this );
179: }
180:
181: /**
182: *
183: */
184: public Color getOwnTimeAxisLineColor() {
185: return timeAxisLineColor;
186: }
187:
188: /**
189: *
190: */
191: public void setTimeAxisLineColor(Color color) {
192: }
193:
194: /**
195: *
196: */
197: public JRExpression getValueAxisLabelExpression() {
198: return ((JRHighLowPlot) parent).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 ((JRHighLowPlot) 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: /**
295: *
296: */
297: public void setValueAxisLineColor(Color color) {
298: }
299:
300: public boolean isShowOpenTicks() {
301: return ((JRHighLowPlot) parent).isShowOpenTicks();
302: }
303:
304: public boolean isShowCloseTicks() {
305: return ((JRHighLowPlot) parent).isShowCloseTicks();
306: }
307: }
|