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-2007, 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-2007, 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:  *
  40:  */
  41: 
  42:  package org.jfree.data.gantt;
  43: 
  44: import org.jfree.data.category.IntervalCategoryDataset;
  45: 
  46: /**
  47:  * An extension of the {@link IntervalCategoryDataset} interface that adds 
  48:  * support for multiple sub-intervals.
  49:  */
  50: public interface GanttCategoryDataset extends IntervalCategoryDataset {
  51: 
  52:     /**
  53:      * Returns the percent complete for a given item.
  54:      *
  55:      * @param row  the row index (zero-based).
  56:      * @param column  the column index (zero-based).
  57:      *
  58:      * @return The percent complete.
  59:      */
  60:     public Number getPercentComplete(int row, int column);
  61: 
  62:     /**
  63:      * Returns the percent complete for a given item.
  64:      *
  65:      * @param rowKey  the row key.
  66:      * @param columnKey  the column key.
  67:      *
  68:      * @return The percent complete.
  69:      */
  70:     public Number getPercentComplete(Comparable rowKey, Comparable columnKey);
  71: 
  72:     /**
  73:      * Returns the number of sub-intervals for a given item.
  74:      *
  75:      * @param row  the row index (zero-based).
  76:      * @param column  the column index (zero-based).
  77:      *
  78:      * @return The sub-interval count.
  79:      */
  80:     public int getSubIntervalCount(int row, int column);
  81: 
  82:     /**
  83:      * Returns the number of sub-intervals for a given item.
  84:      *
  85:      * @param rowKey  the row key.
  86:      * @param columnKey  the column key.
  87:      *
  88:      * @return The sub-interval count.
  89:      */
  90:     public int getSubIntervalCount(Comparable rowKey, Comparable columnKey);
  91: 
  92:     /**
  93:      * Returns the start value of a sub-interval for a given item.
  94:      *
  95:      * @param row  the row index (zero-based).
  96:      * @param column  the column index (zero-based).
  97:      * @param subinterval  the sub-interval index (zero-based).
  98:      *
  99:      * @return The start value (possibly <code>null</code>).
 100:      */
 101:     public Number getStartValue(int row, int column, int subinterval);
 102: 
 103:     /**
 104:      * Returns the start value of a sub-interval for a given item.
 105:      *
 106:      * @param rowKey  the row key.
 107:      * @param columnKey  the column key.
 108:      * @param subinterval  the sub-interval.
 109:      *
 110:      * @return The start value (possibly <code>null</code>).
 111:      */
 112:     public Number getStartValue(Comparable rowKey, Comparable columnKey, 
 113:                                 int subinterval);
 114: 
 115:     /**
 116:      * Returns the end value of a sub-interval for a given item.
 117:      *
 118:      * @param row  the row index (zero-based).
 119:      * @param column  the column index (zero-based).
 120:      * @param subinterval  the sub-interval.
 121:      *
 122:      * @return The end value (possibly <code>null</code>).
 123:      */
 124:     public Number getEndValue(int row, int column, int subinterval);
 125: 
 126:     /**
 127:      * Returns the end value of a sub-interval for a given item.
 128:      *
 129:      * @param rowKey  the row key.
 130:      * @param columnKey  the column key.
 131:      * @param subinterval  the sub-interval.
 132:      *
 133:      * @return The end value (possibly <code>null</code>).
 134:      */
 135:     public Number getEndValue(Comparable rowKey, Comparable columnKey, 
 136:                               int subinterval);
 137: 
 138:     /**
 139:      * Returns the percentage complete value of a sub-interval for a given item.
 140:      *
 141:      * @param row  the row index (zero-based).
 142:      * @param column  the column index (zero-based).
 143:      * @param subinterval  the sub-interval.
 144:      *
 145:      * @return The percent complete value (possibly <code>null</code>).
 146:      */
 147:     public Number getPercentComplete(int row, int column, int subinterval);
 148: 
 149:     /**
 150:      * Returns the percentage complete value of a sub-interval for a given item.
 151:      *
 152:      * @param rowKey  the row key.
 153:      * @param columnKey  the column key.
 154:      * @param subinterval  the sub-interval.
 155:      *
 156:      * @return The precent complete value (possibly <code>null</code>).
 157:      */
 158:     public Number getPercentComplete(Comparable rowKey, Comparable columnKey, 
 159:                                      int subinterval);
 160: 
 161: }