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