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