Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.jfree.data.general.AbstractDataset
org.jfree.data.gantt.SlidingGanttCategoryDataset
GanttCategoryDataset
implementation that presents a subset of the
categories in an underlying dataset. The index of the first "visible"
category can be modified, which provides a means of "sliding" through
the categories in the underlying dataset.
Constructor Summary | |
|
Method Summary | |
Object |
|
boolean |
|
int |
|
int |
|
Comparable |
|
List |
|
Number |
|
Number |
|
Number |
|
Number |
|
int |
|
int |
|
Number |
|
Number |
|
Number |
|
Number |
|
int |
|
int |
|
Comparable |
|
List |
|
Number |
|
Number |
|
Number |
|
Number |
|
int |
|
int |
|
GanttCategoryDataset |
|
Number |
|
Number |
|
void |
|
void |
|
Methods inherited from class org.jfree.data.general.AbstractDataset | |
addChangeListener , clone , fireDatasetChanged , getGroup , hasListener , notifyListeners , removeChangeListener , setGroup , validateObject |
public SlidingGanttCategoryDataset(GanttCategoryDataset underlying, int firstColumn, int maxColumns)
Creates a new instance.
- Parameters:
underlying
- the underlying dataset (null
not permitted).firstColumn
- the index of the first visible column from the underlying dataset.maxColumns
- the maximumColumnCount.
public Object clone() throws CloneNotSupportedException
Returns an independent copy of the dataset. Note that:
- the underlying dataset is only cloned if it implements the
PublicCloneable
interface;- the listeners registered with this dataset are not carried over to the cloned dataset.
- Overrides:
- clone in interface AbstractDataset
- Returns:
- An independent copy of the dataset.
public boolean equals(Object obj)
Tests thisSlidingCategoryDataset
for equality with an arbitrary object.
- Parameters:
obj
- the object (null
permitted).
- Returns:
- A boolean.
public int getColumnCount()
Returns the number of columns in the table.
- Specified by:
- getColumnCount in interface Values2D
- Returns:
- The column count.
public int getColumnIndex(Comparable key)
Returns the index for the specified column key.
- Specified by:
- getColumnIndex in interface KeyedValues2D
- Parameters:
key
- the key.
- Returns:
- The column index, or -1 if the key is not recognised.
public Comparable getColumnKey(int column)
Returns the column key for a given index.
- Specified by:
- getColumnKey in interface KeyedValues2D
- Parameters:
column
- the column index (zero-based).
- Returns:
- The column key.
public List getColumnKeys()
Returns the column keys.
- Specified by:
- getColumnKeys in interface KeyedValues2D
- Returns:
- The keys.
- See Also:
getColumnKey(int)
public Number getEndValue(Comparable rowKey, Comparable columnKey)
Returns the end value for the interval for a given series and category.
- Specified by:
- getEndValue in interface IntervalCategoryDataset
- Parameters:
rowKey
- the series key.columnKey
- the category key.
- Returns:
- The end value (possibly
null
).
- See Also:
getStartValue(Comparable,Comparable)
public Number getEndValue(Comparable rowKey, Comparable columnKey, int subinterval)
Returns the end value of a sub-interval for a given item.
- Specified by:
- getEndValue in interface GanttCategoryDataset
- Parameters:
rowKey
- the row key.columnKey
- the column key.subinterval
- the sub-interval.
- Returns:
- The end value (possibly
null
).
public Number getEndValue(int series, int category)
Returns the end value for the interval for a given series and category.
- Specified by:
- getEndValue in interface IntervalCategoryDataset
- Parameters:
series
- the series (zero-based index).category
- the category (zero-based index).
- Returns:
- The end value (possibly
null
).
public Number getEndValue(int row, int column, int subinterval)
Returns the end value of a sub-interval for a given item.
- Specified by:
- getEndValue in interface GanttCategoryDataset
- Parameters:
row
- the row index (zero-based).column
- the column index (zero-based).subinterval
- the sub-interval.
- Returns:
- The end value (possibly
null
).
- See Also:
getStartValue(int,int,int)
public int getFirstCategoryIndex()
Returns the index of the first visible category.
- Returns:
- The index.
- See Also:
setFirstCategoryIndex(int)
public int getMaximumCategoryCount()
Returns the maximum category count.
- Returns:
- The maximum category count.
- See Also:
setMaximumCategoryCount(int)
public Number getPercentComplete(Comparable rowKey, Comparable columnKey)
Returns the percent complete for a given item.
- Specified by:
- getPercentComplete in interface GanttCategoryDataset
- Parameters:
rowKey
- the row key.columnKey
- the column key.
- Returns:
- The percent complete.
public Number getPercentComplete(Comparable rowKey, Comparable columnKey, int subinterval)
Returns the percentage complete value of a sub-interval for a given item.
- Specified by:
- getPercentComplete in interface GanttCategoryDataset
- Parameters:
rowKey
- the row key.columnKey
- the column key.subinterval
- the sub-interval.
- Returns:
- The percent complete value (possibly
null
).
- See Also:
getPercentComplete(int,int,int)
public Number getPercentComplete(int series, int category)
Returns the percent complete for a given item.
- Specified by:
- getPercentComplete in interface GanttCategoryDataset
- Parameters:
series
- the row index (zero-based).category
- the column index (zero-based).
- Returns:
- The percent complete.
public Number getPercentComplete(int row, int column, int subinterval)
Returns the percentage complete value of a sub-interval for a given item.
- Specified by:
- getPercentComplete in interface GanttCategoryDataset
- Parameters:
row
- the row index (zero-based).column
- the column index (zero-based).subinterval
- the sub-interval.
- Returns:
- The percent complete value (possibly
null
).
public int getRowCount()
Returns the number of rows in the table.
- Specified by:
- getRowCount in interface Values2D
- Returns:
- The row count.
public int getRowIndex(Comparable key)
Returns the row index for a given key.
- Specified by:
- getRowIndex in interface KeyedValues2D
- Parameters:
key
- the row key.
- Returns:
- The row index, or
-1
if the key is unrecognised.
public Comparable getRowKey(int row)
Returns the row key for a given index.
- Specified by:
- getRowKey in interface KeyedValues2D
- Parameters:
row
- the row index (zero-based).
- Returns:
- The row key.
public List getRowKeys()
Returns the row keys.
- Specified by:
- getRowKeys in interface KeyedValues2D
- Returns:
- The keys.
public Number getStartValue(Comparable rowKey, Comparable columnKey)
Returns the start value for the interval for a given series and category.
- Specified by:
- getStartValue in interface IntervalCategoryDataset
- Parameters:
rowKey
- the series key.columnKey
- the category key.
- Returns:
- The start value (possibly
null
).
- See Also:
getEndValue(Comparable,Comparable)
public Number getStartValue(Comparable rowKey, Comparable columnKey, int subinterval)
Returns the start value of a sub-interval for a given item.
- Specified by:
- getStartValue in interface GanttCategoryDataset
- Parameters:
rowKey
- the row key.columnKey
- the column key.subinterval
- the sub-interval.
- Returns:
- The start value (possibly
null
).
public Number getStartValue(int row, int column)
Returns the start value for the interval for a given series and category.
- Specified by:
- getStartValue in interface IntervalCategoryDataset
- Parameters:
row
- the series (zero-based index).column
- the category (zero-based index).
- Returns:
- The start value (possibly
null
).
- See Also:
getEndValue(int,int)
public Number getStartValue(int row, int column, int subinterval)
Returns the start value of a sub-interval for a given item.
- Specified by:
- getStartValue in interface GanttCategoryDataset
- Parameters:
row
- the row index (zero-based).column
- the column index (zero-based).subinterval
- the sub-interval index (zero-based).
- Returns:
- The start value (possibly
null
).
- See Also:
getEndValue(int,int,int)
public int getSubIntervalCount(Comparable rowKey, Comparable columnKey)
Returns the number of sub-intervals for a given item.
- Specified by:
- getSubIntervalCount in interface GanttCategoryDataset
- Parameters:
rowKey
- the row key.columnKey
- the column key.
- Returns:
- The sub-interval count.
- See Also:
getSubIntervalCount(int,int)
public int getSubIntervalCount(int row, int column)
Returns the number of sub-intervals for a given item.
- Specified by:
- getSubIntervalCount in interface GanttCategoryDataset
- Parameters:
row
- the row index (zero-based).column
- the column index (zero-based).
- Returns:
- The sub-interval count.
public GanttCategoryDataset getUnderlyingDataset()
Returns the underlying dataset that was supplied to the constructor.
- Returns:
- The underlying dataset (never
null
).
public Number getValue(Comparable rowKey, Comparable columnKey)
Returns the value for a pair of keys.
- Specified by:
- getValue in interface KeyedValues2D
- Parameters:
rowKey
- the row key (null
not permitted).columnKey
- the column key (null
not permitted).
- Returns:
- The value (possibly
null
).
public Number getValue(int row, int column)
Returns a value from the table.
- Parameters:
row
- the row index (zero-based).column
- the column index (zero-based).
- Returns:
- The value (possibly
null
).
public void setFirstCategoryIndex(int first)
Sets the index of the first category that should be used from the underlying dataset, and sends aDatasetChangeEvent
to all registered listeners.
- Parameters:
first
- the index.
- See Also:
getFirstCategoryIndex()
public void setMaximumCategoryCount(int max)
Sets the maximum category count and sends aDatasetChangeEvent
to all registered listeners.
- Parameters:
max
- the maximum.
- See Also:
getMaximumCategoryCount()