Source for org.jfree.data.gantt.GanttCategoryDataset

   1: /* ===========================================================
   2:  * JFreeChart : a free chart library for the Java(tm) platform
   3:  * ===========================================================
   4:  *
   5:  * (C) Copyright 2000-2008, 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-2008, by Object Refinery Limited.
  31:  *
  32:  * Original Author:  David Gilbert (for Object Refinery Limited);
  33:  * Contributor(s):   -;
  34:  *
  35:  * Changes
  36:  * -------
  37:  * 16-Sep-2003 : Version 1, based on MultiIntervalCategoryDataset (DG);
  38:  * 23-Sep-2003 : Fixed Checkstyle issues (DG);
  39:  * 12-May-2008 : Updated API docs (DG);
  40:  *
  41:  */
  42: 
  43:  package org.jfree.data.gantt;
  44: 
  45: import org.jfree.data.category.IntervalCategoryDataset;
  46: 
  47: /**
  48:  * An extension of the {@link IntervalCategoryDataset} interface that adds
  49:  * support for multiple sub-intervals.
  50:  */
  51: public interface GanttCategoryDataset extends IntervalCategoryDataset {
  52: 
  53:     /**
  54:      * Returns the percent complete for a given item.
  55:      *
  56:      * @param row  the row index (zero-based).
  57:      * @param column  the column index (zero-based).
  58:      *
  59:      * @return The percent complete.
  60:      *
  61:      * @see #getPercentComplete(Comparable, Comparable)
  62:      */
  63:     public Number getPercentComplete(int row, int column);
  64: 
  65:     /**
  66:      * Returns the percent complete for a given item.
  67:      *
  68:      * @param rowKey  the row key.
  69:      * @param columnKey  the column key.
  70:      *
  71:      * @return The percent complete.
  72:      *
  73:      * @see #getPercentComplete(int, int)
  74:      */
  75:     public Number getPercentComplete(Comparable rowKey, Comparable columnKey);
  76: 
  77:     /**
  78:      * Returns the number of sub-intervals for a given item.
  79:      *
  80:      * @param row  the row index (zero-based).
  81:      * @param column  the column index (zero-based).
  82:      *
  83:      * @return The sub-interval count.
  84:      *
  85:      * @see #getSubIntervalCount(Comparable, Comparable)
  86:      */
  87:     public int getSubIntervalCount(int row, int column);
  88: 
  89:     /**
  90:      * Returns the number of sub-intervals for a given item.
  91:      *
  92:      * @param rowKey  the row key.
  93:      * @param columnKey  the column key.
  94:      *
  95:      * @return The sub-interval count.
  96:      *
  97:      * @see #getSubIntervalCount(int, int)
  98:      */
  99:     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: }