Package org.jfree.data.gantt
Class SlidingGanttCategoryDataset
java.lang.Object
org.jfree.data.general.AbstractDataset
org.jfree.data.gantt.SlidingGanttCategoryDataset
- All Implemented Interfaces:
 ObjectInputValidation,Serializable,Cloneable,CategoryDataset,IntervalCategoryDataset,GanttCategoryDataset,Dataset,KeyedValues2D,Values2D
A 
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.- See Also:
 
- 
Constructor Summary
ConstructorsConstructorDescriptionSlidingGanttCategoryDataset(GanttCategoryDataset underlying, int firstColumn, int maxColumns) Creates a new instance. - 
Method Summary
Modifier and TypeMethodDescriptionbooleanEnsures symmetry between super/subclass implementations of equals.clone()Returns an independent copy of the dataset.booleanTests thisSlidingGanttCategoryDatasetinstance for equality with an arbitrary object.intReturns the number of columns in the table.intgetColumnIndex(Comparable key) Returns the index for the specified column key.getColumnKey(int column) Returns the column key for a given index.Returns the column keys.getEndValue(int series, int category) Returns the end value for the interval for a given series and category.getEndValue(int row, int column, int subinterval) Returns the end value of a sub-interval for a given item.getEndValue(Comparable rowKey, Comparable columnKey) Returns the end value for the interval for a given series and category.getEndValue(Comparable rowKey, Comparable columnKey, int subinterval) Returns the end value of a sub-interval for a given item.intReturns the index of the first visible category.intReturns the maximum category count.getPercentComplete(int series, int category) Returns the percent complete for a given item.getPercentComplete(int row, int column, int subinterval) Returns the percentage complete value of a sub-interval for a given item.getPercentComplete(Comparable rowKey, Comparable columnKey) Returns the percent complete for a given item.getPercentComplete(Comparable rowKey, Comparable columnKey, int subinterval) Returns the percentage complete value of a sub-interval for a given item.intReturns the number of rows in the table.intgetRowIndex(Comparable key) Returns the row index for a given key.getRowKey(int row) Returns the row key for a given index.Returns the row keys.getStartValue(int row, int column) Returns the start value for the interval for a given series and category.getStartValue(int row, int column, int subinterval) Returns the start value of a sub-interval for a given item.getStartValue(Comparable rowKey, Comparable columnKey) Returns the start value for the interval for a given series and category.getStartValue(Comparable rowKey, Comparable columnKey, int subinterval) Returns the start value of a sub-interval for a given item.intgetSubIntervalCount(int row, int column) Returns the number of sub-intervals for a given item.intgetSubIntervalCount(Comparable rowKey, Comparable columnKey) Returns the number of sub-intervals for a given item.Returns the underlying dataset that was supplied to the constructor.getValue(int row, int column) Returns a value from the table.getValue(Comparable rowKey, Comparable columnKey) Returns the value for a pair of keys.inthashCode()voidsetFirstCategoryIndex(int first) Sets the index of the first category that should be used from the underlying dataset, and sends aDatasetChangeEventto all registered listeners.voidsetMaximumCategoryCount(int max) Sets the maximum category count and sends aDatasetChangeEventto all registered listeners.Methods inherited from class org.jfree.data.general.AbstractDataset
addChangeListener, fireDatasetChanged, getGroup, getNotify, hasListener, notifyListeners, removeChangeListener, setGroup, setNotify, validateObjectMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jfree.data.general.Dataset
addChangeListener, getGroup, removeChangeListener, setGroup 
- 
Constructor Details
- 
SlidingGanttCategoryDataset
public SlidingGanttCategoryDataset(GanttCategoryDataset underlying, int firstColumn, int maxColumns) Creates a new instance.- Parameters:
 underlying- the underlying dataset (nullnot permitted).firstColumn- the index of the first visible column from the underlying dataset.maxColumns- the maximumColumnCount.
 
 - 
 - 
