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.JRScatterPlot;
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: JRFillScatterPlot.java 1577 2007-02-09 11:25:48Z teodord $
043: */
044: public class JRFillScatterPlot extends JRFillChartPlot implements
045: JRScatterPlot {
046:
047: /**
048: *
049: */
050: protected JRFont xAxisLabelFont = null;
051: protected Color xAxisLabelColor = null;
052: protected JRFont xAxisTickLabelFont = null;
053: protected Color xAxisTickLabelColor = null;
054: protected Color xAxisLineColor = null;
055:
056: protected JRFont yAxisLabelFont = null;
057: protected Color yAxisLabelColor = null;
058: protected JRFont yAxisTickLabelFont = null;
059: protected Color yAxisTickLabelColor = null;
060: protected Color yAxisLineColor = null;
061:
062: /**
063: *
064: */
065: public JRFillScatterPlot(JRScatterPlot plot,
066: JRFillObjectFactory factory) {
067: super (plot, factory);
068:
069: xAxisLabelFont = new JRBaseFont(null, null, plot.getChart(),
070: plot.getXAxisLabelFont());
071: xAxisLabelColor = plot.getOwnXAxisLabelColor();
072: xAxisTickLabelFont = new JRBaseFont(null, null,
073: plot.getChart(), plot.getXAxisTickLabelFont());
074: xAxisTickLabelColor = plot.getOwnXAxisTickLabelColor();
075: xAxisLineColor = plot.getXAxisLineColor();
076:
077: yAxisLabelFont = new JRBaseFont(null, null, plot.getChart(),
078: plot.getYAxisLabelFont());
079: yAxisLabelColor = plot.getOwnYAxisLabelColor();
080: yAxisTickLabelFont = new JRBaseFont(null, null,
081: plot.getChart(), plot.getYAxisTickLabelFont());
082: yAxisTickLabelColor = plot.getOwnYAxisTickLabelColor();
083: yAxisLineColor = plot.getYAxisLineColor();
084: }
085:
086: /**
087: *
088: */
089: public JRExpression getXAxisLabelExpression() {
090: return ((JRScatterPlot) parent).getXAxisLabelExpression();
091: }
092:
093: /**
094: *
095: */
096: public JRFont getXAxisLabelFont() {
097: return xAxisLabelFont;
098: }
099:
100: /**
101: *
102: */
103: public Color getXAxisLabelColor() {
104: return JRStyleResolver.getXAxisLabelColor(this , this );
105: }
106:
107: /**
108: *
109: */
110: public Color getOwnXAxisLabelColor() {
111: return xAxisLabelColor;
112: }
113:
114: /**
115: *
116: */
117: public JRFont getXAxisTickLabelFont() {
118: return xAxisTickLabelFont;
119: }
120:
121: /**
122: *
123: */
124: public Color getXAxisTickLabelColor() {
125: return JRStyleResolver.getXAxisTickLabelColor(this , this );
126: }
127:
128: /**
129: *
130: */
131: public Color getOwnXAxisTickLabelColor() {
132: return xAxisTickLabelColor;
133: }
134:
135: /**
136: *
137: */
138: public String getXAxisTickLabelMask() {
139: return ((JRScatterPlot) parent).getXAxisTickLabelMask();
140: }
141:
142: /**
143: *
144: */
145: public void setXAxisTickLabelMask(String mask) {
146: }
147:
148: /**
149: *
150: */
151: public Color getXAxisLineColor() {
152: return JRStyleResolver.getXAxisLineColor(this , this );
153: }
154:
155: /**
156: *
157: */
158: public Color getOwnXAxisLineColor() {
159: return xAxisLineColor;
160: }
161:
162: /**
163: *
164: */
165: public JRExpression getYAxisLabelExpression() {
166: return ((JRScatterPlot) parent).getYAxisLabelExpression();
167: }
168:
169: /**
170: *
171: */
172: public JRFont getYAxisLabelFont() {
173: return yAxisLabelFont;
174: }
175:
176: /**
177: *
178: */
179: public Color getYAxisLabelColor() {
180: return JRStyleResolver.getYAxisLabelColor(this , this );
181: }
182:
183: /**
184: *
185: */
186: public Color getOwnYAxisLabelColor() {
187: return yAxisLabelColor;
188: }
189:
190: /**
191: *
192: */
193: public JRFont getYAxisTickLabelFont() {
194: return yAxisTickLabelFont;
195: }
196:
197: /**
198: *
199: */
200: public Color getYAxisTickLabelColor() {
201: return JRStyleResolver.getYAxisTickLabelColor(this , this );
202: }
203:
204: /**
205: *
206: */
207: public Color getOwnYAxisTickLabelColor() {
208: return yAxisTickLabelColor;
209: }
210:
211: /**
212: *
213: */
214: public String getYAxisTickLabelMask() {
215: return ((JRScatterPlot) parent).getYAxisTickLabelMask();
216: }
217:
218: /**
219: *
220: */
221: public void setYAxisTickLabelMask(String mask) {
222: }
223:
224: /**
225: *
226: */
227: public Color getYAxisLineColor() {
228: return JRStyleResolver.getYAxisLineColor(this , this );
229: }
230:
231: /**
232: *
233: */
234: public Color getOwnYAxisLineColor() {
235: return yAxisLineColor;
236: }
237:
238: /**
239: *
240: */
241: public boolean isShowShapes() {
242: return ((JRScatterPlot) parent).isShowShapes();
243: }
244:
245: /**
246: *
247: */
248: public void setShowShapes(boolean value) {
249: }
250:
251: /**
252: *
253: */
254: public boolean isShowLines() {
255: return ((JRScatterPlot) parent).isShowLines();
256: }
257:
258: /**
259: *
260: */
261: public void setShowLines(boolean value) {
262: }
263:
264: }
|