/** * Returns the number of items (tasks) in the specified series. * * @param series the series index (zero-based). * * @return The item count. */ @Override public int getItemCount(int series) { return this.underlying.getSeries(series).getItemCount(); }
/** * Returns the value for an item. * * @param rowKey the row key. * @param columnKey the column key. * * @return The item value. */ @Override public Number getValue(Comparable rowKey, Comparable columnKey) { return getStartValue(rowKey, columnKey); }
@Override public Paint getItemPaint(int row, int column) { Paint result; XYTaskDataset tds = (XYTaskDataset)dataset; TaskSeriesCollection tsc = tds.getTasks(); TaskSeries ts = tsc.getSeries(row); Task t = ts.get(column); result = getCategoryPaint(t.getDescription()); return result; }
private double getItemEndValue(int series, int item) { TaskSeries s = this.underlying.getSeries(series); Task t = s.get(item); TimePeriod duration = t.getDuration(); Date end = duration.getEnd(); return end.getTime(); }
/** * Returns the index for the specified column key. * * @param key the key. * * @return The column index, or -1 if the key is not recognised. */ public int getColumnIndex(Comparable key) { int index = this.underlying.getColumnIndex(key); if (index >= this.firstCategoryIndex && index <= lastCategoryIndex()) { return index - this.firstCategoryIndex; } return -1; // we didn't find the key }
/** * Called when a series belonging to the dataset changes. * * @param event information about the change. */ public void seriesChanged(SeriesChangeEvent event) { refreshKeys(); fireDatasetChanged(); }
/** * Returns the row index for a given key. * * @param key the row key. * * @return The row index, or {@code -1} if the key is unrecognised. */ @Override public int getRowIndex(Comparable key) { return this.underlying.getRowIndex(key); }
/** * Receives a change event from the underlying dataset and responds by * firing a change event for this dataset. * * @param event the event. */ @Override public void datasetChanged(DatasetChangeEvent event) { fireDatasetChanged(); }
/** * Returns the row keys. * * @return The keys. */ @Override public List getRowKeys() { return this.underlying.getRowKeys(); }
/** * Returns the number of series in the collection. * * @return The series count. */ public int getSeriesCount() { return getRowCount(); }
/** * Returns the number of rows in the table. * * @return The row count. */ @Override public int getRowCount() { return this.underlying.getRowCount(); }
/** * Returns a value from the table. * * @param row the row index (zero-based). * @param column the column index (zero-based). * * @return The value (possibly {@code null}). */ @Override public Number getValue(int row, int column) { return this.underlying.getValue(row, column + this.firstCategoryIndex); }
/** * Returns the number of items (tasks) in the specified series. * * @param series the series index (zero-based). * * @return The item count. */ public int getItemCount(int series) { return this.underlying.getSeries(series).getItemCount(); }
/** * Returns the index for the specified column key. * * @param key the key. * * @return The column index, or -1 if the key is not recognised. */ @Override public int getColumnIndex(Comparable key) { int index = this.underlying.getColumnIndex(key); if (index >= this.firstCategoryIndex && index <= lastCategoryIndex()) { return index - this.firstCategoryIndex; } return -1; // we didn't find the key }
/** * Returns the value for a task. * * @param row the row index (zero-based). * @param column the column index (zero-based). * * @return The start value. */ public Number getValue(int row, int column) { return getStartValue(row, column); }
/** * Returns the row index for a given key. * * @param key the row key. * * @return The row index, or <code>-1</code> if the key is unrecognised. */ public int getRowIndex(Comparable key) { return this.underlying.getRowIndex(key); }
/** * Sets the flag that controls whether or not the dataset is transposed * and sends a {@link DatasetChangeEvent} to all registered listeners. * * @param transposed the new flag value. * * @see #isTransposed() */ public void setTransposed(boolean transposed) { this.transposed = transposed; fireDatasetChanged(); }
/** * Returns the row keys. * * @return The keys. */ public List getRowKeys() { return this.underlying.getRowKeys(); }
/** * Returns the number of series in the collection. * * @return The series count. */ @Override public int getSeriesCount() { return getRowCount(); }