Method Details
- 
getUnderlyingDataset
Returns the underlying dataset that was supplied to the constructor.- Returns:
 - The underlying dataset (never 
null). 
 - 
getFirstCategoryIndex
Returns the index of the first visible category.- Returns:
 - The index.
 - See Also:
 
 - 
setFirstCategoryIndex
Sets the index of the first category that should be used from the underlying dataset, and sends aDatasetChangeEventto all registered listeners.- Parameters:
 first- the index.- See Also:
 
 - 
getMaximumCategoryCount
Returns the maximum category count.- Returns:
 - The maximum category count.
 - See Also:
 
 - 
setMaximumCategoryCount
Sets the maximum category count and sends aDatasetChangeEventto all registered listeners.- Parameters:
 max- the maximum.- See Also:
 
 - 
getColumnIndex
Returns the index for the specified column key.- Specified by:
 getColumnIndexin interfaceKeyedValues2D- Parameters:
 key- the key.- Returns:
 - The column index, or -1 if the key is not recognised.
 
 - 
getColumnKey
Returns the column key for a given index.- Specified by:
 getColumnKeyin interfaceKeyedValues2D- Parameters:
 column- the column index (zero-based).- Returns:
 - The column key.
 - Throws:
 IndexOutOfBoundsException- ifrowis out of bounds.
 - 
getColumnKeys
Returns the column keys.- Specified by:
 getColumnKeysin interfaceKeyedValues2D- Returns:
 - The keys.
 - See Also:
 
 - 
getRowIndex
Returns the row index for a given key.- Specified by:
 getRowIndexin interfaceKeyedValues2D- Parameters:
 key- the row key.- Returns:
 - The row index, or 
-1if the key is unrecognised. 
 - 
getRowKey
Returns the row key for a given index.- Specified by:
 getRowKeyin interfaceKeyedValues2D- Parameters:
 row- the row index (zero-based).- Returns:
 - The row key.
 - Throws:
 IndexOutOfBoundsException- ifrowis out of bounds.
 - 
getRowKeys
Returns the row keys.- Specified by:
 getRowKeysin interfaceKeyedValues2D- Returns:
 - The keys.
 
 - 
getValue
Returns the value for a pair of keys.- Specified by:
 getValuein interfaceKeyedValues2D- Parameters:
 rowKey- the row key (nullnot permitted).columnKey- the column key (nullnot permitted).- Returns:
 - The value (possibly 
null). - Throws:
 UnknownKeyException- if either key is not defined in the dataset.
 - 
getColumnCount
Returns the number of columns in the table.- Specified by:
 getColumnCountin interfaceValues2D- Returns:
 - The column count.
 
 - 
getRowCount
Returns the number of rows in the table.- Specified by:
 getRowCountin interfaceValues2D- Returns:
 - The row count.
 
 - 
getValue
Returns a value from the table. - 
getPercentComplete
Returns the percent complete for a given item.- Specified by:
 getPercentCompletein interfaceGanttCategoryDataset- Parameters:
 rowKey- the row key.columnKey- the column key.- Returns:
 - The percent complete.
 - See Also:
 
 - 
getPercentComplete
Returns the percentage complete value of a sub-interval for a given item.- Specified by:
 getPercentCompletein interfaceGanttCategoryDataset- Parameters:
 rowKey- the row key.columnKey- the column key.subinterval- the sub-interval.- Returns:
 - The percent complete value (possibly 
null). - See Also:
 
 - 
getEndValue
Returns the end value of a sub-interval for a given item.- Specified by:
 getEndValuein interfaceGanttCategoryDataset- Parameters:
 rowKey- the row key.columnKey- the column key.subinterval- the sub-interval.- Returns:
 - The end value (possibly 
null). - See Also:
 
 - 
getEndValue
Returns the end value of a sub-interval for a given item.- Specified by:
 getEndValuein interfaceGanttCategoryDataset- 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:
 
 - 
