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