    001    /* ===========================================================
    002     * JFreeChart : a free chart library for the Java(tm) platform
    003     * ===========================================================
    004     *
    005     * (C) Copyright 2000-2007, 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     * [Java is a trademark or registered trademark of Sun Microsystems, Inc.
    025     * in the United States and other countries.]
    026     *
    027     * -------------------------
    028     * GanttCategoryDataset.java
    029     * -------------------------
    030     * (C) Copyright 2003-2007, by Object Refinery Limited.
    031     *
    032     * Original Author:  David Gilbert (for Object Refinery Limited);
    033     * Contributor(s):   -;
    034     *
    035     * Changes
    036     * -------
    037     * 16-Sep-2003 : Version 1, based on MultiIntervalCategoryDataset (DG);
    038     * 23-Sep-2003 : Fixed Checkstyle issues (DG);
    039     *
    040     */
    041
    042     package org.jfree.data.gantt;
    043
    044    import org.jfree.data.category.IntervalCategoryDataset;
    045
    046    /**
    047     * An extension of the {@link IntervalCategoryDataset} interface that adds
    048     * support for multiple sub-intervals.
    049     */
    050    public interface GanttCategoryDataset extends IntervalCategoryDataset {
    051
    052        /**
    053         * Returns the percent complete for a given item.
    054         *
    055         * @param row  the row index (zero-based).
    056         * @param column  the column index (zero-based).
    057         *
    058         * @return The percent complete.
    059         */
    060        public Number getPercentComplete(int row, int column);
    061
    062        /**
    063         * Returns the percent complete for a given item.
    064         *
    065         * @param rowKey  the row key.
    066         * @param columnKey  the column key.
    067         *
    068         * @return The percent complete.
    069         */
    070        public Number getPercentComplete(Comparable rowKey, Comparable columnKey);
    071
    072        /**
    073         * Returns the number of sub-intervals for a given item.
    074         *
    075         * @param row  the row index (zero-based).
    076         * @param column  the column index (zero-based).
    077         *
    078         * @return The sub-interval count.
    079         */
    080        public int getSubIntervalCount(int row, int column);
    081
    082        /**
    083         * Returns the number of sub-intervals for a given item.
    084         *
    085         * @param rowKey  the row key.
    086         * @param columnKey  the column key.
    087         *
    088         * @return The sub-interval count.
    089         */
    090        public int getSubIntervalCount(Comparable rowKey, Comparable columnKey);
    091
    092        /**
    093         * Returns the start value of a sub-interval for a given item.
    094         *
    095         * @param row  the row index (zero-based).
    096         * @param column  the column index (zero-based).
    097         * @param subinterval  the sub-interval index (zero-based).
    098         *
    099         * @return The start value (possibly <code>null</code>).
    100         */
    101        public Number getStartValue(int row, int column, int subinterval);
    102
    103        /**
    104         * Returns the start value of a sub-interval for a given item.
    105         *
    106         * @param rowKey  the row key.
    107         * @param columnKey  the column key.
    108         * @param subinterval  the sub-interval.
    109         *
    110         * @return The start value (possibly <code>null</code>).
    111         */
    112        public Number getStartValue(Comparable rowKey, Comparable columnKey,
    113                                    int subinterval);
    114
    115        /**
    116         * Returns the end value of a sub-interval for a given item.
    117         *
    118         * @param row  the row index (zero-based).
    119         * @param column  the column index (zero-based).
    120         * @param subinterval  the sub-interval.
    121         *
    122         * @return The end value (possibly <code>null</code>).
    123         */
    124        public Number getEndValue(int row, int column, int subinterval);
    125
    126        /**
    127         * Returns the end value of a sub-interval for a given item.
    128         *
    129         * @param rowKey  the row key.
    130         * @param columnKey  the column key.
    131         * @param subinterval  the sub-interval.
    132         *
    133         * @return The end value (possibly <code>null</code>).
    134         */
    135        public Number getEndValue(Comparable rowKey, Comparable columnKey,
    136                                  int subinterval);
    137
    138        /**
    139         * Returns the percentage complete value of a sub-interval for a given item.
    140         *
    141         * @param row  the row index (zero-based).
    142         * @param column  the column index (zero-based).
    143         * @param subinterval  the sub-interval.
    144         *
    145         * @return The percent complete value (possibly <code>null</code>).
    146         */
    147        public Number getPercentComplete(int row, int column, int subinterval);
    148
    149        /**
    150         * Returns the percentage complete value of a sub-interval for a given item.
    151         *
    152         * @param rowKey  the row key.
    153         * @param columnKey  the column key.
    154         * @param subinterval  the sub-interval.
    155         *
    156         * @return The precent complete value (possibly <code>null</code>).
    157         */
    158        public Number getPercentComplete(Comparable rowKey, Comparable columnKey,
    159                                         int subinterval);
    160
    161    }