getPercentComplete
Returns the percent complete for a given item.- Specified by:
 getPercentCompletein interfaceGanttCategoryDataset- Parameters:
 series- the row index (zero-based).category- the column index (zero-based).- Returns:
 - The percent complete.
 - See Also:
 
 - 
getPercentComplete
Returns the percentage complete value of a sub-interval for a given item.- Specified by:
 getPercentCompletein interfaceGanttCategoryDataset- Parameters:
 row- the row index (zero-based).column- the column index (zero-based).subinterval- the sub-interval.- Returns:
 - The percent complete value (possibly 
null). - See Also:
 
 - 
getStartValue
Returns the start value of a sub-interval for a given item.- Specified by:
 getStartValuein interfaceGanttCategoryDataset- Parameters:
 rowKey- the row key.columnKey- the column key.subinterval- the sub-interval.- Returns:
 - The start value (possibly 
null). - See Also:
 
 - 
getStartValue
Returns the start value of a sub-interval for a given item.- Specified by:
 getStartValuein interfaceGanttCategoryDataset- 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:
 
 - 
getSubIntervalCount
Returns the number of sub-intervals for a given item.- Specified by:
 getSubIntervalCountin interfaceGanttCategoryDataset- Parameters:
 rowKey- the row key.columnKey- the column key.- Returns:
 - The sub-interval count.
 - See Also:
 
 - 
getSubIntervalCount
Returns the number of sub-intervals for a given item.- Specified by:
 getSubIntervalCountin interfaceGanttCategoryDataset- Parameters:
 row- the row index (zero-based).column- the column index (zero-based).- Returns:
 - The sub-interval count.
 - See Also:
 
 - 
getStartValue
Returns the start value for the interval for a given series and category.- Specified by:
 getStartValuein interfaceIntervalCategoryDataset- Parameters:
 rowKey- the series key.columnKey- the category key.- Returns:
 - The start value (possibly 
null). - See Also:
 
 - 
getStartValue
Returns the start value for the interval for a given series and category.- Specified by:
 getStartValuein interfaceIntervalCategoryDataset- Parameters:
 row- the series (zero-based index).column- the category (zero-based index).- Returns:
 - The start value (possibly 
null). - See Also:
 
 - 
getEndValue
Returns the end value for the interval for a given series and category.- Specified by:
 getEndValuein interfaceIntervalCategoryDataset- Parameters:
 rowKey- the series key.columnKey- the category key.- Returns:
 - The end value (possibly 
null). - See Also:
 
 - 
getEndValue
Returns the end value for the interval for a given series and category.- Specified by:
 getEndValuein interfaceIntervalCategoryDataset- Parameters:
 series- the series (zero-based index).category- the category (zero-based index).- Returns:
 - The end value (possibly 
null). - See Also:
 
 - 
equals
Tests thisSlidingGanttCategoryDatasetinstance for equality with an arbitrary object.- Overrides:
 equalsin classAbstractDataset- Parameters:
 obj- the object (nullpermitted).- Returns:
 - A boolean.
 
 - 
canEqual
Ensures symmetry between super/subclass implementations of equals. For more detail, see http://jqno.nl/equalsverifier/manual/inheritance.- Overrides:
 canEqualin classAbstractDataset- Parameters:
 other- Object- Returns:
 - true ONLY if the parameter is THIS class type
 
 - 
hashCode
- Overrides:
 hashCodein classAbstractDataset
 - 
clone
Returns an independent copy of the dataset. Note that:- the underlying dataset is only cloned if it implements the
 
PublicCloneableinterface; - the listeners registered with this dataset are not carried over to the cloned dataset.
 
- Overrides:
 clonein classAbstractDataset- Returns:
 - An independent copy of the dataset.
 - Throws:
 CloneNotSupportedException- if the dataset cannot be cloned for any reason.
 - the underlying dataset is only cloned if it implements the
 
 
 -