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