Source Code Cross Referenced for XYItemRenderer.java in  » Chart » jfreechart » org » jfree » chart » renderer » xy » 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 » Chart » jfreechart » org.jfree.chart.renderer.xy 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


0001:        /* ===========================================================
0002:         * JFreeChart : a free chart library for the Java(tm) platform
0003:         * ===========================================================
0004:         *
0005:         * (C) Copyright 2000-2007, by Object Refinery Limited and Contributors.
0006:         *
0007:         * Project Info:  http://www.jfree.org/jfreechart/index.html
0008:         *
0009:         * This library is free software; you can redistribute it and/or modify it 
0010:         * under the terms of the GNU Lesser General Public License as published by 
0011:         * the Free Software Foundation; either version 2.1 of the License, or 
0012:         * (at your option) any later version.
0013:         *
0014:         * This library is distributed in the hope that it will be useful, but 
0015:         * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
0016:         * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 
0017:         * License for more details.
0018:         *
0019:         * You should have received a copy of the GNU Lesser General Public
0020:         * License along with this library; if not, write to the Free Software
0021:         * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, 
0022:         * USA.  
0023:         *
0024:         * [Java is a trademark or registered trademark of Sun Microsystems, Inc. 
0025:         * in the United States and other countries.]
0026:         *
0027:         * -------------------
0028:         * XYItemRenderer.java
0029:         * -------------------
0030:         * (C) Copyright 2001-2007, by Object Refinery Limited and Contributors.
0031:         *
0032:         * Original Author:  David Gilbert (for Object Refinery Limited);
0033:         * Contributor(s):   Mark Watson (www.markwatson.com);
0034:         *                   Sylvain Vieujot;
0035:         *                   Focus Computer Services Limited;
0036:         *                   Richard Atkinson;
0037:         *
0038:         * $Id: XYItemRenderer.java,v 1.16.2.8 2007/04/20 14:23:27 mungady Exp $
0039:         *
0040:         * Changes
0041:         * -------
0042:         * 19-Oct-2001 : Version 1, based on code by Mark Watson (DG);
0043:         * 22-Oct-2001 : Renamed DataSource.java --> Dataset.java etc. (DG);
0044:         * 13-Dec-2001 : Changed return type of drawItem from void --> Shape.  The area
0045:         *               returned can be used as the tooltip region.
0046:         * 23-Jan-2002 : Added DrawInfo parameter to drawItem() method (DG);
0047:         * 28-Mar-2002 : Added a property change listener mechanism.  Now renderers do 
0048:         *               not have to be immutable (DG);
0049:         * 04-Apr-2002 : Added the initialise() method (DG);
0050:         * 09-Apr-2002 : Removed the translated zero from the drawItem method, it can 
0051:         *               be calculated inside the initialise method if it is required.
0052:         *               Added a new getToolTipGenerator() method.  Changed the return 
0053:         *               type for drawItem() to void (DG);
0054:         * 24-May-2002 : Added ChartRenderingInfo the initialise method API (DG);
0055:         * 25-Jun-2002 : Removed redundant import (DG);
0056:         * 20-Aug-2002 : Added get/setURLGenerator methods to interface (DG);
0057:         * 02-Oct-2002 : Fixed errors reported by Checkstyle (DG);
0058:         * 18-Nov-2002 : Added methods for drawing grid lines (DG);
0059:         * 17-Jan-2003 : Moved plot classes into a separate package (DG);
0060:         * 27-Jan-2003 : Added shape lookup table (DG);
0061:         * 05-Jun-2003 : Added domain and range grid bands (sponsored by Focus Computer
0062:         *               Services Ltd) (DG);
0063:         * 27-Jul-2003 : Added getRangeType() to support stacked XY area charts (RA);
0064:         * 16-Sep-2003 : Changed ChartRenderingInfo --> PlotRenderingInfo (DG);
0065:         * 25-Feb-2004 : Replaced CrosshairInfo with CrosshairState.  Renamed 
0066:         *               XYToolTipGenerator --> XYItemLabelGenerator (DG);
0067:         * 26-Feb-2004 : Added lots of new methods (DG);
0068:         * 30-Apr-2004 : Added getRangeExtent() method (DG);
0069:         * 06-May-2004 : Added methods for controlling item label visibility (DG);
0070:         * 13-May-2004 : Removed property change listener mechanism (DG);
0071:         * 18-May-2004 : Added item label font and paint methods (DG);
0072:         * 10-Sep-2004 : Removed redundant getRangeType() method (DG);
0073:         * 06-Oct-2004 : Replaced getRangeExtent() with findRangeBounds() and added 
0074:         *               findDomainBounds (DG);
0075:         * 23-Nov-2004 : Changed drawRangeGridLine() --> drawRangeLine() (DG);
0076:         * 07-Jan-2005 : Removed deprecated method (DG);
0077:         * 24-Feb-2005 : Now extends LegendItemSource (DG);
0078:         * 20-Apr-2005 : Renamed XYLabelGenerator --> XYItemLabelGenerator (DG);
0079:         * ------------- JFREECHART 1.0.x ---------------------------------------------
0080:         * 19-Apr-2007 : Deprecated seriesVisible and seriesVisibleInLegend flags (DG);
0081:         * 20-Apr-2007 : Deprecated paint, fillPaint, outlinePaint, stroke, 
0082:         *               outlineStroke, shape, itemLabelsVisible, itemLabelFont, 
0083:         *               itemLabelPaint, positiveItemLabelPosition, 
0084:         *               negativeItemLabelPosition and createEntities override 
0085:         *               fields (DG);
0086:         *
0087:         */
0088:
0089:        package org.jfree.chart.renderer.xy;
0090:
0091:        import java.awt.Font;
0092:        import java.awt.Graphics2D;
0093:        import java.awt.Paint;
0094:        import java.awt.Shape;
0095:        import java.awt.Stroke;
0096:        import java.awt.geom.Rectangle2D;
0097:
0098:        import org.jfree.chart.LegendItem;
0099:        import org.jfree.chart.LegendItemSource;
0100:        import org.jfree.chart.annotations.XYAnnotation;
0101:        import org.jfree.chart.axis.ValueAxis;
0102:        import org.jfree.chart.event.RendererChangeEvent;
0103:        import org.jfree.chart.event.RendererChangeListener;
0104:        import org.jfree.chart.labels.ItemLabelPosition;
0105:        import org.jfree.chart.labels.XYItemLabelGenerator;
0106:        import org.jfree.chart.labels.XYSeriesLabelGenerator;
0107:        import org.jfree.chart.labels.XYToolTipGenerator;
0108:        import org.jfree.chart.plot.CrosshairState;
0109:        import org.jfree.chart.plot.Marker;
0110:        import org.jfree.chart.plot.PlotRenderingInfo;
0111:        import org.jfree.chart.plot.XYPlot;
0112:        import org.jfree.chart.urls.XYURLGenerator;
0113:        import org.jfree.data.Range;
0114:        import org.jfree.data.xy.XYDataset;
0115:        import org.jfree.ui.Layer;
0116:
0117:        /**
0118:         * Interface for rendering the visual representation of a single (x, y) item on
0119:         * an {@link XYPlot}.
0120:         * <p>
0121:         * To support cloning charts, it is recommended that renderers implement both 
0122:         * the {@link Cloneable} and <code>PublicCloneable</code> interfaces.
0123:         */
0124:        public interface XYItemRenderer extends LegendItemSource {
0125:
0126:            /**
0127:             * Initialises the renderer then returns the number of 'passes' through the
0128:             * data that the renderer will require (usually just one).  This method 
0129:             * will be called before the first item is rendered, giving the renderer 
0130:             * an opportunity to initialise any state information it wants to maintain.
0131:             * The renderer can do nothing if it chooses.
0132:             *
0133:             * @param g2  the graphics device.
0134:             * @param dataArea  the area inside the axes.
0135:             * @param plot  the plot.
0136:             * @param dataset  the dataset.
0137:             * @param info  an optional info collection object to return data back to 
0138:             *              the caller.
0139:             *
0140:             * @return The number of passes the renderer requires.
0141:             */
0142:            public XYItemRendererState initialise(Graphics2D g2,
0143:                    Rectangle2D dataArea, XYPlot plot, XYDataset dataset,
0144:                    PlotRenderingInfo info);
0145:
0146:            /**
0147:             * Returns the number of passes through the data required by the renderer.
0148:             * 
0149:             * @return The pass count.
0150:             */
0151:            public int getPassCount();
0152:
0153:            /**
0154:             * Returns a boolean that indicates whether or not the specified item 
0155:             * should be drawn (this is typically used to hide an entire series).
0156:             * 
0157:             * @param series  the series index.
0158:             * @param item  the item index.
0159:             * 
0160:             * @return A boolean.
0161:             */
0162:            public boolean getItemVisible(int series, int item);
0163:
0164:            /**
0165:             * Returns a boolean that indicates whether or not the specified series 
0166:             * should be drawn (this is typically used to hide an entire series).
0167:             * 
0168:             * @param series  the series index.
0169:             * 
0170:             * @return A boolean.
0171:             */
0172:            public boolean isSeriesVisible(int series);
0173:
0174:            /**
0175:             * Returns the flag that controls the visibility of ALL series.  This flag 
0176:             * overrides the per series and default settings - you must set it to 
0177:             * <code>null</code> if you want the other settings to apply.
0178:             * 
0179:             * @return The flag (possibly <code>null</code>).
0180:             * 
0181:             * @deprecated This method should no longer be used (as of version 1.0.6). 
0182:             *     It is sufficient to rely on {@link #getSeriesVisible(int)} and
0183:             *     {@link #getBaseSeriesVisible()}.
0184:             */
0185:            public Boolean getSeriesVisible();
0186:
0187:            /**
0188:             * Sets the flag that controls the visibility of ALL series and sends a 
0189:             * {@link RendererChangeEvent} to all registered listeners.  This flag 
0190:             * overrides the per series and default settings - you must set it to 
0191:             * <code>null</code> if you want the other settings to apply.
0192:             * 
0193:             * @param visible  the flag (<code>null</code> permitted).
0194:             *
0195:             * @deprecated This method should no longer be used (as of version 1.0.6). 
0196:             *     It is sufficient to rely on {@link #setSeriesVisible(int, Boolean)} 
0197:             *     and {@link #setBaseSeriesVisible(boolean)}.
0198:             */
0199:            public void setSeriesVisible(Boolean visible);
0200:
0201:            /**
0202:             * Sets the flag that controls the visibility of ALL series and sends a 
0203:             * {@link RendererChangeEvent} to all registered listeners.  This flag 
0204:             * overrides the per series and default settings - you must set it to 
0205:             * <code>null</code> if you want the other settings to apply.
0206:             * 
0207:             * @param visible  the flag (<code>null</code> permitted).
0208:             * @param notify  notify listeners?
0209:             *
0210:             * @deprecated This method should no longer be used (as of version 1.0.6). 
0211:             *     It is sufficient to rely on {@link #setSeriesVisible(int, Boolean, 
0212:             *     boolean)} and {@link #setBaseSeriesVisible(boolean, boolean)}.
0213:             */
0214:            public void setSeriesVisible(Boolean visible, boolean notify);
0215:
0216:            /**
0217:             * Returns the flag that controls whether a series is visible.
0218:             *
0219:             * @param series  the series index (zero-based).
0220:             *
0221:             * @return The flag (possibly <code>null</code>).
0222:             */
0223:            public Boolean getSeriesVisible(int series);
0224:
0225:            /**
0226:             * Sets the flag that controls whether a series is visible and sends a 
0227:             * {@link RendererChangeEvent} to all registered listeners.
0228:             *
0229:             * @param series  the series index (zero-based).
0230:             * @param visible  the flag (<code>null</code> permitted).
0231:             */
0232:            public void setSeriesVisible(int series, Boolean visible);
0233:
0234:            /**
0235:             * Sets the flag that controls whether a series is visible and, if 
0236:             * requested, sends a {@link RendererChangeEvent} to all registered 
0237:             * listeners.
0238:             * 
0239:             * @param series  the series index.
0240:             * @param visible  the flag (<code>null</code> permitted).
0241:             * @param notify  notify listeners?
0242:             */
0243:            public void setSeriesVisible(int series, Boolean visible,
0244:                    boolean notify);
0245:
0246:            /**
0247:             * Returns the base visibility for all series.
0248:             *
0249:             * @return The base visibility.
0250:             */
0251:            public boolean getBaseSeriesVisible();
0252:
0253:            /**
0254:             * Sets the base visibility and sends a {@link RendererChangeEvent} to all
0255:             * registered listeners.
0256:             *
0257:             * @param visible  the flag.
0258:             */
0259:            public void setBaseSeriesVisible(boolean visible);
0260:
0261:            /**
0262:             * Sets the base visibility and, if requested, sends 
0263:             * a {@link RendererChangeEvent} to all registered listeners.
0264:             * 
0265:             * @param visible  the visibility.
0266:             * @param notify  notify listeners?
0267:             */
0268:            public void setBaseSeriesVisible(boolean visible, boolean notify);
0269:
0270:            // SERIES VISIBLE IN LEGEND (not yet respected by all renderers)
0271:
0272:            /**
0273:             * Returns <code>true</code> if the series should be shown in the legend,
0274:             * and <code>false</code> otherwise.
0275:             * 
0276:             * @param series  the series index.
0277:             * 
0278:             * @return A boolean.
0279:             */
0280:            public boolean isSeriesVisibleInLegend(int series);
0281:
0282:            /**
0283:             * Returns the flag that controls the visibility of ALL series in the 
0284:             * legend.  This flag overrides the per series and default settings - you 
0285:             * must set it to <code>null</code> if you want the other settings to 
0286:             * apply.
0287:             * 
0288:             * @return The flag (possibly <code>null</code>).
0289:             * 
0290:             * @deprecated This method should no longer be used (as of version 1.0.6). 
0291:             *     It is sufficient to rely on {@link #getSeriesVisibleInLegend(int)} 
0292:             *     and {@link #getBaseSeriesVisibleInLegend()}.
0293:             */
0294:            public Boolean getSeriesVisibleInLegend();
0295:
0296:            /**
0297:             * Sets the flag that controls the visibility of ALL series in the legend 
0298:             * and sends a {@link RendererChangeEvent} to all registered listeners.  
0299:             * This flag overrides the per series and default settings - you must set 
0300:             * it to <code>null</code> if you want the other settings to apply.
0301:             * 
0302:             * @param visible  the flag (<code>null</code> permitted).
0303:             * 
0304:             * @deprecated This method should no longer be used (as of version 1.0.6). 
0305:             *     It is sufficient to rely on {@link #setSeriesVisibleInLegend(int, 
0306:             *     Boolean)} and {@link #setBaseSeriesVisibleInLegend(boolean)}.
0307:             */
0308:            public void setSeriesVisibleInLegend(Boolean visible);
0309:
0310:            /**
0311:             * Sets the flag that controls the visibility of ALL series in the legend 
0312:             * and sends a {@link RendererChangeEvent} to all registered listeners.  
0313:             * This flag overrides the per series and default settings - you must set 
0314:             * it to <code>null</code> if you want the other settings to apply.
0315:             * 
0316:             * @param visible  the flag (<code>null</code> permitted).
0317:             * @param notify  notify listeners?
0318:             * 
0319:             * @deprecated This method should no longer be used (as of version 1.0.6). 
0320:             *     It is sufficient to rely on {@link #setSeriesVisibleInLegend(int, 
0321:             *     Boolean, boolean)} and {@link #setBaseSeriesVisibleInLegend(boolean,
0322:             *     boolean)}.
0323:             */
0324:            public void setSeriesVisibleInLegend(Boolean visible, boolean notify);
0325:
0326:            /**
0327:             * Returns the flag that controls whether a series is visible in the 
0328:             * legend.  This method returns only the "per series" settings - to 
0329:             * incorporate the override and base settings as well, you need to use the 
0330:             * {@link #isSeriesVisibleInLegend(int)} method.
0331:             *
0332:             * @param series  the series index (zero-based).
0333:             *
0334:             * @return The flag (possibly <code>null</code>).
0335:             */
0336:            public Boolean getSeriesVisibleInLegend(int series);
0337:
0338:            /**
0339:             * Sets the flag that controls whether a series is visible in the legend 
0340:             * and sends a {@link RendererChangeEvent} to all registered listeners.
0341:             *
0342:             * @param series  the series index (zero-based).
0343:             * @param visible  the flag (<code>null</code> permitted).
0344:             */
0345:            public void setSeriesVisibleInLegend(int series, Boolean visible);
0346:
0347:            /**
0348:             * Sets the flag that controls whether a series is visible in the legend
0349:             * and, if requested, sends a {@link RendererChangeEvent} to all registered 
0350:             * listeners.
0351:             * 
0352:             * @param series  the series index.
0353:             * @param visible  the flag (<code>null</code> permitted).
0354:             * @param notify  notify listeners?
0355:             */
0356:            public void setSeriesVisibleInLegend(int series, Boolean visible,
0357:                    boolean notify);
0358:
0359:            /**
0360:             * Returns the base visibility in the legend for all series.
0361:             *
0362:             * @return The base visibility.
0363:             */
0364:            public boolean getBaseSeriesVisibleInLegend();
0365:
0366:            /**
0367:             * Sets the base visibility in the legend and sends a 
0368:             * {@link RendererChangeEvent} to all registered listeners.
0369:             *
0370:             * @param visible  the flag.
0371:             */
0372:            public void setBaseSeriesVisibleInLegend(boolean visible);
0373:
0374:            /**
0375:             * Sets the base visibility in the legend and, if requested, sends 
0376:             * a {@link RendererChangeEvent} to all registered listeners.
0377:             * 
0378:             * @param visible  the visibility.
0379:             * @param notify  notify listeners?
0380:             */
0381:            public void setBaseSeriesVisibleInLegend(boolean visible,
0382:                    boolean notify);
0383:
0384:            // PAINT
0385:
0386:            /**
0387:             * Returns the paint used to fill data items as they are drawn.
0388:             *
0389:             * @param row  the row (or series) index (zero-based).
0390:             * @param column  the column (or category) index (zero-based).
0391:             *
0392:             * @return The paint (never <code>null</code>).
0393:             */
0394:            public Paint getItemPaint(int row, int column);
0395:
0396:            /**
0397:             * Returns the paint used to fill an item drawn by the renderer.
0398:             *
0399:             * @param series  the series index (zero-based).
0400:             *
0401:             * @return The paint (possibly <code>null</code>).
0402:             */
0403:            public Paint getSeriesPaint(int series);
0404:
0405:            /**
0406:             * Sets the paint to be used for ALL series, and sends a 
0407:             * {@link RendererChangeEvent} to all registered listeners.  If this is 
0408:             * <code>null</code>, the renderer will use the paint for the series.
0409:             * 
0410:             * @param paint  the paint (<code>null</code> permitted).
0411:             * 
0412:             * @deprecated This method should no longer be used (as of version 1.0.6). 
0413:             *     It is sufficient to rely on {@link #setSeriesPaint(int, Paint)} and 
0414:             *     {@link #setBasePaint(Paint)}.
0415:             */
0416:            public void setPaint(Paint paint);
0417:
0418:            /**
0419:             * Sets the paint used for a series and sends a {@link RendererChangeEvent}
0420:             * to all registered listeners.
0421:             *
0422:             * @param series  the series index (zero-based).
0423:             * @param paint  the paint (<code>null</code> permitted).
0424:             */
0425:            public void setSeriesPaint(int series, Paint paint);
0426:
0427:            // FIXME: add setSeriesPaint(int, Paint, boolean)?
0428:
0429:            /**
0430:             * Returns the base paint.
0431:             *
0432:             * @return The base paint (never <code>null</code>).
0433:             */
0434:            public Paint getBasePaint();
0435:
0436:            /**
0437:             * Sets the base paint and sends a {@link RendererChangeEvent} to all 
0438:             * registered listeners.
0439:             *
0440:             * @param paint  the paint (<code>null</code> not permitted).
0441:             */
0442:            public void setBasePaint(Paint paint);
0443:
0444:            // FIXME: add setBasePaint(int, Paint, boolean)?
0445:
0446:            //    // FILL PAINT
0447:            //    
0448:            //    /**
0449:            //     * Returns the paint used to fill data items as they are drawn.
0450:            //     *
0451:            //     * @param row  the row (or series) index (zero-based).
0452:            //     * @param column  the column (or category) index (zero-based).
0453:            //     *
0454:            //     * @return The paint (never <code>null</code>).
0455:            //     */
0456:            //    public Paint getItemFillPaint(int row, int column);
0457:            //
0458:            //    /**
0459:            //     * Returns the paint used to fill an item drawn by the renderer.
0460:            //     *
0461:            //     * @param series  the series index (zero-based).
0462:            //     *
0463:            //     * @return The paint (possibly <code>null</code>).
0464:            //     */
0465:            //    public Paint getSeriesFillPaint(int series);
0466:            //    
0467:            //    /**
0468:            //     * Sets the paint used for a series and sends a {@link RendererChangeEvent}
0469:            //     * to all registered listeners.
0470:            //     *
0471:            //     * @param series  the series index (zero-based).
0472:            //     * @param paint  the paint (<code>null</code> permitted).
0473:            //     */
0474:            //    public void setSeriesFillPaint(int series, Paint paint);
0475:            //    
0476:            //    // FIXME: add setSeriesFillPaint(int, Paint, boolean)?
0477:            //    
0478:            //    /**
0479:            //     * Returns the base paint.
0480:            //     *
0481:            //     * @return The base paint (never <code>null</code>).
0482:            //     */
0483:            //    public Paint getBaseFillPaint();
0484:            //
0485:            //    /**
0486:            //     * Sets the base paint and sends a {@link RendererChangeEvent} to all 
0487:            //     * registered listeners.
0488:            //     *
0489:            //     * @param paint  the paint (<code>null</code> not permitted).
0490:            //     */
0491:            //    public void setBaseFillPaint(Paint paint);
0492:            //    
0493:            //    // FIXME: add setBaseFillPaint(int, Paint, boolean)?
0494:
0495:            // OUTLINE PAINT
0496:
0497:            /**
0498:             * Returns the paint used to outline data items as they are drawn.
0499:             *
0500:             * @param row  the row (or series) index (zero-based).
0501:             * @param column  the column (or category) index (zero-based).
0502:             *
0503:             * @return The paint (never <code>null</code>).
0504:             */
0505:            public Paint getItemOutlinePaint(int row, int column);
0506:
0507:            /**
0508:             * Returns the paint used to outline an item drawn by the renderer.
0509:             *
0510:             * @param series  the series (zero-based index).
0511:             *
0512:             * @return The paint (possibly <code>null</code>).
0513:             */
0514:            public Paint getSeriesOutlinePaint(int series);
0515:
0516:            /**
0517:             * Sets the paint used for a series outline and sends a 
0518:             * {@link RendererChangeEvent} to all registered listeners.
0519:             *
0520:             * @param series  the series index (zero-based).
0521:             * @param paint  the paint (<code>null</code> permitted).
0522:             */
0523:            public void setSeriesOutlinePaint(int series, Paint paint);
0524:
0525:            // FIXME: add setSeriesOutlinePaint(int, Paint, boolean)?
0526:
0527:            /**
0528:             * Sets the outline paint for ALL series (optional).
0529:             * 
0530:             * @param paint  the paint (<code>null</code> permitted).
0531:             * 
0532:             * @deprecated This method should no longer be used (as of version 1.0.6). 
0533:             *     It is sufficient to rely on {@link #setSeriesOutlinePaint(int, 
0534:             *     Paint)} and {@link #setBaseOutlinePaint(Paint)}.
0535:             */
0536:            public void setOutlinePaint(Paint paint);
0537:
0538:            /**
0539:             * Returns the base outline paint.
0540:             *
0541:             * @return The paint (never <code>null</code>).
0542:             */
0543:            public Paint getBaseOutlinePaint();
0544:
0545:            /**
0546:             * Sets the base outline paint and sends a {@link RendererChangeEvent} to
0547:             * all registered listeners.
0548:             *
0549:             * @param paint  the paint (<code>null</code> not permitted).
0550:             */
0551:            public void setBaseOutlinePaint(Paint paint);
0552:
0553:            // FIXME: add setBaseOutlinePaint(Paint, boolean)?
0554:
0555:            // STROKE
0556:
0557:            /**
0558:             * Returns the stroke used to draw data items.
0559:             *
0560:             * @param row  the row (or series) index (zero-based).
0561:             * @param column  the column (or category) index (zero-based).
0562:             *
0563:             * @return The stroke (never <code>null</code>).
0564:             */
0565:            public Stroke getItemStroke(int row, int column);
0566:
0567:            /**
0568:             * Returns the stroke used to draw the items in a series.
0569:             *
0570:             * @param series  the series (zero-based index).
0571:             *
0572:             * @return The stroke (possibly <code>null</code>).
0573:             */
0574:            public Stroke getSeriesStroke(int series);
0575:
0576:            /**
0577:             * Sets the stroke for ALL series and sends a {@link RendererChangeEvent} 
0578:             * to all registered listeners.
0579:             * 
0580:             * @param stroke  the stroke (<code>null</code> permitted).
0581:             * 
0582:             * @deprecated This method should no longer be used (as of version 1.0.6). 
0583:             *     It is sufficient to rely on {@link #setSeriesStroke(int, Stroke)} 
0584:             *     and {@link #setBaseStroke(Stroke)}.
0585:             */
0586:            public void setStroke(Stroke stroke);
0587:
0588:            /**
0589:             * Sets the stroke used for a series and sends a 
0590:             * {@link RendererChangeEvent} to all registered listeners.
0591:             *
0592:             * @param series  the series index (zero-based).
0593:             * @param stroke  the stroke (<code>null</code> permitted).
0594:             */
0595:            public void setSeriesStroke(int series, Stroke stroke);
0596:
0597:            // FIXME: add setSeriesStroke(int, Stroke, boolean) ?
0598:
0599:            /**
0600:             * Returns the base stroke.
0601:             *
0602:             * @return The base stroke (never <code>null</code>).
0603:             */
0604:            public Stroke getBaseStroke();
0605:
0606:            /**
0607:             * Sets the base stroke.
0608:             *
0609:             * @param stroke  the stroke (<code>null</code> not permitted).
0610:             */
0611:            public void setBaseStroke(Stroke stroke);
0612:
0613:            // FIXME: add setBaseStroke(Stroke, boolean) ?
0614:
0615:            // OUTLINE STROKE 
0616:
0617:            /**
0618:             * Returns the stroke used to outline data items.  The default 
0619:             * implementation passes control to the lookupSeriesOutlineStroke method.
0620:             * You can override this method if you require different behaviour.
0621:             *
0622:             * @param row  the row (or series) index (zero-based).
0623:             * @param column  the column (or category) index (zero-based).
0624:             *
0625:             * @return The stroke (never <code>null</code>).
0626:             */
0627:            public Stroke getItemOutlineStroke(int row, int column);
0628:
0629:            /**
0630:             * Returns the stroke used to outline the items in a series.
0631:             *
0632:             * @param series  the series (zero-based index).
0633:             *
0634:             * @return The stroke (possibly <code>null</code>).
0635:             */
0636:            public Stroke getSeriesOutlineStroke(int series);
0637:
0638:            /**
0639:             * Sets the outline stroke for ALL series and sends a 
0640:             * {@link RendererChangeEvent} to all registered listeners.
0641:             *
0642:             * @param stroke  the stroke (<code>null</code> permitted).
0643:             * 
0644:             * @deprecated This method should no longer be used (as of version 1.0.6). 
0645:             *     It is sufficient to rely on {@link #setSeriesOutlineStroke(int, 
0646:             *     Stroke)} and {@link #setBaseOutlineStroke(Stroke)}.
0647:             */
0648:            public void setOutlineStroke(Stroke stroke);
0649:
0650:            /**
0651:             * Sets the outline stroke used for a series and sends a 
0652:             * {@link RendererChangeEvent} to all registered listeners.
0653:             *
0654:             * @param series  the series index (zero-based).
0655:             * @param stroke  the stroke (<code>null</code> permitted).
0656:             */
0657:            public void setSeriesOutlineStroke(int series, Stroke stroke);
0658:
0659:            // FIXME: add setSeriesOutlineStroke(int, Stroke, boolean) ?
0660:
0661:            /**
0662:             * Returns the base outline stroke.
0663:             *
0664:             * @return The stroke (never <code>null</code>).
0665:             */
0666:            public Stroke getBaseOutlineStroke();
0667:
0668:            /**
0669:             * Sets the base outline stroke and sends a {@link RendererChangeEvent} to
0670:             * all registered listeners.
0671:             *
0672:             * @param stroke  the stroke (<code>null</code> not permitted).
0673:             */
0674:            public void setBaseOutlineStroke(Stroke stroke);
0675:
0676:            // FIXME: add setBaseOutlineStroke(Stroke, boolean) ?
0677:
0678:            // SHAPE
0679:
0680:            /**
0681:             * Returns a shape used to represent a data item.
0682:             *
0683:             * @param row  the row (or series) index (zero-based).
0684:             * @param column  the column (or category) index (zero-based).
0685:             *
0686:             * @return The shape (never <code>null</code>).
0687:             */
0688:            public Shape getItemShape(int row, int column);
0689:
0690:            /**
0691:             * Returns a shape used to represent the items in a series.
0692:             *
0693:             * @param series  the series (zero-based index).
0694:             *
0695:             * @return The shape (possibly <code>null</code>).
0696:             */
0697:            public Shape getSeriesShape(int series);
0698:
0699:            /**
0700:             * Sets the shape for ALL series (optional) and sends a 
0701:             * {@link RendererChangeEvent} to all registered listeners.
0702:             * 
0703:             * @param shape  the shape (<code>null</code> permitted).
0704:             * 
0705:             * @deprecated This method should no longer be used (as of version 1.0.6). 
0706:             *     It is sufficient to rely on {@link #setSeriesShape(int, Shape)} and 
0707:             *     {@link #setBaseShape(Shape)}.
0708:             */
0709:            public void setShape(Shape shape);
0710:
0711:            /**
0712:             * Sets the shape used for a series and sends a {@link RendererChangeEvent}
0713:             * to all registered listeners.
0714:             *
0715:             * @param series  the series index (zero-based).
0716:             * @param shape  the shape (<code>null</code> permitted).
0717:             */
0718:            public void setSeriesShape(int series, Shape shape);
0719:
0720:            // FIXME: add setSeriesShape(int, Shape, boolean) ?
0721:
0722:            /**
0723:             * Returns the base shape.
0724:             *
0725:             * @return The shape (never <code>null</code>).
0726:             */
0727:            public Shape getBaseShape();
0728:
0729:            /**
0730:             * Sets the base shape and sends a {@link RendererChangeEvent} to all 
0731:             * registered listeners.
0732:             *
0733:             * @param shape  the shape (<code>null</code> not permitted).
0734:             */
0735:            public void setBaseShape(Shape shape);
0736:
0737:            // FIXME: add setBaseShape(Shape, boolean) ?
0738:
0739:            // ITEM LABELS VISIBLE 
0740:
0741:            /**
0742:             * Returns <code>true</code> if an item label is visible, and 
0743:             * <code>false</code> otherwise.
0744:             * 
0745:             * @param row  the row index (zero-based).
0746:             * @param column  the column index (zero-based).
0747:             * 
0748:             * @return A boolean.
0749:             */
0750:            public boolean isItemLabelVisible(int row, int column);
0751:
0752:            /**
0753:             * Returns <code>true</code> if the item labels for a series are visible,
0754:             * and <code>false</code> otherwise.
0755:             * 
0756:             * @param series  the series index (zero-based).
0757:             * 
0758:             * @return A boolean.
0759:             */
0760:            public boolean isSeriesItemLabelsVisible(int series);
0761:
0762:            /**
0763:             * Sets a flag that controls whether or not the item labels for ALL series
0764:             * are visible.
0765:             * 
0766:             * @param visible  the flag.
0767:             * 
0768:             * @deprecated This method should no longer be used (as of version 1.0.6). 
0769:             *     It is sufficient to rely on {@link #setSeriesItemLabelsVisible(int, 
0770:             *     Boolean)} and {@link #setBaseItemLabelsVisible(boolean)}.
0771:             */
0772:            public void setItemLabelsVisible(boolean visible);
0773:
0774:            /**
0775:             * Sets a flag that controls whether or not the item labels for ALL series
0776:             * are visible.
0777:             * 
0778:             * @param visible  the flag (<code>null</code> permitted).
0779:             * 
0780:             * @deprecated This method should no longer be used (as of version 1.0.6). 
0781:             *     It is sufficient to rely on {@link #setSeriesItemLabelsVisible(int, 
0782:             *     Boolean)} and {@link #setBaseItemLabelsVisible(boolean)}.
0783:             */
0784:            public void setItemLabelsVisible(Boolean visible);
0785:
0786:            /**
0787:             * Sets the visibility of item labels for ALL series and, if requested, 
0788:             * sends a {@link RendererChangeEvent} to all registered listeners.
0789:             * 
0790:             * @param visible  a flag that controls whether or not the item labels are
0791:             *                 visible (<code>null</code> permitted).
0792:             * @param notify  a flag that controls whether or not listeners are 
0793:             *                notified.
0794:             *                
0795:             * @deprecated This method should no longer be used (as of version 1.0.6). 
0796:             *     It is sufficient to rely on {@link #setSeriesItemLabelsVisible(int, 
0797:             *     Boolean, boolean)} and {@link #setBaseItemLabelsVisible(Boolean, 
0798:             *     boolean)}.
0799:             */
0800:            public void setItemLabelsVisible(Boolean visible, boolean notify);
0801:
0802:            /**
0803:             * Sets a flag that controls the visibility of the item labels for a series.
0804:             * 
0805:             * @param series  the series index (zero-based).
0806:             * @param visible  the flag.
0807:             */
0808:            public void setSeriesItemLabelsVisible(int series, boolean visible);
0809:
0810:            /**
0811:             * Sets a flag that controls the visibility of the item labels for a series.
0812:             * 
0813:             * @param series  the series index (zero-based).
0814:             * @param visible  the flag (<code>null</code> permitted).
0815:             */
0816:            public void setSeriesItemLabelsVisible(int series, Boolean visible);
0817:
0818:            /**
0819:             * Sets the visibility of item labels for a series and, if requested, 
0820:             * sends a {@link RendererChangeEvent} to all registered listeners.
0821:             * 
0822:             * @param series  the series index (zero-based).
0823:             * @param visible  the visible flag.
0824:             * @param notify  a flag that controls whether or not listeners are 
0825:             *                notified.
0826:             */
0827:            public void setSeriesItemLabelsVisible(int series, Boolean visible,
0828:                    boolean notify);
0829:
0830:            /**
0831:             * Returns the base setting for item label visibility.
0832:             * 
0833:             * @return A flag (possibly <code>null</code>).
0834:             */
0835:            public Boolean getBaseItemLabelsVisible();
0836:
0837:            /**
0838:             * Sets the base flag that controls whether or not item labels are visible.
0839:             * 
0840:             * @param visible  the flag.
0841:             */
0842:            public void setBaseItemLabelsVisible(boolean visible);
0843:
0844:            /**
0845:             * Sets the base setting for item label visibility.
0846:             * 
0847:             * @param visible  the flag (<code>null</code> permitted).
0848:             */
0849:            public void setBaseItemLabelsVisible(Boolean visible);
0850:
0851:            /**
0852:             * Sets the base visibility for item labels and, if requested, sends a 
0853:             * {@link RendererChangeEvent} to all registered listeners.
0854:             * 
0855:             * @param visible  the visibility flag.
0856:             * @param notify  a flag that controls whether or not listeners are
0857:             *                notified.
0858:             */
0859:            public void setBaseItemLabelsVisible(Boolean visible, boolean notify);
0860:
0861:            // ITEM LABEL GENERATOR
0862:
0863:            /**
0864:             * Returns the item label generator for a data item.
0865:             *
0866:             * @param row  the row index (zero based).
0867:             * @param column  the column index (zero based).
0868:             *
0869:             * @return The generator (possibly <code>null</code>).
0870:             */
0871:            public XYItemLabelGenerator getItemLabelGenerator(int row,
0872:                    int column);
0873:
0874:            /**
0875:             * Returns the item label generator for a series.
0876:             *
0877:             * @param series  the series index (zero based).
0878:             *
0879:             * @return The generator (possibly <code>null</code>).
0880:             */
0881:            public XYItemLabelGenerator getSeriesItemLabelGenerator(int series);
0882:
0883:            /**
0884:             * Sets the item label generator for ALL series and sends a 
0885:             * {@link RendererChangeEvent} to all registered listeners.
0886:             *
0887:             * @param generator  the generator (<code>null</code> permitted).
0888:             * 
0889:             * @deprecated As of version 1.0.6, this override setting should not be
0890:             *     used.  You can use the base setting instead 
0891:             *     ({@link #setBaseItemLabelGenerator(XYItemLabelGenerator)}).
0892:             */
0893:            public void setItemLabelGenerator(XYItemLabelGenerator generator);
0894:
0895:            /**
0896:             * Sets the item label generator for a series and sends a 
0897:             * {@link RendererChangeEvent} to all registered listeners.
0898:             *
0899:             * @param series  the series index (zero based).
0900:             * @param generator  the generator (<code>null</code> permitted).
0901:             */
0902:            public void setSeriesItemLabelGenerator(int series,
0903:                    XYItemLabelGenerator generator);
0904:
0905:            /**
0906:             * Returns the base item label generator.
0907:             *
0908:             * @return The generator (possibly <code>null</code>).
0909:             */
0910:            public XYItemLabelGenerator getBaseItemLabelGenerator();
0911:
0912:            /**
0913:             * Sets the base item label generator and sends a 
0914:             * {@link RendererChangeEvent} to all registered listeners.
0915:             *
0916:             * @param generator  the generator (<code>null</code> permitted).
0917:             */
0918:            public void setBaseItemLabelGenerator(XYItemLabelGenerator generator);
0919:
0920:            // TOOL TIP GENERATOR
0921:
0922:            /**
0923:             * Returns the tool tip generator for a data item.
0924:             *
0925:             * @param row  the row index (zero based).
0926:             * @param column  the column index (zero based).
0927:             *
0928:             * @return The generator (possibly <code>null</code>).
0929:             */
0930:            public XYToolTipGenerator getToolTipGenerator(int row, int column);
0931:
0932:            /**
0933:             * Returns the tool tip generator for a series.
0934:             *
0935:             * @param series  the series index (zero based).
0936:             *
0937:             * @return The generator (possibly <code>null</code>).
0938:             */
0939:            public XYToolTipGenerator getSeriesToolTipGenerator(int series);
0940:
0941:            /**
0942:             * Sets the tool tip generator for ALL series and sends a 
0943:             * {@link RendererChangeEvent} to all registered listeners.
0944:             *
0945:             * @param generator  the generator (<code>null</code> permitted).
0946:             * 
0947:             * @deprecated As of version 1.0.6, this override setting should not be
0948:             *     used.  You can use the base setting instead 
0949:             *     ({@link #setBaseToolTipGenerator(XYToolTipGenerator)}).
0950:             */
0951:            public void setToolTipGenerator(XYToolTipGenerator generator);
0952:
0953:            /**
0954:             * Sets the tool tip generator for a series and sends a 
0955:             * {@link RendererChangeEvent} to all registered listeners.
0956:             *
0957:             * @param series  the series index (zero based).
0958:             * @param generator  the generator (<code>null</code> permitted).
0959:             */
0960:            public void setSeriesToolTipGenerator(int series,
0961:                    XYToolTipGenerator generator);
0962:
0963:            /**
0964:             * Returns the base tool tip generator.
0965:             *
0966:             * @return The generator (possibly <code>null</code>).
0967:             */
0968:            public XYToolTipGenerator getBaseToolTipGenerator();
0969:
0970:            /**
0971:             * Sets the base tool tip generator and sends a {@link RendererChangeEvent}
0972:             * to all registered listeners.
0973:             *
0974:             * @param generator  the generator (<code>null</code> permitted).
0975:             */
0976:            public void setBaseToolTipGenerator(XYToolTipGenerator generator);
0977:
0978:            // URL GENERATOR
0979:
0980:            /**
0981:             * Returns the URL generator for HTML image maps.
0982:             *
0983:             * @return The URL generator (possibly null).
0984:             */
0985:            public XYURLGenerator getURLGenerator();
0986:
0987:            /**
0988:             * Sets the URL generator for HTML image maps.
0989:             *
0990:             * @param urlGenerator the URL generator (null permitted).
0991:             */
0992:            public void setURLGenerator(XYURLGenerator urlGenerator);
0993:
0994:            //// ITEM LABEL FONT ///////////////////////////////////////////////////////
0995:
0996:            /**
0997:             * Returns the font for an item label.
0998:             * 
0999:             * @param row  the row index (zero-based).
1000:             * @param column  the column index (zero-based).
1001:             * 
1002:             * @return The font (never <code>null</code>).
1003:             */
1004:            public Font getItemLabelFont(int row, int column);
1005:
1006:            /**
1007:             * Returns the font used for all item labels.  This may be 
1008:             * <code>null</code>, in which case the per series font settings will apply.
1009:             * 
1010:             * @return The font (possibly <code>null</code>).
1011:             * 
1012:             * @deprecated This method should no longer be used (as of version 1.0.6). 
1013:             *     It is sufficient to rely on {@link #getSeriesItemLabelFont(int)} and
1014:             *     {@link #getBaseItemLabelFont()}.
1015:             */
1016:            public Font getItemLabelFont();
1017:
1018:            /**
1019:             * Sets the item label font for ALL series and sends a 
1020:             * {@link RendererChangeEvent} to all registered listeners.  You can set 
1021:             * this to <code>null</code> if you prefer to set the font on a per series 
1022:             * basis.
1023:             * 
1024:             * @param font  the font (<code>null</code> permitted).
1025:             * 
1026:             * @deprecated This method should no longer be used (as of version 1.0.6). 
1027:             *     It is sufficient to rely on {@link #setSeriesItemLabelFont(int, 
1028:             *     Font)} and {@link #setBaseItemLabelFont(Font)}.
1029:             */
1030:            public void setItemLabelFont(Font font);
1031:
1032:            /**
1033:             * Returns the font for all the item labels in a series.
1034:             * 
1035:             * @param series  the series index (zero-based).
1036:             * 
1037:             * @return The font (possibly <code>null</code>).
1038:             */
1039:            public Font getSeriesItemLabelFont(int series);
1040:
1041:            /**
1042:             * Sets the item label font for a series and sends a 
1043:             * {@link RendererChangeEvent} to all registered listeners.  
1044:             * 
1045:             * @param series  the series index (zero-based).
1046:             * @param font  the font (<code>null</code> permitted).
1047:             */
1048:            public void setSeriesItemLabelFont(int series, Font font);
1049:
1050:            /**
1051:             * Returns the base item label font (this is used when no other font 
1052:             * setting is available).
1053:             * 
1054:             * @return The font (<code>never</code> null).
1055:             */
1056:            public Font getBaseItemLabelFont();
1057:
1058:            /**
1059:             * Sets the base item label font and sends a {@link RendererChangeEvent} 
1060:             * to all registered listeners.  
1061:             * 
1062:             * @param font  the font (<code>null</code> not permitted).
1063:             */
1064:            public void setBaseItemLabelFont(Font font);
1065:
1066:            //// ITEM LABEL PAINT  /////////////////////////////////////////////////////
1067:
1068:            /**
1069:             * Returns the paint used to draw an item label.
1070:             * 
1071:             * @param row  the row index (zero based).
1072:             * @param column  the column index (zero based).
1073:             * 
1074:             * @return The paint (never <code>null</code>).
1075:             */
1076:            public Paint getItemLabelPaint(int row, int column);
1077:
1078:            /**
1079:             * Returns the paint used for all item labels.  This may be 
1080:             * <code>null</code>, in which case the per series paint settings will 
1081:             * apply.
1082:             * 
1083:             * @return The paint (possibly <code>null</code>).
1084:             * 
1085:             * @deprecated This method should no longer be used (as of version 1.0.6). 
1086:             *     It is sufficient to rely on {@link #getSeriesItemLabelPaint(int)} 
1087:             *     and {@link #getBaseItemLabelPaint()}.
1088:             */
1089:            public Paint getItemLabelPaint();
1090:
1091:            /**
1092:             * Sets the item label paint for ALL series and sends a 
1093:             * {@link RendererChangeEvent} to all registered listeners.
1094:             * 
1095:             * @param paint  the paint (<code>null</code> permitted).
1096:             * 
1097:             * @deprecated This method should no longer be used (as of version 1.0.6). 
1098:             *     It is sufficient to rely on {@link #setSeriesItemLabelPaint(int, 
1099:             *     Paint)} and {@link #setBaseItemLabelPaint(Paint)}.
1100:             */
1101:            public void setItemLabelPaint(Paint paint);
1102:
1103:            /**
1104:             * Returns the paint used to draw the item labels for a series.
1105:             * 
1106:             * @param series  the series index (zero based).
1107:             * 
1108:             * @return The paint (possibly <code>null<code>).
1109:             */
1110:            public Paint getSeriesItemLabelPaint(int series);
1111:
1112:            /**
1113:             * Sets the item label paint for a series and sends a 
1114:             * {@link RendererChangeEvent} to all registered listeners.
1115:             * 
1116:             * @param series  the series (zero based index).
1117:             * @param paint  the paint (<code>null</code> permitted).
1118:             */
1119:            public void setSeriesItemLabelPaint(int series, Paint paint);
1120:
1121:            /**
1122:             * Returns the base item label paint.
1123:             * 
1124:             * @return The paint (never <code>null<code>).
1125:             */
1126:            public Paint getBaseItemLabelPaint();
1127:
1128:            /**
1129:             * Sets the base item label paint and sends a {@link RendererChangeEvent} 
1130:             * to all registered listeners.
1131:             * 
1132:             * @param paint  the paint (<code>null</code> not permitted).
1133:             */
1134:            public void setBaseItemLabelPaint(Paint paint);
1135:
1136:            // POSITIVE ITEM LABEL POSITION...
1137:
1138:            /**
1139:             * Returns the item label position for positive values.
1140:             * 
1141:             * @param row  the row index (zero-based).
1142:             * @param column  the column index (zero-based).
1143:             * 
1144:             * @return The item label position (never <code>null</code>).
1145:             */
1146:            public ItemLabelPosition getPositiveItemLabelPosition(int row,
1147:                    int column);
1148:
1149:            /**
1150:             * Returns the item label position for positive values in ALL series.
1151:             * 
1152:             * @return The item label position (possibly <code>null</code>).
1153:             * 
1154:             * @deprecated This method should no longer be used (as of version 1.0.6). 
1155:             *     It is sufficient to rely on 
1156:             *     {@link #getSeriesPositiveItemLabelPosition(int)} 
1157:             *     and {@link #getBasePositiveItemLabelPosition()}.
1158:             */
1159:            public ItemLabelPosition getPositiveItemLabelPosition();
1160:
1161:            /**
1162:             * Sets the item label position for positive values in ALL series, and 
1163:             * sends a {@link RendererChangeEvent} to all registered listeners.  You 
1164:             * need to set this to <code>null</code> to expose the settings for 
1165:             * individual series.
1166:             * 
1167:             * @param position  the position (<code>null</code> permitted).
1168:             * 
1169:             * @deprecated This method should no longer be used (as of version 1.0.6). 
1170:             *     It is sufficient to rely on 
1171:             *     {@link #setSeriesPositiveItemLabelPosition(int, ItemLabelPosition)} 
1172:             *     and {@link #setBasePositiveItemLabelPosition(ItemLabelPosition)}.
1173:             */
1174:            public void setPositiveItemLabelPosition(ItemLabelPosition position);
1175:
1176:            /**
1177:             * Sets the positive item label position for ALL series and (if requested)
1178:             * sends a {@link RendererChangeEvent} to all registered listeners.
1179:             * 
1180:             * @param position  the position (<code>null</code> permitted).
1181:             * @param notify  notify registered listeners?
1182:             * 
1183:             * @deprecated This method should no longer be used (as of version 1.0.6). 
1184:             *     It is sufficient to rely on 
1185:             *     {@link #setSeriesPositiveItemLabelPosition(int, ItemLabelPosition, 
1186:             *     boolean)} and {@link #setBasePositiveItemLabelPosition(
1187:             *     ItemLabelPosition, boolean)}.
1188:             */
1189:            public void setPositiveItemLabelPosition(
1190:                    ItemLabelPosition position, boolean notify);
1191:
1192:            /**
1193:             * Returns the item label position for all positive values in a series.
1194:             * 
1195:             * @param series  the series index (zero-based).
1196:             * 
1197:             * @return The item label position (never <code>null</code>).
1198:             */
1199:            public ItemLabelPosition getSeriesPositiveItemLabelPosition(
1200:                    int series);
1201:
1202:            /**
1203:             * Sets the item label position for all positive values in a series and 
1204:             * sends a {@link RendererChangeEvent} to all registered listeners.
1205:             * 
1206:             * @param series  the series index (zero-based).
1207:             * @param position  the position (<code>null</code> permitted).
1208:             */
1209:            public void setSeriesPositiveItemLabelPosition(int series,
1210:                    ItemLabelPosition position);
1211:
1212:            /**
1213:             * Sets the item label position for all positive values in a series and (if
1214:             * requested) sends a {@link RendererChangeEvent} to all registered 
1215:             * listeners.
1216:             * 
1217:             * @param series  the series index (zero-based).
1218:             * @param position  the position (<code>null</code> permitted).
1219:             * @param notify  notify registered listeners?
1220:             */
1221:            public void setSeriesPositiveItemLabelPosition(int series,
1222:                    ItemLabelPosition position, boolean notify);
1223:
1224:            /**
1225:             * Returns the base positive item label position.
1226:             * 
1227:             * @return The position (never <code>null</code>).
1228:             */
1229:            public ItemLabelPosition getBasePositiveItemLabelPosition();
1230:
1231:            /**
1232:             * Sets the base positive item label position.
1233:             * 
1234:             * @param position  the position (<code>null</code> not permitted).
1235:             */
1236:            public void setBasePositiveItemLabelPosition(
1237:                    ItemLabelPosition position);
1238:
1239:            /**
1240:             * Sets the base positive item label position and, if requested, sends a 
1241:             * {@link RendererChangeEvent} to all registered listeners.
1242:             * 
1243:             * @param position  the position (<code>null</code> not permitted).
1244:             * @param notify  notify registered listeners?
1245:             */
1246:            public void setBasePositiveItemLabelPosition(
1247:                    ItemLabelPosition position, boolean notify);
1248:
1249:            // NEGATIVE ITEM LABEL POSITION...
1250:
1251:            /**
1252:             * Returns the item label position for negative values.  This method can be
1253:             * overridden to provide customisation of the item label position for 
1254:             * individual data items.
1255:             * 
1256:             * @param row  the row index (zero-based).
1257:             * @param column  the column (zero-based).
1258:             * 
1259:             * @return The item label position (never <code>null</code>).
1260:             */
1261:            public ItemLabelPosition getNegativeItemLabelPosition(int row,
1262:                    int column);
1263:
1264:            /**
1265:             * Returns the item label position for negative values in ALL series.
1266:             * 
1267:             * @return The item label position (possibly <code>null</code>).
1268:             * 
1269:             * @deprecated This method should no longer be used (as of version 1.0.6). 
1270:             *     It is sufficient to rely on 
1271:             *     {@link #getSeriesNegativeItemLabelPosition(int)} 
1272:             *     and {@link #getBaseNegativeItemLabelPosition()}.
1273:             */
1274:            public ItemLabelPosition getNegativeItemLabelPosition();
1275:
1276:            /**
1277:             * Sets the item label position for negative values in ALL series, and 
1278:             * sends a {@link RendererChangeEvent} to all registered listeners.  You 
1279:             * need to set this to <code>null</code> to expose the settings for 
1280:             * individual series.
1281:             * 
1282:             * @param position  the position (<code>null</code> permitted).
1283:             * 
1284:             * @deprecated This method should no longer be used (as of version 1.0.6). 
1285:             *     It is sufficient to rely on 
1286:             *     {@link #setSeriesNegativeItemLabelPosition(int, ItemLabelPosition)} 
1287:             *     and {@link #setBaseNegativeItemLabelPosition(ItemLabelPosition)}.
1288:             */
1289:            public void setNegativeItemLabelPosition(ItemLabelPosition position);
1290:
1291:            /**
1292:             * Sets the item label position for negative values in ALL series and (if
1293:             * requested) sends a {@link RendererChangeEvent} to all registered 
1294:             * listeners.  
1295:             * 
1296:             * @param position  the position (<code>null</code> permitted).
1297:             * @param notify  notify registered listeners?
1298:             * 
1299:             * @deprecated This method should no longer be used (as of version 1.0.6). 
1300:             *     It is sufficient to rely on 
1301:             *     {@link #setSeriesNegativeItemLabelPosition(int, ItemLabelPosition, 
1302:             *     boolean)} and {@link #setBaseNegativeItemLabelPosition(
1303:             *     ItemLabelPosition, boolean)}.
1304:             */
1305:            public void setNegativeItemLabelPosition(
1306:                    ItemLabelPosition position, boolean notify);
1307:
1308:            /**
1309:             * Returns the item label position for all negative values in a series.
1310:             * 
1311:             * @param series  the series index (zero-based).
1312:             * 
1313:             * @return The item label position (never <code>null</code>).
1314:             */
1315:            public ItemLabelPosition getSeriesNegativeItemLabelPosition(
1316:                    int series);
1317:
1318:            /**
1319:             * Sets the item label position for negative values in a series and sends a 
1320:             * {@link RendererChangeEvent} to all registered listeners.
1321:             * 
1322:             * @param series  the series index (zero-based).
1323:             * @param position  the position (<code>null</code> permitted).
1324:             */
1325:            public void setSeriesNegativeItemLabelPosition(int series,
1326:                    ItemLabelPosition position);
1327:
1328:            /**
1329:             * Sets the item label position for negative values in a series and (if 
1330:             * requested) sends a {@link RendererChangeEvent} to all registered 
1331:             * listeners.
1332:             * 
1333:             * @param series  the series index (zero-based).
1334:             * @param position  the position (<code>null</code> permitted).
1335:             * @param notify  notify registered listeners?
1336:             */
1337:            public void setSeriesNegativeItemLabelPosition(int series,
1338:                    ItemLabelPosition position, boolean notify);
1339:
1340:            /**
1341:             * Returns the base item label position for negative values.
1342:             * 
1343:             * @return The position (never <code>null</code>).
1344:             */
1345:            public ItemLabelPosition getBaseNegativeItemLabelPosition();
1346:
1347:            /**
1348:             * Sets the base item label position for negative values and sends a 
1349:             * {@link RendererChangeEvent} to all registered listeners.
1350:             * 
1351:             * @param position  the position (<code>null</code> not permitted).
1352:             */
1353:            public void setBaseNegativeItemLabelPosition(
1354:                    ItemLabelPosition position);
1355:
1356:            /**
1357:             * Sets the base negative item label position and, if requested, sends a 
1358:             * {@link RendererChangeEvent} to all registered listeners.
1359:             * 
1360:             * @param position  the position (<code>null</code> not permitted).
1361:             * @param notify  notify registered listeners?
1362:             */
1363:            public void setBaseNegativeItemLabelPosition(
1364:                    ItemLabelPosition position, boolean notify);
1365:
1366:            // CREATE ENTITIES
1367:            // FIXME:  these methods should be defined
1368:
1369:            //    public boolean getItemCreateEntity(int series, int item);
1370:            //    
1371:            //    public Boolean getSeriesCreateEntities(int series);
1372:            //    
1373:            //    public void setSeriesCreateEntities(int series, Boolean create);
1374:            //    
1375:            //    public void setSeriesCreateEntities(int series, Boolean create, 
1376:            //            boolean notify);
1377:            //    
1378:            //    public boolean getBaseCreateEntities();
1379:            //    
1380:            //    public void setBaseCreateEntities(boolean create);
1381:            //    
1382:            //    public void setBaseCreateEntities(boolean create, boolean notify);
1383:
1384:            /**
1385:             * Adds an annotation and sends a {@link RendererChangeEvent} to all 
1386:             * registered listeners.  The annotation is added to the foreground
1387:             * layer.
1388:             * 
1389:             * @param annotation  the annotation (<code>null</code> not permitted).
1390:             */
1391:            public void addAnnotation(XYAnnotation annotation);
1392:
1393:            /**
1394:             * Adds an annotation to the specified layer.
1395:             * 
1396:             * @param annotation  the annotation (<code>null</code> not permitted).
1397:             * @param layer  the layer (<code>null</code> not permitted).
1398:             */
1399:            public void addAnnotation(XYAnnotation annotation, Layer layer);
1400:
1401:            /**
1402:             * Removes the specified annotation and sends a {@link RendererChangeEvent}
1403:             * to all registered listeners.
1404:             * 
1405:             * @param annotation  the annotation to remove (<code>null</code> not 
1406:             *                    permitted).
1407:             * 
1408:             * @return A boolean to indicate whether or not the annotation was 
1409:             *         successfully removed.
1410:             */
1411:            public boolean removeAnnotation(XYAnnotation annotation);
1412:
1413:            /**
1414:             * Removes all annotations and sends a {@link RendererChangeEvent}
1415:             * to all registered listeners.
1416:             */
1417:            public void removeAnnotations();
1418:
1419:            /**
1420:             * Draws all the annotations for the specified layer.
1421:             * 
1422:             * @param g2  the graphics device.
1423:             * @param dataArea  the data area.
1424:             * @param domainAxis  the domain axis.
1425:             * @param rangeAxis  the range axis.
1426:             * @param layer  the layer.
1427:             * @param info  the plot rendering info.
1428:             */
1429:            public void drawAnnotations(Graphics2D g2, Rectangle2D dataArea,
1430:                    ValueAxis domainAxis, ValueAxis rangeAxis, Layer layer,
1431:                    PlotRenderingInfo info);
1432:
1433:            /**
1434:             * Called for each item to be plotted.
1435:             * <p>
1436:             * The {@link XYPlot} can make multiple passes through the dataset, 
1437:             * depending on the value returned by the renderer's initialise() method.
1438:             *
1439:             * @param g2  the graphics device.
1440:             * @param state  the renderer state.
1441:             * @param dataArea  the area within which the data is being rendered.
1442:             * @param info  collects drawing info.
1443:             * @param plot  the plot (can be used to obtain standard color 
1444:             *              information etc).
1445:             * @param domainAxis  the domain axis.
1446:             * @param rangeAxis  the range axis.
1447:             * @param dataset  the dataset.
1448:             * @param series  the series index (zero-based).
1449:             * @param item  the item index (zero-based).
1450:             * @param crosshairState  crosshair information for the plot 
1451:             *                        (<code>null</code> permitted).
1452:             * @param pass  the pass index.
1453:             */
1454:            public void drawItem(Graphics2D g2, XYItemRendererState state,
1455:                    Rectangle2D dataArea, PlotRenderingInfo info, XYPlot plot,
1456:                    ValueAxis domainAxis, ValueAxis rangeAxis,
1457:                    XYDataset dataset, int series, int item,
1458:                    CrosshairState crosshairState, int pass);
1459:
1460:            /**
1461:             * Returns a legend item for a series from a dataset.
1462:             *
1463:             * @param datasetIndex  the dataset index.
1464:             * @param series  the series (zero-based index).
1465:             *
1466:             * @return The legend item (possibly <code>null</code>).
1467:             */
1468:            public LegendItem getLegendItem(int datasetIndex, int series);
1469:
1470:            /**
1471:             * Returns the legend item label generator.
1472:             * 
1473:             * @return The legend item label generator (never <code>null</code>).
1474:             */
1475:            public XYSeriesLabelGenerator getLegendItemLabelGenerator();
1476:
1477:            /**
1478:             * Sets the legend item label generator.
1479:             * 
1480:             * @param generator  the generator (<code>null</code> not permitted).
1481:             */
1482:            public void setLegendItemLabelGenerator(
1483:                    XYSeriesLabelGenerator generator);
1484:
1485:            /**
1486:             * Fills a band between two values on the axis.  This can be used to color 
1487:             * bands between the grid lines.
1488:             *
1489:             * @param g2  the graphics device.
1490:             * @param plot  the plot.
1491:             * @param axis  the domain axis.
1492:             * @param dataArea  the data area.
1493:             * @param start  the start value.
1494:             * @param end  the end value.
1495:             */
1496:            public void fillDomainGridBand(Graphics2D g2, XYPlot plot,
1497:                    ValueAxis axis, Rectangle2D dataArea, double start,
1498:                    double end);
1499:
1500:            /**
1501:             * Fills a band between two values on the range axis.  This can be used to 
1502:             * color bands between the grid lines.
1503:             *
1504:             * @param g2  the graphics device.
1505:             * @param plot  the plot.
1506:             * @param axis  the range axis.
1507:             * @param dataArea  the data area.
1508:             * @param start  the start value.
1509:             * @param end  the end value.
1510:             */
1511:            public void fillRangeGridBand(Graphics2D g2, XYPlot plot,
1512:                    ValueAxis axis, Rectangle2D dataArea, double start,
1513:                    double end);
1514:
1515:            /**
1516:             * Draws a grid line against the domain axis.
1517:             *
1518:             * @param g2  the graphics device.
1519:             * @param plot  the plot.
1520:             * @param axis  the value axis.
1521:             * @param dataArea  the area for plotting data (not yet adjusted for any 
1522:             *                  3D effect).
1523:             * @param value  the value.
1524:             */
1525:            public void drawDomainGridLine(Graphics2D g2, XYPlot plot,
1526:                    ValueAxis axis, Rectangle2D dataArea, double value);
1527:
1528:            /**
1529:             * Draws a grid line against the range axis.
1530:             *
1531:             * @param g2  the graphics device.
1532:             * @param plot  the plot.
1533:             * @param axis  the value axis.
1534:             * @param dataArea  the area for plotting data (not yet adjusted for any 
1535:             *                  3D effect).
1536:             * @param value  the value.
1537:             * @param paint  the paint (<code>null</code> not permitted).
1538:             * @param stroke  the stroke (<code>null</code> not permitted).
1539:             */
1540:            public void drawRangeLine(Graphics2D g2, XYPlot plot,
1541:                    ValueAxis axis, Rectangle2D dataArea, double value,
1542:                    Paint paint, Stroke stroke);
1543:
1544:            /**
1545:             * Draws the specified <code>marker</code> against the domain axis.
1546:             *
1547:             * @param g2  the graphics device.
1548:             * @param plot  the plot.
1549:             * @param axis  the value axis.
1550:             * @param marker  the marker.
1551:             * @param dataArea  the axis data area.
1552:             */
1553:            public void drawDomainMarker(Graphics2D g2, XYPlot plot,
1554:                    ValueAxis axis, Marker marker, Rectangle2D dataArea);
1555:
1556:            /**
1557:             * Draws a horizontal line across the chart to represent a 'range marker'.
1558:             *
1559:             * @param g2  the graphics device.
1560:             * @param plot  the plot.
1561:             * @param axis  the value axis.
1562:             * @param marker  the marker line.
1563:             * @param dataArea  the axis data area.
1564:             */
1565:            public void drawRangeMarker(Graphics2D g2, XYPlot plot,
1566:                    ValueAxis axis, Marker marker, Rectangle2D dataArea);
1567:
1568:            /**
1569:             * Returns the plot that this renderer has been assigned to.
1570:             *
1571:             * @return The plot.
1572:             */
1573:            public XYPlot getPlot();
1574:
1575:            /**
1576:             * Sets the plot that this renderer is assigned to.  This method will be 
1577:             * called by the plot class...you do not need to call it yourself.
1578:             *
1579:             * @param plot  the plot.
1580:             */
1581:            public void setPlot(XYPlot plot);
1582:
1583:            /**
1584:             * Returns the lower and upper bounds (range) of the x-values in the 
1585:             * specified dataset.
1586:             * 
1587:             * @param dataset  the dataset (<code>null</code> permitted).
1588:             * 
1589:             * @return The range.
1590:             */
1591:            public Range findDomainBounds(XYDataset dataset);
1592:
1593:            /**
1594:             * Returns the lower and upper bounds (range) of the y-values in the
1595:             * specified dataset.  The implementation of this method will take 
1596:             * into account the presentation used by the renderers (for example,
1597:             * a renderer that "stacks" values will return a bigger range than
1598:             * a renderer that doesn't.
1599:             * 
1600:             * @param dataset  the dataset (<code>null</code> permitted).
1601:             * 
1602:             * @return The range (or <code>null</code> if the dataset is 
1603:             *         <code>null</code> or empty).
1604:             */
1605:            public Range findRangeBounds(XYDataset dataset);
1606:
1607:            /**
1608:             * Add a renderer change listener.
1609:             * 
1610:             * @param listener  the listener.
1611:             */
1612:            public void addChangeListener(RendererChangeListener listener);
1613:
1614:            /**
1615:             * Removes a change listener.
1616:             * 
1617:             * @param listener  the listener.
1618:             */
1619:            public void removeChangeListener(RendererChangeListener listener);
1620:
1621:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.