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, Comparable columnKey); 073 074 /** 075 * Returns the number of sub-intervals for a given item. 076 * 077 * @param row the row index (zero-based). 078 * @param column the column index (zero-based). 079 * 080 * @return The sub-interval count. 081 */ 082 public int getSubIntervalCount(int row, int column); 083 084 /** 085 * Returns the number of sub-intervals for a given item. 086 * 087 * @param rowKey the row key. 088 * @param columnKey the column key. 089 * 090 * @return The sub-interval count. 091 */ 092 public int getSubIntervalCount(Comparable rowKey, Comparable columnKey); 093 094 /** 095 * Returns the start value of a sub-interval for a given item. 096 * 097 * @param row the row index (zero-based). 098 * @param column the column index (zero-based). 099 * @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 }