/* ===========================================================
* JFreeChart : a free chart library for the Java(tm) platform
* ===========================================================
*
* (C) Copyright 2000-2007, by Object Refinery Limited and Contributors.
*
* Project Info: http://www.jfree.org/jfreechart/index.html
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
* License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
* USA.
*
* [Java is a trademark or registered trademark of Sun Microsystems, Inc.
* in the United States and other countries.]
*
* -----------
* XYPlot.java
* -----------
* (C) Copyright 2000-2007, by Object Refinery Limited and Contributors.
*
* Original Author: David Gilbert (for Object Refinery Limited);
* Contributor(s): Craig MacFarlane;
* Mark Watson (www.markwatson.com);
* Jonathan Nash;
* Gideon Krause;
* Klaus Rheinwald;
* Xavier Poinsard;
* Richard Atkinson;
* Arnaud Lelievre;
* Nicolas Brodu;
* Eduardo Ramalho;
* Sergei Ivanov;
* Richard West, Advanced Micro Devices, Inc.;
*
* Changes (from 21-Jun-2001)
* --------------------------
* 21-Jun-2001 : Removed redundant JFreeChart parameter from constructors (DG);
* 18-Sep-2001 : Updated header and fixed DOS encoding problem (DG);
* 15-Oct-2001 : Data source classes moved to com.jrefinery.data.* (DG);
* 19-Oct-2001 : Removed the code for drawing the visual representation of each
* data point into a separate class StandardXYItemRenderer.
* This will make it easier to add variations to the way the
* charts are drawn. Based on code contributed by Mark
* Watson (DG);
* 22-Oct-2001 : Renamed DataSource.java --> Dataset.java etc. (DG);
* 20-Nov-2001 : Fixed clipping bug that shows up when chart is displayed
* inside JScrollPane (DG);
* 12-Dec-2001 : Removed unnecessary 'throws' clauses from constructor (DG);
* 13-Dec-2001 : Added skeleton code for tooltips. Added new constructor. (DG);
* 16-Jan-2002 : Renamed the tooltips class (DG);
* 22-Jan-2002 : Added DrawInfo class, incorporating tooltips and crosshairs.
* Crosshairs based on code by Jonathan Nash (DG);
* 05-Feb-2002 : Added alpha-transparency setting based on code by Sylvain
* Vieujot (DG);
* 26-Feb-2002 : Updated getMinimumXXX() and getMaximumXXX() methods to handle
* special case when chart is null (DG);
* 28-Feb-2002 : Renamed Datasets.java --> DatasetUtilities.java (DG);
* 28-Mar-2002 : The plot now registers with the renderer as a property change
* listener. Also added a new constructor (DG);
* 09-Apr-2002 : Removed the transRangeZero from the renderer.drawItem()
* method. Moved the tooltip generator into the renderer (DG);
* 23-Apr-2002 : Fixed bug in methods for drawing horizontal and vertical
* lines (DG);
* 13-May-2002 : Small change to the draw() method so that it works for
* OverlaidXYPlot also (DG);
* 25-Jun-2002 : Removed redundant import (DG);
* 20-Aug-2002 : Renamed getItemRenderer() --> getRenderer(), and
* setXYItemRenderer() --> setRenderer() (DG);
* 28-Aug-2002 : Added mechanism for (optional) plot annotations (DG);
* 02-Oct-2002 : Fixed errors reported by Checkstyle (DG);
* 18-Nov-2002 : Added grid settings for both domain and range axis (previously
* these were set in the axes) (DG);
* 09-Jan-2003 : Further additions to the grid settings, plus integrated plot
* border bug fix contributed by Gideon Krause (DG);
* 22-Jan-2003 : Removed monolithic constructor (DG);
* 04-Mar-2003 : Added 'no data' message, see bug report 691634. Added
* secondary range markers using code contributed by Klaus
* Rheinwald (DG);
* 26-Mar-2003 : Implemented Serializable (DG);
* 03-Apr-2003 : Added setDomainAxisLocation() method (DG);
* 30-Apr-2003 : Moved annotation drawing into a separate method (DG);
* 01-May-2003 : Added multi-pass mechanism for renderers (DG);
* 02-May-2003 : Changed axis locations from int to AxisLocation (DG);
* 15-May-2003 : Added an orientation attribute (DG);
* 02-Jun-2003 : Removed range axis compatibility test (DG);
* 05-Jun-2003 : Added domain and range grid bands (sponsored by Focus Computer
* Services Ltd) (DG);
* 26-Jun-2003 : Fixed bug (757303) in getDataRange() method (DG);
* 02-Jul-2003 : Added patch from bug report 698646 (secondary axes for
* overlaid plots) (DG);
* 23-Jul-2003 : Added support for multiple secondary datasets, axes and
* renderers (DG);
* 27-Jul-2003 : Added support for stacked XY area charts (RA);
* 19-Aug-2003 : Implemented Cloneable (DG);
* 01-Sep-2003 : Fixed bug where change to secondary datasets didn't generate
* change event (797466) (DG)
* 08-Sep-2003 : Added internationalization via use of properties
* resourceBundle (RFE 690236) (AL);
* 08-Sep-2003 : Changed ValueAxis API (DG);
* 08-Sep-2003 : Fixes for serialization (NB);
* 16-Sep-2003 : Changed ChartRenderingInfo --> PlotRenderingInfo (DG);
* 17-Sep-2003 : Fixed zooming to include secondary domain axes (DG);
* 18-Sep-2003 : Added getSecondaryDomainAxisCount() and
* getSecondaryRangeAxisCount() methods suggested by Eduardo
* Ramalho (RFE 808548) (DG);
* 23-Sep-2003 : Split domain and range markers into foreground and
* background (DG);
* 06-Oct-2003 : Fixed bug in clearDomainMarkers() and clearRangeMarkers()
* methods. Fixed bug (815876) in addSecondaryRangeMarker()
* method. Added new addSecondaryDomainMarker methods (see bug
* id 815869) (DG);
* 10-Nov-2003 : Added getSecondaryDomain/RangeAxisMappedToDataset() methods
* requested by Eduardo Ramalho (DG);
* 24-Nov-2003 : Removed unnecessary notification when updating axis anchor
* values (DG);
* 21-Jan-2004 : Update for renamed method in ValueAxis (DG);
* 25-Feb-2004 : Replaced CrosshairInfo with CrosshairState (DG);
* 12-Mar-2004 : Fixed bug where primary renderer is always used to determine
* range type (DG);
* 22-Mar-2004 : Fixed cloning bug (DG);
* 23-Mar-2004 : Fixed more cloning bugs (DG);
* 07-Apr-2004 : Fixed problem with axis range when the secondary renderer is
* stacked, see this post in the forum:
* http://www.jfree.org/phpBB2/viewtopic.php?t=8204 (DG);
* 07-Apr-2004 : Added get/setDatasetRenderingOrder() methods (DG);
* 26-Apr-2004 : Added option to fill quadrant areas in the background of the
* plot (DG);
* 27-Apr-2004 : Removed major distinction between primary and secondary
* datasets, renderers and axes (DG);
* 30-Apr-2004 : Modified to make use of the new getRangeExtent() method in the
* renderer interface (DG);
* 13-May-2004 : Added optional fixedLegendItems