    001    /* ===========================================================
    002     * JFreeChart : a free chart library for the Java(tm) platform
    003     * ===========================================================
    004     *
    005     * (C) Copyright 2000-2011, by Object Refinery Limited and Contributors.
    006     *
    007     * Project Info:  http://www.jfree.org/jfreechart/index.html
    008     *
    009     * This library is free software; you can redistribute it and/or modify it
    010     * under the terms of the GNU Lesser General Public License as published by
    011     * the Free Software Foundation; either version 2.1 of the License, or
    012     * (at your option) any later version.
    013     *
    014     * This library is distributed in the hope that it will be useful, but
    015     * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
    016     * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
    017     * License for more details.
    018     *
    019     * You should have received a copy of the GNU Lesser General Public
    020     * License along with this library; if not, write to the Free Software
    021     * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
    022     * USA.
    023     *
    024     * [Oracle and Java are registered trademarks of Oracle and/or its affiliates.
    025     * Other names may be trademarks of their respective owners.]
    026     *
    027     * ----------------------
    028     * IntervalXYDataset.java
    029     * ----------------------
    030     * (C) Copyright 2001-2009, by Object Refinery Limited and Contributors.
    031     *
    032     * Original Author:  Mark Watson (www.markwatson.com);
    033     * Contributor(s):   David Gilbert (for Object Refinery Limited);
    034     *
    035     * Changes
    036     * -------
    037     * 18-Oct-2001 : Version 1, thanks to Mark Watson (DG);
    038     * 22-Oct-2001 : Renamed DataSource.java --> Dataset.java etc (DG);
    039     * 06-May-2004 : Added methods that return double primitives (DG);
    040     * 15-Sep-2009 : Added clarifications to API docs (DG);
    041     *
    042     */
    043
    044    package org.jfree.data.xy;
    045
    046    /**
    047     * An extension of the {@link XYDataset} interface that allows an x-interval
    048     * and a y-interval to be defined.  Note that the x and y values defined
    049     * by the parent interface are NOT required to fall within these intervals.
    050     * This interface is used to support (among other things) bar plots against
    051     * numerical axes.
    052     */
    053    public interface IntervalXYDataset extends XYDataset {
    054
    055        /**
    056         * Returns the lower bound of the x-interval for the specified series and
    057         * item.  If this lower bound is specified, it should be less than or
    058         * equal to the upper bound of the interval (if one is specified).
    059         *
    060         * @param series  the series index (zero-based).
    061         * @param item  the item index (zero-based).
    062         *
    063         * @return The lower bound of the x-interval (<code>null</code> permitted).
    064         */
    065        public Number getStartX(int series, int item);
    066
    067        /**
    068         * Returns the lower bound of the x-interval (as a double primitive) for
    069         * the specified series and item.
    070         *
    071         * @param series  the series (zero-based index).
    072         * @param item  the item (zero-based index).
    073         *
    074         * @return The lower bound of the x-interval.
    075         *
    076         * @see #getStartX(int, int)
    077         */
    078        public double getStartXValue(int series, int item);
    079
    080        /**
    081         * Returns the upper bound of the x-interval for the specified series and
    082         * item.  If this upper bound is specified, it should be greater than or
    083         * equal to the lower bound of the interval (if one is specified).
    084         *
    085         * @param series  the series index (zero-based).
    086         * @param item  the item index (zero-based).
    087         *
    088         * @return The upper bound of the x-interval (<code>null</code> permitted).
    089         */
    090        public Number getEndX(int series, int item);
    091
    092        /**
    093         * Returns the upper bound of the x-interval (as a double primitive) for
    094         * the specified series and item.
    095         *
    096         * @param series  the series index (zero-based).
    097         * @param item  the item index (zero-based).
    098         *
    099         * @return The upper bound of the x-interval.
    100         *
    101         * @see #getEndX(int, int)
    102         */
    103        public double getEndXValue(int series, int item);
    104
    105        /**
    106         * Returns the lower bound of the y-interval for the specified series and
    107         * item.  If this lower bound is specified, it should be less than or
    108         * equal to the upper bound of the interval (if one is specified).
    109         *
    110         * @param series  the series index (zero-based).
    111         * @param item  the item index (zero-based).
    112         *
    113         * @return The lower bound of the y-interval (<code>null</code> permitted).
    114         */
    115        public Number getStartY(int series, int item);
    116
    117        /**
    118         * Returns the lower bound of the y-interval (as a double primitive) for
    119         * the specified series and item.
    120         *
    121         * @param series  the series index (zero-based).
    122         * @param item  the item index (zero-based).
    123         *
    124         * @return The lower bound of the y-interval.
    125         *
    126         * @see #getStartY(int, int)
    127         */
    128        public double getStartYValue(int series, int item);
    129
    130        /**
    131         * Returns the upper bound of the y-interval for the specified series and
    132         * item.  If this upper bound is specified, it should be greater than or
    133         * equal to the lower bound of the interval (if one is specified).
    134         *
    135         * @param series  the series index (zero-based).
    136         * @param item  the item index (zero-based).
    137         *
    138         * @return The upper bound of the y-interval (<code>null</code> permitted).
    139         */
    140        public Number getEndY(int series, int item);
    141
    142        /**
    143         * Returns the upper bound of the y-interval (as a double primitive) for
    144         * the specified series and item.
    145         *
    146         * @param series  the series index (zero-based).
    147         * @param item  the item index (zero-based).
    148         *
    149         * @return The upper bound of the y-interval.
    150         *
    151         * @see #getEndY(int, int)
    152         */
    153        public double getEndYValue(int series, int item);
    154
    155    }