Frames | No Frames |
1: /* =========================================================== 2: * JFreeChart : a free chart library for the Java(tm) platform 3: * =========================================================== 4: * 5: * (C) Copyright 2000-2005, by Object Refinery Limited and Contributors. 6: * 7: * Project Info: http://www.jfree.org/jfreechart/index.html 8: * 9: * This library is free software; you can redistribute it and/or modify it 10: * under the terms of the GNU Lesser General Public License as published by 11: * the Free Software Foundation; either version 2.1 of the License, or 12: * (at your option) any later version. 13: * 14: * This library is distributed in the hope that it will be useful, but 15: * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 16: * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 17: * License for more details. 18: * 19: * You should have received a copy of the GNU Lesser General Public 20: * License along with this library; if not, write to the Free Software 21: * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 22: * USA. 23: * 24: * [Java is a trademark or registered trademark of Sun Microsystems, Inc. 25: * in the United States and other countries.] 26: * 27: * ------------------------- 28: * GanttCategoryDataset.java 29: * ------------------------- 30: * (C) Copyright 2003-2005, by Object Refinery Limited. 31: * 32: * Original Author: David Gilbert (for Object Refinery Limited); 33: * Contributor(s): -; 34: * 35: * $Id: GanttCategoryDataset.java,v 1.2.2.1 2005/10/25 21:31:44 mungady Exp $ 36: * 37: * Changes 38: * ------- 39: * 16-Sep-2003 : Version 1, based on MultiIntervalCategoryDataset (DG); 40: * 23-Sep-2003 : Fixed Checkstyle issues (DG); 41: * 42: */ 43: 44: package org.jfree.data.gantt; 45: 46: import org.jfree.data.category.IntervalCategoryDataset; 47: 48: /** 49: * An extension of the {@link IntervalCategoryDataset} interface that adds 50: * support for multiple sub-intervals. 51: */ 52: public interface GanttCategoryDataset extends IntervalCategoryDataset { 53: 54: /** 55: * Returns the percent complete for a given item. 56: * 57: * @param row the row index (zero-based). 58: * @param column the column index (zero-based). 59: * 60: * @return The percent complete. 61: */ 62: public Number getPercentComplete(int row, int column); 63: 64: /** 65: * Returns the percent complete for a given item. 66: * 67: * @param rowKey the row key. 68: * @param columnKey the column key. 69: * 70: * @return The percent complete. 71: */ 72: public Number getPercentComplete(Comparable rowKey, Comparable columnKey); 73: 74: /** 75: * Returns the number of sub-intervals for a given item. 76: * 77: * @param row the row index (zero-based). 78: * @param column the column index (zero-based). 79: * 80: * @return The sub-interval count. 81: */ 82: public int getSubIntervalCount(int row, int column); 83: 84: /** 85: * Returns the number of sub-intervals for a given item. 86: * 87: * @param rowKey the row key. 88: * @param columnKey the column key. 89: * 90: * @return The sub-interval count. 91: */ 92: public int getSubIntervalCount(Comparable rowKey, Comparable columnKey); 93: 94: /** 95: * Returns the start value of a sub-interval for a given item. 96: * 97: * @param row the row index (zero-based). 98: * @param column the column index (zero-based). 99: * @param subinterval the sub-interval index (zero-based). 100: * 101: * @return The start value (possibly <code>null</code>). 102: */ 103: public Number getStartValue(int row, int column, int subinterval); 104: 105: /** 106: * Returns the start value of a sub-interval for a given item. 107: * 108: * @param rowKey the row key. 109: * @param columnKey the column key. 110: * @param subinterval the sub-interval. 111: * 112: * @return The start value (possibly <code>null</code>). 113: */ 114: public Number getStartValue(Comparable rowKey, Comparable columnKey, 115: int subinterval); 116: 117: /** 118: * Returns the end value of a sub-interval for a given item. 119: * 120: * @param row the row index (zero-based). 121: * @param column the column index (zero-based). 122: * @param subinterval the sub-interval. 123: * 124: * @return The end value (possibly <code>null</code>). 125: */ 126: public Number getEndValue(int row, int column, int subinterval); 127: 128: /** 129: * Returns the end value of a sub-interval for a given item. 130: * 131: * @param rowKey the row key. 132: * @param columnKey the column key. 133: * @param subinterval the sub-interval. 134: * 135: * @return The end value (possibly <code>null</code>). 136: */ 137: public Number getEndValue(Comparable rowKey, Comparable columnKey, 138: int subinterval); 139: 140: /** 141: * Returns the percentage complete value of a sub-interval for a given item. 142: * 143: * @param row the row index (zero-based). 144: * @param column the column index (zero-based). 145: * @param subinterval the sub-interval. 146: * 147: * @return The percent complete value (possibly <code>null</code>). 148: */ 149: public Number getPercentComplete(int row, int column, int subinterval); 150: 151: /** 152: * Returns the percentage complete value of a sub-interval for a given item. 153: * 154: * @param rowKey the row key. 155: * @param columnKey the column key. 156: * @param subinterval the sub-interval. 157: * 158: * @return The precent complete value (possibly <code>null</code>). 159: */ 160: public Number getPercentComplete(Comparable rowKey, Comparable columnKey, 161: int subinterval); 162: 163: }