Source Code Cross Referenced for XYZSeriesCollectionChartDefinition.java in  » Report » pentaho-report » org » pentaho » plugin » jfreechart » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Report » pentaho report » org.pentaho.plugin.jfreechart 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


0001:        /*
0002:         * Copyright 2007 Pentaho Corporation.  All rights reserved.
0003:         * This software was developed by Pentaho Corporation and is provided under the terms
0004:         * of the Mozilla Public License, Version 1.1, or any later version. You may not use
0005:         * this file except in compliance with the license. If you need a copy of the license,
0006:         * please go to http://www.mozilla.org/MPL/MPL-1.1.txt. The Original Code is the Pentaho
0007:         * BI Platform.  The Initial Developer is Pentaho Corporation.
0008:         *
0009:         * Software distributed under the Mozilla Public License is distributed on an "AS IS"
0010:         * basis, WITHOUT WARRANTY OF ANY KIND, either express or  implied. Please refer to
0011:         * the license for the specific language governing your rights and limitations.
0012:         *
0013:         */
0014:
0015:        package org.pentaho.plugin.jfreechart;
0016:
0017:        /**
0018:         * @author klosei
0019:         *
0020:         */
0021:
0022:        import java.awt.Color;
0023:        import java.awt.Font;
0024:        import java.awt.Image;
0025:        import java.awt.Paint;
0026:        import java.text.DecimalFormat;
0027:        import java.text.NumberFormat;
0028:        import java.util.ArrayList;
0029:        import java.util.Iterator;
0030:        import java.util.List;
0031:
0032:        import org.apache.commons.logging.Log;
0033:        import org.apache.commons.logging.LogFactory;
0034:        import org.dom4j.Node;
0035:        import org.jfree.chart.axis.ValueAxis;
0036:        import org.jfree.chart.plot.PlotOrientation;
0037:        import org.jfree.chart.title.TextTitle;
0038:        import org.jfree.data.xy.DefaultXYZDataset;
0039:        import org.jfree.ui.RectangleEdge;
0040:        import org.pentaho.commons.connection.IPentahoResultSet;
0041:        import org.pentaho.core.session.IPentahoSession;
0042:        import org.pentaho.messages.Messages;
0043:
0044:        public class XYZSeriesCollectionChartDefinition extends
0045:                DefaultXYZDataset implements  ChartDefinition {
0046:
0047:            /**
0048:             *
0049:             */
0050:            private static final long serialVersionUID = -1656592010807615066L;
0051:
0052:            //Chart Definition variables
0053:            private IPentahoSession session;
0054:
0055:            private int chartType = JFreeChartEngine.UNDEFINED_CHART_TYPE;
0056:
0057:            //Chart attributes node names
0058:            private static final String STACKED_NODE_NAME = "is-stacked"; //$NON-NLS-1$
0059:
0060:            private static final String ORIENTATION_NODE_NAME = "orientation"; //$NON-NLS-1$
0061:
0062:            private static final String DOMAIN_TITLE_NODE_NAME = "domain-title"; //$NON-NLS-1$
0063:
0064:            private static final String DOMAIN_TITLE_FONT_NODE_NAME = "domain-title-font"; //$NON-NLS-1$
0065:
0066:            private static final String DOMAIN_TICK_FONT_NODE_NAME = "domain-tick-font";//$NON-NLS-1$ 
0067:
0068:            private static final String DOMAIN_TICK_FORMAT_NODE_NAME = "domain-tick-format"; //$NON-NLS-1$
0069:
0070:            private static final String DOMAIN_MINIMUM_NODE_NAME = "domain-minimum"; //$NON-NLS-1$
0071:
0072:            private static final String DOMAIN_MAXIMUM_NODE_NAME = "domain-maximum"; //$NON-NLS-1$
0073:
0074:            private static final String RANGE_TITLE_NODE_NAME = "range-title"; //$NON-NLS-1$
0075:
0076:            private static final String RANGE_TITLE_FONT_NODE_NAME = "range-title-font"; //$NON-NLS-1$
0077:
0078:            private static final String RANGE_MINIMUM_NODE_NAME = "range-minimum"; //$NON-NLS-1$
0079:
0080:            private static final String RANGE_MAXIMUM_NODE_NAME = "range-maximum"; //$NON-NLS-1$
0081:
0082:            private static final String RANGE_TICK_FORMAT_NODE_NAME = "range-tick-format"; //$NON-NLS-1$
0083:
0084:            private static final String RANGE_TICK_FONT_NODE_NAME = "range-tick-font"; //$NON-NLS-1$
0085:
0086:            private static final String DOMAIN_VERTICAL_TICK_LABELS_NODE_NAME = "domain-vertical-tick-labels"; //$NON-NLS-1$
0087:
0088:            private static final String DOMAIN_INCLUDES_ZERO_NODE_NAME = "domain-includes-zero"; //$NON-NLS-1$
0089:
0090:            private static final String RANGE_INCLUDES_ZERO_NODE_NAME = "range-includes-zero"; //$NON-NLS-1$
0091:
0092:            private static final String DOMAIN_STICKY_ZERO_NODE_NAME = "domain-sticky-zero"; //$NON-NLS-1$
0093:
0094:            private static final String RANGE_STICKY_ZERO_NODE_NAME = "range-sticky-zero"; //$NON-NLS-1$
0095:
0096:            private static final String CHART_BORDER_PAINT_NODE_NAME = "border-paint"; //$NON-NLS-1$
0097:
0098:            private static final String MAX_BUBBLE_SIZE_NODE_NAME = "max-bubble-size"; //$NON-NLS-1$
0099:
0100:            private static final String BUBBLE_LABEL_CONTENT_NODE_NAME = "bubble-label-content"; //$NON-NLS-1$
0101:
0102:            private static final String BUBBLE_LABEL_X_FORMAT_NODE_NAME = "bubble-label-x-format"; //$NON-NLS-1$
0103:
0104:            private static final String BUBBLE_LABEL_Y_FORMAT_NODE_NAME = "bubble-label-y-format"; //$NON-NLS-1$
0105:
0106:            private static final String BUBBLE_LABEL_Z_FORMAT_NODE_NAME = "bubble-label-z-format"; //$NON-NLS-1$
0107:
0108:            private String noDataMessage = null;
0109:
0110:            //JFreeChart Customizations
0111:            private String title = ""; //$NON-NLS-1$
0112:
0113:            private RectangleEdge titlePosition = RectangleEdge.TOP;
0114:
0115:            private Font titleFont = TextTitle.DEFAULT_FONT;
0116:
0117:            private List subTitles = new ArrayList();
0118:
0119:            private Paint chartBackgroundPaint = Color.WHITE;
0120:
0121:            private Image chartBackgroundImage = null;
0122:
0123:            private boolean borderVisible = false;
0124:
0125:            private Paint borderPaint = Color.BLACK;
0126:
0127:            private int width = 200;
0128:
0129:            private int height = 200;
0130:
0131:            private int dotWidth = 5;
0132:
0133:            private int dotHeight = 5;
0134:
0135:            //Plot Customizations
0136:            private PlotOrientation orientation = PlotOrientation.VERTICAL;
0137:
0138:            private Paint plotBackgroundPaint = Color.WHITE;
0139:
0140:            private Image plotBackgroundImage = null;
0141:
0142:            private boolean legendIncluded = true;
0143:
0144:            private boolean threeD = false;
0145:
0146:            private boolean stacked = false;
0147:
0148:            // additional properties
0149:            private boolean domainVerticalTickLabels = false;
0150:
0151:            private boolean domainIncludesZero = true;
0152:
0153:            private boolean domainStickyZero = true;
0154:
0155:            private Paint[] paintSequence = null;
0156:
0157:            private String domainTitle = null;
0158:
0159:            private Font domainTitleFont = TextTitle.DEFAULT_FONT;
0160:
0161:            private Font domainTickFont = null;
0162:
0163:            private NumberFormat domainTickFormat = null;
0164:
0165:            private double domainMinimum = ValueAxis.DEFAULT_LOWER_BOUND;
0166:
0167:            private double domainMaximum = ValueAxis.DEFAULT_UPPER_BOUND;
0168:
0169:            private boolean rangeIncludesZero = true;
0170:
0171:            private boolean rangeStickyZero = true;
0172:
0173:            private String rangeTitle = null;
0174:
0175:            private Font rangeTitleFont = TextTitle.DEFAULT_FONT;
0176:
0177:            private Font rangeTickFont = null;
0178:
0179:            private NumberFormat rangeTickFormat = null;
0180:
0181:            private double rangeMinimum = ValueAxis.DEFAULT_LOWER_BOUND;
0182:
0183:            private double rangeMaximum = ValueAxis.DEFAULT_UPPER_BOUND;
0184:
0185:            private double maxZValue = 0;
0186:
0187:            private double maxBubbleSize = 0;
0188:
0189:            private String bubbleLabelContent = "{0}: ({1}, {2}, {3})";//$NON-NLS-1$ 
0190:
0191:            private NumberFormat xFormat = NumberFormat.getNumberInstance();
0192:
0193:            private NumberFormat yFormat = NumberFormat.getNumberInstance();
0194:
0195:            private NumberFormat zFormat = NumberFormat.getNumberInstance();
0196:
0197:            private Font legendFont = null;
0198:
0199:            private boolean legendBorderVisible = true;
0200:
0201:            //constructors
0202:            public XYZSeriesCollectionChartDefinition(IPentahoSession session) {
0203:                super ();
0204:                this .session = session;
0205:            }
0206:
0207:            public XYZSeriesCollectionChartDefinition(int chartType,
0208:                    IPentahoResultSet data, boolean byRow,
0209:                    IPentahoSession session) {
0210:                this (session);
0211:                this .chartType = chartType;
0212:                if (byRow) {
0213:                    setDataByRow(data);
0214:                } else {
0215:                    setDataByColumn(data);
0216:                }
0217:            }
0218:
0219:            public XYZSeriesCollectionChartDefinition(IPentahoResultSet data,
0220:                    boolean byRow, Node chartAttributes, IPentahoSession session) {
0221:                this (JFreeChartEngine.UNDEFINED_CHART_TYPE, data, byRow,
0222:                        session);
0223:                setChartAttributes(chartAttributes);
0224:            }
0225:
0226:            public static Log getLogger() {
0227:                return LogFactory
0228:                        .getLog(XYZSeriesCollectionChartDefinition.class);
0229:            }
0230:
0231:            private void setChartAttributes(Node chartAttributes) {
0232:                if (chartAttributes == null) {
0233:                    return;
0234:                }
0235:                // get the chart type from the chart node -- this overrides the current
0236:                // chart type
0237:                setChartType(chartAttributes.selectSingleNode(TYPE_NODE_NAME));
0238:
0239:                // set the chart background
0240:                setChartBackground(chartAttributes
0241:                        .selectSingleNode(CHART_BACKGROUND_NODE_NAME));
0242:
0243:                // set the plot background
0244:                setPlotBackground(chartAttributes
0245:                        .selectSingleNode(PLOT_BACKGROUND_NODE_NAME));
0246:
0247:                // set the orientation
0248:                setOrientation(chartAttributes
0249:                        .selectSingleNode(ORIENTATION_NODE_NAME));
0250:
0251:                // do we want a legend
0252:                setLegendIncluded(chartAttributes
0253:                        .selectSingleNode(INCLUDE_LEGEND_NODE_NAME));
0254:
0255:                // get the chart title
0256:                setTitle(chartAttributes.selectSingleNode(TITLE_NODE_NAME));
0257:
0258:                // get the chart subtitles
0259:
0260:                // A list of <subtitle> nodes should not be allowed to exist as a child of the main XML element (for XML schema to 
0261:                // be well constructed and validate the XML . 
0262:                // We have deprecated <subtitle> as a child of the main node , and now require a <subtitles> parent node 
0263:                // under which <subtitle> can exist. 
0264:
0265:                List subtitles = chartAttributes
0266:                        .selectNodes(SUBTITLE_NODE_NAME);
0267:
0268:                if ((subtitles == null) || (subtitles.isEmpty())) {
0269:                    Node subTitlesNode = chartAttributes
0270:                            .selectSingleNode(SUBTITLES_NODE_NAME);
0271:                    if (subTitlesNode != null) {
0272:                        subtitles = subTitlesNode
0273:                                .selectNodes(SUBTITLE_NODE_NAME);
0274:                    }
0275:                } else {
0276:                    // log a deprecation warning for this property...
0277:                    getLogger()
0278:                            .warn(
0279:                                    Messages
0280:                                            .getString(
0281:                                                    "CHART.WARN_DEPRECATED_CHILD", SUBTITLE_NODE_NAME, SUBTITLES_NODE_NAME));//$NON-NLS-1$ 
0282:                    getLogger()
0283:                            .warn(
0284:                                    Messages
0285:                                            .getString(
0286:                                                    "CHART.WARN_PROPERTY_WILL_NOT_VALIDATE", SUBTITLE_NODE_NAME));//$NON-NLS-1$  
0287:                }
0288:
0289:                if (subtitles != null) {
0290:                    addSubTitles(subtitles);
0291:                }
0292:
0293:                // get the paint sequence
0294:                setPaintSequence(chartAttributes
0295:                        .selectSingleNode(PALETTE_NODE_NAME));
0296:
0297:                // get the stacked value
0298:                setStacked(chartAttributes.selectSingleNode(STACKED_NODE_NAME));
0299:
0300:                // get the 3D value
0301:                setThreeD(chartAttributes.selectSingleNode(THREED_NODE_NAME));
0302:
0303:                // set the width
0304:                setWidth(chartAttributes.selectSingleNode(WIDTH_NODE_NAME));
0305:
0306:                // set the height
0307:                setHeight(chartAttributes.selectSingleNode(HEIGHT_NODE_NAME));
0308:
0309:                // set the dot width
0310:                setDotWidth(chartAttributes
0311:                        .selectSingleNode(DOT_WIDTH_NODE_NAME));
0312:
0313:                // set the dot height
0314:                setDotHeight(chartAttributes
0315:                        .selectSingleNode(DOT_HEIGHT_NODE_NAME));
0316:
0317:                // set vertical tick labels flag
0318:                setDomainVerticalTickLabels(chartAttributes
0319:                        .selectSingleNode(DOMAIN_VERTICAL_TICK_LABELS_NODE_NAME));
0320:
0321:                // set the border on or off
0322:                setBorderVisible(chartAttributes
0323:                        .selectSingleNode(CHART_BORDER_VISIBLE_NODE_NAME));
0324:
0325:                // set the border Paint
0326:                setBorderPaint(JFreeChartEngine.getPaint(chartAttributes
0327:                        .selectSingleNode(CHART_BORDER_PAINT_NODE_NAME)));
0328:
0329:                // set the title location
0330:                setTitlePosition(chartAttributes
0331:                        .selectSingleNode(TITLE_POSITION_NODE_NAME));
0332:
0333:                // set the title font
0334:                setTitleFont(chartAttributes
0335:                        .selectSingleNode(TITLE_FONT_NODE_NAME));
0336:
0337:                // set the domain title
0338:                setDomainTitle(chartAttributes
0339:                        .selectSingleNode(DOMAIN_TITLE_NODE_NAME));
0340:
0341:                // set the domain title font
0342:                setDomainTitleFont(chartAttributes
0343:                        .selectSingleNode(DOMAIN_TITLE_FONT_NODE_NAME));
0344:
0345:                //set the domain tick font
0346:                setDomainTickFont(chartAttributes
0347:                        .selectSingleNode(DOMAIN_TICK_FONT_NODE_NAME));
0348:
0349:                //the the domain tick label number format
0350:                setDomainTickFormat(chartAttributes
0351:                        .selectSingleNode(DOMAIN_TICK_FORMAT_NODE_NAME));
0352:
0353:                //set we want domain to include zero
0354:                setRangeIncludesZero(chartAttributes
0355:                        .selectSingleNode(RANGE_INCLUDES_ZERO_NODE_NAME));
0356:
0357:                // set the range title
0358:                setRangeTitle(chartAttributes
0359:                        .selectSingleNode(RANGE_TITLE_NODE_NAME));
0360:
0361:                // the the range font
0362:                setRangeTitleFont(chartAttributes
0363:                        .selectSingleNode(RANGE_TITLE_FONT_NODE_NAME));
0364:
0365:                //the the range font
0366:                setRangeTickFont(chartAttributes
0367:                        .selectSingleNode(RANGE_TICK_FONT_NODE_NAME));
0368:
0369:                //the the range tick label number format
0370:                setRangeTickFormat(chartAttributes
0371:                        .selectSingleNode(RANGE_TICK_FORMAT_NODE_NAME));
0372:
0373:                //set the domain minimum
0374:                setDomainMinimum(chartAttributes
0375:                        .selectSingleNode(DOMAIN_MINIMUM_NODE_NAME));
0376:
0377:                //set the domain minimum
0378:                setDomainMaximum(chartAttributes
0379:                        .selectSingleNode(DOMAIN_MAXIMUM_NODE_NAME));
0380:
0381:                //set the range minimum
0382:                setRangeMinimum(chartAttributes
0383:                        .selectSingleNode(RANGE_MINIMUM_NODE_NAME));
0384:
0385:                //set the range minimum
0386:                setRangeMaximum(chartAttributes
0387:                        .selectSingleNode(RANGE_MAXIMUM_NODE_NAME));
0388:
0389:                // set we want domain to include zero
0390:                setDomainIncludesZero(chartAttributes
0391:                        .selectSingleNode(DOMAIN_INCLUDES_ZERO_NODE_NAME));
0392:
0393:                // set we want domain to force zero
0394:                setDomainStickyZero(chartAttributes
0395:                        .selectSingleNode(DOMAIN_STICKY_ZERO_NODE_NAME));
0396:
0397:                //set we want domain to include zero
0398:                setRangeIncludesZero(chartAttributes
0399:                        .selectSingleNode(RANGE_INCLUDES_ZERO_NODE_NAME));
0400:
0401:                // set we want domain to force zero
0402:                setRangeStickyZero(chartAttributes
0403:                        .selectSingleNode(RANGE_STICKY_ZERO_NODE_NAME));
0404:
0405:                //set the maximum bubble size
0406:                setMaxBubbleSize(chartAttributes
0407:                        .selectSingleNode(MAX_BUBBLE_SIZE_NODE_NAME));
0408:
0409:                //set the bubble label content
0410:                setBubbleLabelContent(chartAttributes
0411:                        .selectSingleNode(BUBBLE_LABEL_CONTENT_NODE_NAME));
0412:
0413:                //set the bubble label's x value format
0414:                setXFormat(chartAttributes
0415:                        .selectSingleNode(BUBBLE_LABEL_X_FORMAT_NODE_NAME));
0416:
0417:                //set the bubble label's y value format
0418:                setYFormat(chartAttributes
0419:                        .selectSingleNode(BUBBLE_LABEL_Y_FORMAT_NODE_NAME));
0420:
0421:                //set the bubble label's z value format
0422:                setZFormat(chartAttributes
0423:                        .selectSingleNode(BUBBLE_LABEL_Z_FORMAT_NODE_NAME));
0424:
0425:                //set legend font
0426:                setLegendFont(chartAttributes
0427:                        .selectSingleNode(LEGEND_FONT_NODE_NAME));
0428:
0429:                // set legend border visible
0430:                setLegendBorderVisible(chartAttributes
0431:                        .selectSingleNode(DISPLAY_LEGEND_BORDER_NODE_NAME));
0432:
0433:            }
0434:
0435:            private void setDataByColumn(IPentahoResultSet data) {
0436:                // TODO Make this routine MDX friendly
0437:                if (data == null) {
0438:                    noDataMessage = Messages
0439:                            .getString("CHART.USER_NO_DATA_AVAILABLE"); //$NON-NLS-1$
0440:                    return; // No data so we've got nothing to set
0441:                    // TODO come up with some sort of error strategy here.
0442:                }
0443:                String seriesName = ""; //$NON-NLS-1$
0444:                Object[] rowData = data.next();
0445:                while (rowData != null) {
0446:                    double[][] series = new double[3][1];
0447:                    if (rowData.length >= 4) {
0448:                        if (rowData[1] instanceof  Number
0449:                                && rowData[2] instanceof  Number
0450:                                && rowData[3] instanceof  Number) {
0451:                            seriesName = rowData[0].toString();
0452:                            double zValue = ((Number) rowData[3]).doubleValue();
0453:                            if (zValue > maxZValue) {
0454:                                maxZValue = zValue;
0455:                            }
0456:                            series[0][0] = ((Number) rowData[1]).doubleValue();
0457:                            series[1][0] = ((Number) rowData[2]).doubleValue();
0458:                            series[2][0] = zValue;
0459:                            addSeries(seriesName, series);
0460:                        }
0461:                    }
0462:                    rowData = data.next();
0463:                }
0464:
0465:                if ((data.getRowCount() > 0) && (this .getSeriesCount() <= 0)) {
0466:                    noDataMessage = Messages
0467:                            .getString("CHART.USER_INCORRECT_DATA_FORMAT"); //$NON-NLS-1$
0468:                }
0469:
0470:            }
0471:
0472:            private void setDataByRow(IPentahoResultSet data) {
0473:                // TODO Make this routine MDX friendly
0474:                if (data == null) {
0475:                    noDataMessage = Messages
0476:                            .getString("CHART.USER_NO_DATA_AVAILABLE"); //$NON-NLS-1$
0477:                    return; // No data so we've got nothing to set
0478:                    // TODO come up with some sort of error strategy here.
0479:                }
0480:
0481:                Object[] rowData = data.next();
0482:                while (rowData != null) {
0483:
0484:                    for (int column = 0; column < rowData.length - 1; column = column + 4) {
0485:                        String seriesName = (String) rowData[column];
0486:                        double[][] series = new double[3][1];
0487:                        double zValue = ((Number) rowData[3]).doubleValue();
0488:                        if (zValue > maxZValue) {
0489:                            maxZValue = zValue;
0490:                        }
0491:                        series[0][0] = ((Number) rowData[column + 1])
0492:                                .intValue();
0493:                        series[1][0] = ((Number) rowData[column + 2])
0494:                                .intValue();
0495:                        series[2][0] = zValue;
0496:                        addSeries(seriesName, series);
0497:                    }
0498:                    rowData = data.next();
0499:                }
0500:                if ((data.getRowCount() > 0) && (this .getSeriesCount() <= 0)) {
0501:                    noDataMessage = Messages
0502:                            .getString("CHART.USER_INCORRECT_DATA_FORMAT"); //$NON-NLS-1$
0503:                }
0504:
0505:            }
0506:
0507:            /**
0508:             * @param backgroundPaint
0509:             *            The backgroundPaint to set.
0510:             */
0511:            public void setChartBackgroundPaint(Paint chartBackgroundPaint) {
0512:                if (chartBackgroundPaint != null) {
0513:                    this .chartBackgroundPaint = chartBackgroundPaint;
0514:                }
0515:            }
0516:
0517:            /**
0518:             * Return the java.awt.Font to be used to display the dial title
0519:             *
0520:             * @return Font The Font for the title of this Pie
0521:             */
0522:            public Font getTitleFont() {
0523:                return titleFont;
0524:            }
0525:
0526:            public void setTitleFont(Font titleFont) {
0527:                this .titleFont = titleFont;
0528:            }
0529:
0530:            public void setTitleFont(Node titleFontNode) {
0531:                Font font = JFreeChartEngine.getFont(titleFontNode);
0532:                if (font != null) {
0533:                    setTitleFont(font);
0534:                }
0535:            }
0536:
0537:            /**
0538:             * @return Returns the backgroundPaint.
0539:             */
0540:            public Paint getChartBackgroundPaint() {
0541:                return chartBackgroundPaint;
0542:            }
0543:
0544:            /**
0545:             * @return Returns the chartType.
0546:             */
0547:            public int getChartType() {
0548:                return chartType;
0549:            }
0550:
0551:            public void setChartType(Node chartTypeNode) {
0552:                if (chartTypeNode != null) {
0553:                    String typeStr = chartTypeNode.getText();
0554:                    setChartType(JFreeChartEngine.getChartType(typeStr));
0555:                }
0556:            }
0557:
0558:            /**
0559:             * @param chartType
0560:             *            The chartType to set.
0561:             */
0562:            public void setChartType(int chartType) {
0563:                this .chartType = chartType;
0564:            }
0565:
0566:            /**
0567:             * @return Returns the threeD.
0568:             */
0569:            public boolean isThreeD() {
0570:                return threeD;
0571:            }
0572:
0573:            public void setThreeD(Node threeDNode) {
0574:                if (threeDNode != null) {
0575:                    String boolStr = threeDNode.getText();
0576:                    Boolean booleanValue = new Boolean(boolStr);
0577:                    setThreeD(booleanValue.booleanValue());
0578:                }
0579:            }
0580:
0581:            /**
0582:             * @param threeD
0583:             *            The threeD to set.
0584:             */
0585:            public void setThreeD(boolean threeD) {
0586:                this .threeD = threeD;
0587:            }
0588:
0589:            /**
0590:             * @return Returns the stacked.
0591:             */
0592:            public boolean isStacked() {
0593:                return stacked;
0594:            }
0595:
0596:            public void setStacked(Node stackedNode) {
0597:                if (stackedNode != null) {
0598:                    String boolStr = stackedNode.getText();
0599:                    Boolean booleanValue = new Boolean(boolStr);
0600:                    setStacked(booleanValue.booleanValue());
0601:                }
0602:            }
0603:
0604:            /**
0605:             * @param stacked
0606:             *            The stacked to set.
0607:             */
0608:            public void setStacked(boolean stacked) {
0609:                this .stacked = stacked;
0610:            }
0611:
0612:            /**
0613:             * @return Returns the verticalTickLabels.
0614:             */
0615:            public boolean isDomainVerticalTickLabels() {
0616:                return domainVerticalTickLabels;
0617:            }
0618:
0619:            public void setDomainVerticalTickLabels(
0620:                    Node domainVerticalTickLabelsNode) {
0621:                if (domainVerticalTickLabelsNode != null) {
0622:                    String boolStr = domainVerticalTickLabelsNode.getText();
0623:                    Boolean booleanValue = new Boolean(boolStr);
0624:                    setDomainVerticalTickLabels(booleanValue.booleanValue());
0625:                }
0626:            }
0627:
0628:            /**
0629:             * @param domainVerticalTickLabels
0630:             *            The domainVerticalLabels to set.
0631:             */
0632:            public void setDomainVerticalTickLabels(
0633:                    boolean domainVerticalTickLabels) {
0634:                this .domainVerticalTickLabels = domainVerticalTickLabels;
0635:            }
0636:
0637:            /**
0638:             * @return Returns the domainIncludeZero.
0639:             */
0640:            public boolean isDomainIncludesZero() {
0641:                return domainIncludesZero;
0642:            }
0643:
0644:            public void setDomainIncludesZero(Node domainIncludesZeroNode) {
0645:                if (domainIncludesZeroNode != null) {
0646:                    String boolStr = domainIncludesZeroNode.getText();
0647:                    Boolean booleanValue = new Boolean(boolStr);
0648:                    setDomainIncludesZero(booleanValue.booleanValue());
0649:                }
0650:            }
0651:
0652:            /**
0653:             * @param domainIncludesZero
0654:             *            The domainIncludesZero to set.
0655:             */
0656:            public void setDomainIncludesZero(boolean domainIncludesZero) {
0657:                this .domainIncludesZero = domainIncludesZero;
0658:            }
0659:
0660:            /**
0661:             * @return Returns the domainStickyZero.
0662:             */
0663:            public boolean isDomainStickyZero() {
0664:                return domainStickyZero;
0665:            }
0666:
0667:            public void setDomainStickyZero(Node domainStickyZeroNode) {
0668:                if (domainStickyZeroNode != null) {
0669:                    String boolStr = domainStickyZeroNode.getText();
0670:                    Boolean booleanValue = new Boolean(boolStr);
0671:                    setDomainStickyZero(booleanValue.booleanValue());
0672:                }
0673:            }
0674:
0675:            /**
0676:             * @param rangeStickyZero
0677:             *            The rangeStickyZero to set.
0678:             */
0679:            public void setRangeStickyZero(boolean rangeStickyZero) {
0680:                this .rangeStickyZero = rangeStickyZero;
0681:            }
0682:
0683:            /**
0684:             * @return Returns the rangeStickyZero.
0685:             */
0686:            public boolean isRangeStickyZero() {
0687:                return rangeStickyZero;
0688:            }
0689:
0690:            public void setRangeStickyZero(Node rangeStickyZeroNode) {
0691:                if (rangeStickyZeroNode != null) {
0692:                    String boolStr = rangeStickyZeroNode.getText();
0693:                    Boolean booleanValue = new Boolean(boolStr);
0694:                    setRangeStickyZero(booleanValue.booleanValue());
0695:                }
0696:            }
0697:
0698:            /**
0699:             * @param domainStickyZero
0700:             *            The domainStickyZero to set.
0701:             */
0702:            public void setDomainStickyZero(boolean domainStickyZero) {
0703:                this .domainStickyZero = domainStickyZero;
0704:            }
0705:
0706:            /**
0707:             * @return Returns the height.
0708:             */
0709:            public int getHeight() {
0710:                return height;
0711:            }
0712:
0713:            public void setHeight(Node heightNode) {
0714:                if (heightNode != null) {
0715:                    setHeight(Integer.parseInt(heightNode.getText()));
0716:                }
0717:            }
0718:
0719:            /**
0720:             * @param height
0721:             *            The height to set.
0722:             */
0723:            public void setHeight(int height) {
0724:                this .height = height;
0725:            }
0726:
0727:            /**
0728:             * @return Returns the width.
0729:             */
0730:            public int getWidth() {
0731:                return width;
0732:            }
0733:
0734:            public void setWidth(Node widthNode) {
0735:                if (widthNode != null) {
0736:                    setWidth(Integer.parseInt(widthNode.getText()));
0737:                }
0738:            }
0739:
0740:            /**
0741:             * @param width
0742:             *            The width to set.
0743:             */
0744:            public void setWidth(int width) {
0745:                this .width = width;
0746:            }
0747:
0748:            //--------------------------------------------------
0749:            /**
0750:             * @return Returns the dot height.
0751:             */
0752:            public int getDotHeight() {
0753:                return dotHeight;
0754:            }
0755:
0756:            public void setDotHeight(Node heightNode) {
0757:                if (heightNode != null) {
0758:                    setDotHeight(Integer.parseInt(heightNode.getText()));
0759:                }
0760:            }
0761:
0762:            /**
0763:             * @param height
0764:             *            The dot height to set.
0765:             */
0766:            public void setDotHeight(int height) {
0767:                this .dotHeight = height;
0768:            }
0769:
0770:            /**
0771:             * @return Returns the dot width.
0772:             */
0773:            public int getDotWidth() {
0774:                return dotWidth;
0775:            }
0776:
0777:            public void setDotWidth(Node widthNode) {
0778:                if (widthNode != null) {
0779:                    setDotWidth(Integer.parseInt(widthNode.getText()));
0780:                }
0781:            }
0782:
0783:            /**
0784:             * @param width
0785:             *            The dot width to set.
0786:             */
0787:            public void setDotWidth(int width) {
0788:                this .dotWidth = width;
0789:            }
0790:
0791:            //--------------------------------------------------
0792:            /**
0793:             * @return Returns the title.
0794:             */
0795:            public String getTitle() {
0796:                return title;
0797:            }
0798:
0799:            public void setTitle(Node chartTitleNode) {
0800:                if (chartTitleNode != null) {
0801:                    setTitle(chartTitleNode.getText());
0802:                }
0803:            }
0804:
0805:            /**
0806:             * @param title
0807:             *            The title to set.
0808:             */
0809:            public void setTitle(String title) {
0810:                this .title = title;
0811:            }
0812:
0813:            /**
0814:             * @return Returns the paintSequence.
0815:             */
0816:            public Paint[] getPaintSequence() {
0817:                return paintSequence;
0818:            }
0819:
0820:            public void setPaintSequence(Node paletteNode) {
0821:                if (paletteNode != null) {
0822:                    List colorNodes = paletteNode.selectNodes(COLOR_NODE_NAME);
0823:                    Paint[] paints = new Paint[colorNodes.size()];
0824:                    for (int i = 0; i < colorNodes.size(); i++) {
0825:                        paints[i] = JFreeChartEngine.getPaint((Node) colorNodes
0826:                                .get(i));
0827:                    }
0828:                    setPaintSequence(paints);
0829:                }
0830:            }
0831:
0832:            /**
0833:             * @param paintSequence
0834:             *            The paintSequence to set.
0835:             */
0836:            public void setPaintSequence(Paint[] paintSequence) {
0837:                this .paintSequence = paintSequence;
0838:            }
0839:
0840:            /**
0841:             * @return Returns the subTitles.
0842:             */
0843:            public List getSubtitles() {
0844:                return subTitles;
0845:            }
0846:
0847:            public void addSubTitles(List subTitleNodes) {
0848:                if (subTitleNodes != null) {
0849:                    Iterator iter = subTitleNodes.iterator();
0850:                    while (iter.hasNext()) {
0851:                        addSubTitle(((Node) iter.next()).getText());
0852:                    }
0853:                }
0854:            }
0855:
0856:            public void addSubTitle(String subTitle) {
0857:                subTitles.add(subTitle);
0858:            }
0859:
0860:            /**
0861:             * @return Returns the chartBackgroundImage.
0862:             */
0863:            public Image getChartBackgroundImage() {
0864:                return chartBackgroundImage;
0865:            }
0866:
0867:            public void setChartBackgroundImage(Node chartBackgroundImageNode) {
0868:                setChartBackgroundImage(JFreeChartEngine.getImage(
0869:                        chartBackgroundImageNode, getSession()));
0870:            }
0871:
0872:            /**
0873:             * @param chartBackgroundImage
0874:             *            The chartBackgroundImage to set.
0875:             */
0876:            public void setChartBackgroundImage(Image chartBackgroundImage) {
0877:                this .chartBackgroundImage = chartBackgroundImage;
0878:            }
0879:
0880:            /**
0881:             * @return Returns the legendIncluded.
0882:             */
0883:            public boolean isLegendIncluded() {
0884:                return legendIncluded;
0885:            }
0886:
0887:            public void setLegendIncluded(Node legendNode) {
0888:                if (legendNode != null) {
0889:                    String boolStr = legendNode.getText();
0890:                    Boolean booleanValue = new Boolean(boolStr);
0891:                    setLegendIncluded(booleanValue.booleanValue());
0892:                }
0893:            }
0894:
0895:            /**
0896:             * @param legendIncluded
0897:             *            The legendIncluded to set.
0898:             */
0899:            public void setLegendIncluded(boolean legendIncluded) {
0900:                this .legendIncluded = legendIncluded;
0901:            }
0902:
0903:            public void setPlotBackgroundPaint(Paint plotBackgroundPaint) {
0904:                if (plotBackgroundPaint != null) {
0905:                    this .plotBackgroundPaint = plotBackgroundPaint;
0906:                }
0907:            }
0908:
0909:            public Paint getPlotBackgroundPaint() {
0910:                return plotBackgroundPaint;
0911:            }
0912:
0913:            /**
0914:             * @return Returns the plotBackgroundImage.
0915:             */
0916:            public Image getPlotBackgroundImage() {
0917:                return plotBackgroundImage;
0918:            }
0919:
0920:            public void setPlotBackgroundImage(Node plotBackgroundImageNode) {
0921:                setPlotBackgroundImage(JFreeChartEngine.getImage(
0922:                        plotBackgroundImageNode, getSession()));
0923:            }
0924:
0925:            /**
0926:             * @param plotBackgroundImage
0927:             *            The plotBackgroundImage to set.
0928:             */
0929:            public void setPlotBackgroundImage(Image plotBackgroundImage) {
0930:                this .plotBackgroundImage = plotBackgroundImage;
0931:            }
0932:
0933:            /**
0934:             * @return Returns the orientation.
0935:             */
0936:            public PlotOrientation getOrientation() {
0937:                return orientation;
0938:            }
0939:
0940:            public void setOrientation(Node orientationNode) {
0941:                if (orientationNode != null) {
0942:                    String orientationStr = orientationNode.getText();
0943:                    if (VERTICAL_ORIENTATION.equalsIgnoreCase(orientationStr)) {
0944:                        setOrientation(PlotOrientation.VERTICAL);
0945:                    } else if (HORIZONTAL_ORIENTATION
0946:                            .equalsIgnoreCase(orientationStr)) {
0947:                        setOrientation(PlotOrientation.HORIZONTAL);
0948:                    }
0949:                }
0950:            }
0951:
0952:            /**
0953:             * @param orientation
0954:             *            The orientation to set.
0955:             */
0956:            public void setOrientation(PlotOrientation orientation) {
0957:                this .orientation = orientation;
0958:            }
0959:
0960:            /**
0961:             * @return Returns the borderVisible.
0962:             */
0963:            public boolean isBorderVisible() {
0964:                return borderVisible;
0965:            }
0966:
0967:            public void setBorderVisible(Node borderVisibleNode) {
0968:                if (borderVisibleNode != null) {
0969:                    String boolStr = borderVisibleNode.getText();
0970:                    Boolean booleanValue = new Boolean(boolStr);
0971:                    setBorderVisible(booleanValue.booleanValue());
0972:                }
0973:            }
0974:
0975:            /**
0976:             * @param borderVisible
0977:             *            The borderVisible to set.
0978:             */
0979:            public void setBorderVisible(boolean borderVisible) {
0980:                this .borderVisible = borderVisible;
0981:            }
0982:
0983:            /**
0984:             * @return Returns the borderPaint.
0985:             */
0986:            public Paint getBorderPaint() {
0987:                return borderPaint;
0988:            }
0989:
0990:            /**
0991:             * @param borderPaint
0992:             *            The borderPaint to set.
0993:             */
0994:            public void setBorderPaint(Paint borderPaint) {
0995:                this .borderPaint = borderPaint;
0996:            }
0997:
0998:            public void setTitlePosition(Node titlePositionNode) {
0999:                if (titlePositionNode != null) {
1000:                    String titlePositionStr = titlePositionNode.getText();
1001:                    if ("top".equalsIgnoreCase(titlePositionStr)) { //$NON-NLS-1$
1002:                        setTitlePosition(RectangleEdge.TOP);
1003:                    } else if ("left".equalsIgnoreCase(titlePositionStr)) { //$NON-NLS-1$
1004:                        setTitlePosition(RectangleEdge.LEFT);
1005:                    } else if ("bottom".equalsIgnoreCase(titlePositionStr)) { //$NON-NLS-1$
1006:                        setTitlePosition(RectangleEdge.BOTTOM);
1007:                    } else if ("right".equalsIgnoreCase(titlePositionStr)) { //$NON-NLS-1$
1008:                        setTitlePosition(RectangleEdge.RIGHT);
1009:                    }
1010:                }
1011:            }
1012:
1013:            /**
1014:             * @return Returns the titlePosition.
1015:             */
1016:            public RectangleEdge getTitlePosition() {
1017:                return titlePosition;
1018:            }
1019:
1020:            /**
1021:             * @param titlePosition
1022:             *            The titlePosition to set.
1023:             */
1024:            public void setTitlePosition(RectangleEdge titlePosition) {
1025:                this .titlePosition = titlePosition;
1026:            }
1027:
1028:            public void setChartBackground(Node chartBackgroundNode) {
1029:                if (chartBackgroundNode != null) {
1030:                    Node backgroundTypeNode = chartBackgroundNode
1031:                            .selectSingleNode(BACKGROUND_TYPE_ATTRIBUTE_NAME);
1032:                    if (backgroundTypeNode != null) {
1033:                        String backgroundTypeStr = backgroundTypeNode.getText();
1034:                        if (COLOR_TYPE_NAME.equalsIgnoreCase(backgroundTypeStr)) {
1035:                            setChartBackgroundPaint(JFreeChartEngine
1036:                                    .getPaint(chartBackgroundNode));
1037:                            setChartBackgroundImage((Image) null);
1038:                        } else if (IMAGE_TYPE_NAME
1039:                                .equalsIgnoreCase(backgroundTypeStr)) {
1040:                            setChartBackgroundImage(chartBackgroundNode);
1041:                            setChartBackgroundPaint(null);
1042:                        } else if (TEXTURE_TYPE_NAME
1043:                                .equalsIgnoreCase(backgroundTypeStr)) {
1044:                            setChartBackgroundPaint(JFreeChartEngine
1045:                                    .getTexturePaint(chartBackgroundNode,
1046:                                            getWidth(), getHeight(),
1047:                                            getSession()));
1048:                            setChartBackgroundImage((Image) null);
1049:                        } else if (GRADIENT_TYPE_NAME
1050:                                .equalsIgnoreCase(backgroundTypeStr)) {
1051:                            setChartBackgroundPaint(JFreeChartEngine
1052:                                    .getGradientPaint(chartBackgroundNode,
1053:                                            getWidth(), getHeight()));
1054:                            setChartBackgroundImage((Image) null);
1055:                        }
1056:                    }
1057:                }
1058:            }
1059:
1060:            public void setPlotBackground(Node plotBackgroundNode) {
1061:                if (plotBackgroundNode != null) {
1062:                    Node backgroundTypeNode = plotBackgroundNode
1063:                            .selectSingleNode(BACKGROUND_TYPE_ATTRIBUTE_NAME);
1064:                    if (backgroundTypeNode != null) {
1065:                        String backgroundTypeStr = backgroundTypeNode.getText();
1066:                        if (COLOR_TYPE_NAME.equalsIgnoreCase(backgroundTypeStr)) {
1067:                            setPlotBackgroundPaint(JFreeChartEngine
1068:                                    .getPaint(plotBackgroundNode));
1069:                            setPlotBackgroundImage((Image) null);
1070:                        } else if (IMAGE_TYPE_NAME
1071:                                .equalsIgnoreCase(backgroundTypeStr)) {
1072:                            setPlotBackgroundImage(plotBackgroundNode);
1073:                            setPlotBackgroundPaint(null);
1074:                        } else if (TEXTURE_TYPE_NAME
1075:                                .equalsIgnoreCase(backgroundTypeStr)) {
1076:                            setPlotBackgroundPaint(JFreeChartEngine
1077:                                    .getTexturePaint(plotBackgroundNode,
1078:                                            getWidth(), getHeight(),
1079:                                            getSession()));
1080:                            setPlotBackgroundImage((Image) null);
1081:                        } else if (GRADIENT_TYPE_NAME
1082:                                .equalsIgnoreCase(backgroundTypeStr)) {
1083:                            setPlotBackgroundPaint(JFreeChartEngine
1084:                                    .getGradientPaint(plotBackgroundNode,
1085:                                            getWidth(), getHeight()));
1086:                            setPlotBackgroundImage((Image) null);
1087:                        }
1088:                    }
1089:                }
1090:            }
1091:
1092:            public void setDomainTitle(Node titleNode) {
1093:                if (titleNode != null) {
1094:                    setDomainTitle(titleNode.getText());
1095:                }
1096:            }
1097:
1098:            /**
1099:             * @return Returns the domainTitle.
1100:             */
1101:            public String getDomainTitle() {
1102:                return domainTitle;
1103:            }
1104:
1105:            /**
1106:             * @param domainTitle
1107:             *            The domainTitle to set.
1108:             */
1109:            public void setDomainTitle(String domainTitle) {
1110:                this .domainTitle = domainTitle;
1111:            }
1112:
1113:            /**
1114:             * @return Returns the domainIncludeZero.
1115:             */
1116:            public boolean isRangeIncludesZero() {
1117:                return rangeIncludesZero;
1118:            }
1119:
1120:            public void setRangeIncludesZero(Node rangeIncludesZeroNode) {
1121:                if (rangeIncludesZeroNode != null) {
1122:                    String boolStr = rangeIncludesZeroNode.getText();
1123:                    Boolean booleanValue = new Boolean(boolStr);
1124:                    setRangeIncludesZero(booleanValue.booleanValue());
1125:                }
1126:            }
1127:
1128:            /**
1129:             * @param domainIncludesZero
1130:             *            The domainIncludesZero to set.
1131:             */
1132:            public void setRangeIncludesZero(boolean rangeIncludesZero) {
1133:                this .rangeIncludesZero = rangeIncludesZero;
1134:            }
1135:
1136:            public void setRangeTitle(Node titleNode) {
1137:                if (titleNode != null) {
1138:                    setRangeTitle(titleNode.getText());
1139:                }
1140:            }
1141:
1142:            /**
1143:             * @return Returns the rangeTitle.
1144:             */
1145:            public String getRangeTitle() {
1146:                return rangeTitle;
1147:            }
1148:
1149:            /**
1150:             * @param rangeTitle
1151:             *            The rangeTitle to set.
1152:             */
1153:            public void setRangeTitle(String rangeTitle) {
1154:                this .rangeTitle = rangeTitle;
1155:            }
1156:
1157:            public void setDomainTitleFont(Node titleFontNode) {
1158:                Font font = JFreeChartEngine.getFont(titleFontNode);
1159:                if (font != null) {
1160:                    setDomainTitleFont(font);
1161:                }
1162:            }
1163:
1164:            /**
1165:             * @return Returns the domainTitleFont.
1166:             */
1167:            public Font getDomainTitleFont() {
1168:                return domainTitleFont;
1169:            }
1170:
1171:            /**
1172:             * @param domainTitleFont
1173:             *            The domainTitleFont to set.
1174:             */
1175:            public void setDomainTitleFont(Font domainTitleFont) {
1176:                this .domainTitleFont = domainTitleFont;
1177:            }
1178:
1179:            /**
1180:             * Return the java.awt.Font to be used to display the range axis tick labels
1181:             *
1182:             * @return Font The Font for the range axis tick labels
1183:             */
1184:            public Font getDomainTickFont() {
1185:                return domainTickFont;
1186:            }
1187:
1188:            /**
1189:             * @param domainTickFont
1190:             *            The domainTickFont to set.
1191:             */
1192:            public void setDomainTickFont(Font domainTickFont) {
1193:                this .domainTickFont = domainTickFont;
1194:            }
1195:
1196:            public void setDomainTickFont(Node rangeTickFontNode) {
1197:                Font font = JFreeChartEngine.getFont(rangeTickFontNode);
1198:                if (font != null) {
1199:                    setDomainTickFont(font);
1200:                }
1201:            }
1202:
1203:            public void setRangeTitleFont(Node titleFontNode) {
1204:                Font font = JFreeChartEngine.getFont(titleFontNode);
1205:                if (font != null) {
1206:                    setRangeTitleFont(font);
1207:                }
1208:            }
1209:
1210:            /**
1211:             * @return Returns the rangeTitleFont.
1212:             */
1213:            public Font getRangeTitleFont() {
1214:                return rangeTitleFont;
1215:            }
1216:
1217:            /**
1218:             * @param rangeTitleFont
1219:             *            The rangeTitleFont to set.
1220:             */
1221:            public void setRangeTitleFont(Font rangeTitleFont) {
1222:                this .rangeTitleFont = rangeTitleFont;
1223:            }
1224:
1225:            /**
1226:             * @return Returns the rangeTickFormat.
1227:             */
1228:            public NumberFormat getRangeTickFormat() {
1229:                return rangeTickFormat;
1230:            }
1231:
1232:            /**
1233:             * @param rangeTickFormat
1234:             *            The range tick number format to set.
1235:             */
1236:            public void setRangeTickFormat(NumberFormat rangeTickFormat) {
1237:                this .rangeTickFormat = rangeTickFormat;
1238:            }
1239:
1240:            public void setRangeTickFormat(Node tickFormatFontNode) {
1241:                if (tickFormatFontNode != null) {
1242:                    NumberFormat format = new DecimalFormat(tickFormatFontNode
1243:                            .getText());
1244:                    if (format != null) {
1245:                        setRangeTickFormat(format);
1246:                    }
1247:                }
1248:            }
1249:
1250:            /**
1251:             * Return the java.awt.Font to be used to display the range axis tick labels
1252:             *
1253:             * @return Font The Font for the range axis tick labels
1254:             */
1255:            public Font getRangeTickFont() {
1256:                return rangeTickFont;
1257:            }
1258:
1259:            /**
1260:             * @param rangeTitleFont
1261:             *            The rangeTitleFont to set.
1262:             */
1263:            public void setRangeTickFont(Font rangeTickFont) {
1264:                this .rangeTickFont = rangeTickFont;
1265:            }
1266:
1267:            public void setRangeTickFont(Node rangeTickFontNode) {
1268:                Font font = JFreeChartEngine.getFont(rangeTickFontNode);
1269:                if (font != null) {
1270:                    setRangeTickFont(font);
1271:                }
1272:            }
1273:
1274:            /**
1275:             * @return Returns the rangeTickFormat.
1276:             */
1277:            public NumberFormat getDomainTickFormat() {
1278:                return domainTickFormat;
1279:            }
1280:
1281:            /**
1282:             * @param rangeTickFormat
1283:             *            The range tick number format to set.
1284:             */
1285:            public void setDomainTickFormat(NumberFormat domainTickFormat) {
1286:                this .domainTickFormat = domainTickFormat;
1287:            }
1288:
1289:            public void setDomainTickFormat(Node tickFormatFontNode) {
1290:                if (tickFormatFontNode != null) {
1291:                    NumberFormat format = new DecimalFormat(tickFormatFontNode
1292:                            .getText());
1293:                    if (format != null) {
1294:                        setDomainTickFormat(format);
1295:                    }
1296:                }
1297:            }
1298:
1299:            public boolean isDisplayLabels() {
1300:                // TODO Auto-generated method stub
1301:                return false;
1302:            }
1303:
1304:            public IPentahoSession getSession() {
1305:                return session;
1306:            }
1307:
1308:            public void setSession(IPentahoSession session) {
1309:                this .session = session;
1310:            }
1311:
1312:            /**
1313:             * @return Returns the maximum Z Value.
1314:             */
1315:            public double getMaxZValue() {
1316:                return maxZValue;
1317:            }
1318:
1319:            public void setMaxBubbleSize(Node maxBubbleSizeNode) {
1320:                if (maxBubbleSizeNode != null) {
1321:                    String doubleStr = maxBubbleSizeNode.getText();
1322:                    Double doubleValue = new Double(doubleStr);
1323:                    setMaxBubbleSize(doubleValue.doubleValue());
1324:                }
1325:            }
1326:
1327:            public double getMaxBubbleSize() {
1328:                return maxBubbleSize;
1329:            }
1330:
1331:            public void setMaxBubbleSize(double maxBubbleSize) {
1332:                this .maxBubbleSize = maxBubbleSize;
1333:            }
1334:
1335:            public String getBubbleLabelContent() {
1336:                return bubbleLabelContent;
1337:            }
1338:
1339:            public void setBubbleLabelContent(Node bubbleLabelContentNode) {
1340:                if (bubbleLabelContentNode != null) {
1341:                    setBubbleLabelContent(bubbleLabelContentNode.getText());
1342:                }
1343:            }
1344:
1345:            /**
1346:             * @param bubbleLabelContent
1347:             *            Definition of the bubble labels' content. e.g. "{0}: ({1}, {2}, {3})"
1348:             *            {0} = series name
1349:             *            {1} = x value
1350:             *            {2} = y value
1351:             *            {3} = z value
1352:             */
1353:            public void setBubbleLabelContent(String bubblelabelContent) {
1354:                this .bubbleLabelContent = bubblelabelContent;
1355:            }
1356:
1357:            public NumberFormat getXFormat() {
1358:                return xFormat;
1359:            }
1360:
1361:            /**
1362:             * @param bubbleLabelContent
1363:             *            Definition of the bubble labels' x value number format.
1364:             *            e.g. "#,##0.0#" or "#,##0.00 EUR" or "##0.00 %"
1365:             */
1366:            public void setXFormat(Node bubblelabelXFormat) {
1367:                if (bubblelabelXFormat != null) {
1368:                    NumberFormat xFmat = new DecimalFormat(bubblelabelXFormat
1369:                            .getText());
1370:
1371:                    setXFormat(xFmat);
1372:                }
1373:            }
1374:
1375:            public void setXFormat(NumberFormat format) {
1376:                xFormat = format;
1377:            }
1378:
1379:            public NumberFormat getYFormat() {
1380:                return yFormat;
1381:            }
1382:
1383:            /**
1384:             * @param bubbleLabelContent
1385:             *            Definition of the bubble labels' y value number format.
1386:             *            e.g. "#,##0.0#" or "#,##0.00 EUR" or "##0.00 %"
1387:             */
1388:            public void setYFormat(Node bubblelabelYFormat) {
1389:                if (bubblelabelYFormat != null) {
1390:                    NumberFormat yFmat = new DecimalFormat(bubblelabelYFormat
1391:                            .getText());
1392:
1393:                    setYFormat(yFmat);
1394:                }
1395:            }
1396:
1397:            public void setYFormat(NumberFormat format) {
1398:                yFormat = format;
1399:            }
1400:
1401:            public NumberFormat getZFormat() {
1402:                return zFormat;
1403:            }
1404:
1405:            /**
1406:             * @param bubbleLabelContent
1407:             *            Definition of the bubble labels' z value number format.
1408:             *            e.g. "#,##0.0#" or "#,##0.00 EUR" or "##0.00 %"
1409:             */
1410:            public void setZFormat(Node bubblelabelZFormat) {
1411:                if (bubblelabelZFormat != null) {
1412:                    NumberFormat zFmat = new DecimalFormat(bubblelabelZFormat
1413:                            .getText());
1414:
1415:                    setZFormat(zFmat);
1416:                }
1417:            }
1418:
1419:            public void setZFormat(NumberFormat format) {
1420:                zFormat = format;
1421:            }
1422:
1423:            /**
1424:             * Return the java.awt.Font to be used to display the legend items
1425:             *
1426:             * @return Font The font for the legend items
1427:             */
1428:            public Font getLegendFont() {
1429:                // TODO Auto-generated method stub
1430:                return legendFont;
1431:            }
1432:
1433:            /**
1434:             * Set java.awt.Font to be used to display the legend items
1435:             *
1436:             * @param Font The java.awt.Font for the legend items
1437:             */
1438:            public void setLegendFont(Font legendFont) {
1439:                this .legendFont = legendFont;
1440:            }
1441:
1442:            public void setLegendFont(Node legendFontNode) {
1443:                Font font = JFreeChartEngine.getFont(legendFontNode);
1444:                if (font != null) {
1445:                    setLegendFont(font);
1446:                }
1447:            }
1448:
1449:            public void setLegendBorderVisible(Node legendBorderVisibleNode) {
1450:                if (legendBorderVisibleNode != null) {
1451:                    boolean legBorderVisible = (new Boolean(
1452:                            legendBorderVisibleNode.getText())).booleanValue();
1453:                    setLegendBorderVisible(legBorderVisible);
1454:                }
1455:            }
1456:
1457:            /**
1458:             * @param boolean legendBorderVisible
1459:             *        Set the visibility of the legend border.
1460:             */
1461:            public void setLegendBorderVisible(boolean legendBorderVisible) {
1462:                this .legendBorderVisible = legendBorderVisible;
1463:            }
1464:
1465:            /**
1466:             * Return the boolen that states if the legend border is visible
1467:             *
1468:             * @return boolean Is the legend border visible
1469:             */
1470:            public boolean isLegendBorderVisible() {
1471:                // TODO Auto-generated method stub
1472:                return legendBorderVisible;
1473:            }
1474:
1475:            /**
1476:             * Return the range axis' minimum value
1477:             *
1478:             * @return double Range axis' minimum value
1479:             */
1480:            public double getRangeMinimum() {
1481:                return rangeMinimum;
1482:            }
1483:
1484:            public void setRangeMinimum(Node rangeMinimumNode) {
1485:                if (rangeMinimumNode != null) {
1486:                    setRangeMinimum(Double.parseDouble(rangeMinimumNode
1487:                            .getText()));
1488:                }
1489:
1490:            }
1491:
1492:            /**
1493:             * @param double rangeMinimum
1494:             *        Set the minimum value of the range axis.
1495:             */
1496:            public void setRangeMinimum(double rangeMinimum) {
1497:                this .rangeMinimum = rangeMinimum;
1498:            }
1499:
1500:            /**
1501:             * Return the range axis' maximum value
1502:             *
1503:             * @return double Range axis' maximum value
1504:             */
1505:            public double getRangeMaximum() {
1506:                return rangeMaximum;
1507:            }
1508:
1509:            public void setRangeMaximum(Node rangeMaximumNode) {
1510:                if (rangeMaximumNode != null) {
1511:                    setRangeMaximum(Double.parseDouble(rangeMaximumNode
1512:                            .getText()));
1513:                }
1514:
1515:            }
1516:
1517:            /**
1518:             * @param double rangeMaximum
1519:             *        Set the maximum value of the range axis.
1520:             */
1521:            public void setRangeMaximum(double rangeMaximum) {
1522:                this .rangeMaximum = rangeMaximum;
1523:            }
1524:
1525:            /**
1526:             * Return the domain axis' minimum value
1527:             *
1528:             * @return double domain axis' minimum value
1529:             */
1530:            public double getDomainMinimum() {
1531:                return domainMinimum;
1532:            }
1533:
1534:            public void setDomainMinimum(Node domainMinimumNode) {
1535:                if (domainMinimumNode != null) {
1536:                    setDomainMinimum(Double.parseDouble(domainMinimumNode
1537:                            .getText()));
1538:                }
1539:
1540:            }
1541:
1542:            /**
1543:             * @param double domainMinimum
1544:             *        Set the minimum value of the domain axis.
1545:             */
1546:            public void setDomainMinimum(double domainMinimum) {
1547:                this .domainMinimum = domainMinimum;
1548:            }
1549:
1550:            /**
1551:             * Return the domain axis' maximum value
1552:             *
1553:             * @return double domain axis' maximum value
1554:             */
1555:            public double getDomainMaximum() {
1556:                return domainMaximum;
1557:            }
1558:
1559:            public void setDomainMaximum(Node domainMaximumNode) {
1560:                if (domainMaximumNode != null) {
1561:                    setDomainMaximum(Double.parseDouble(domainMaximumNode
1562:                            .getText()));
1563:                }
1564:
1565:            }
1566:
1567:            /**
1568:             * @param double domainMaximum
1569:             *        Set the maximum value of the domain axis.
1570:             */
1571:            public void setDomainMaximum(double domainMaximum) {
1572:                this .domainMaximum = domainMaximum;
1573:            }
1574:
1575:            public String getNoDataMessage() {
1576:                return noDataMessage;
1577:            }
1578:
1579:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.