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