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