|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ijchart.xychart.dataset.AbstractDataset
com.ijchart.xychart.dataset.SlidingDataset
public class SlidingDataset
Title: IJChart
Description: a chart library for the Java(tm) platform.
A dataset implementation that presents a subset of the underlying dataset.Copyright: Copyright (c) 2013
Company:
| Constructor Summary | |
|---|---|
SlidingDataset(IMatrixDataset dataset,
DatasetSlidingType slidingType,
int startIndex,
int maxCount)
A constructor. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
Override equals method. |
java.lang.Object |
getColKey(int index)
Get ColKey by index.The first ColKey of the dataset is at index 0,the next at index 1, and so on, as for array indexing. |
int |
getColumnCount()
The column count of this dataset. |
int |
getColumnCount(int rowIdx)
The column count of this dataset. |
IChartData |
getData(int rowIndex,
int colIndex)
Get the data of matrix by rowIndex and colIndex,an Exception will be throw when index out of bound. |
int |
getMaxCount()
Returns the max data row or column count. |
int |
getRowCount()
The row count of this dataset. |
java.lang.Object |
getRowKey(int index)
Get RowKey by index.The first RowKey of the dataset is at index 0,the next at index 1, and so on, as for array indexing. |
DatasetSlidingType |
getSlidingType()
Returns the sliding type of dataset. |
int |
getStartIndex()
Returns the start index. |
IMatrixDataset |
getUnderlyingDataset()
Returns the underlying dataset. |
int |
hashCode()
Get hascode. |
boolean |
isEmpty()
Returns whether or not the dataset is empty. |
boolean |
isThisDataType(java.lang.Class c)
Test whether or not all data is Class c in this dataset. |
void |
setMaxCount(int maxCount)
Sets the max data row or column count and sends a DatasetChangeEvent to all registered listeners. |
void |
setSlidingType(DatasetSlidingType slidingType)
Sets the sliding type of dataset and sends a DatasetChangeEvent to all registered listeners. |
void |
setStartIndex(int startIndex)
Sets the start index and sends a DatasetChangeEvent to all registered listeners. |
void |
sortRowData(int rowIndex,
SortType sortType)
Sort the datas of a dataset row,the data must implements Comparable interface. |
java.lang.String |
toString()
Returns a string representation of the object. |
| Methods inherited from class com.ijchart.xychart.dataset.AbstractDataset |
|---|
addChangeListener, clone, datasetChanged, fireDatasetChanged, forceDataSetChanged, hasListener, notifyListeners, removeAllChangeListener, removeChangeListener |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.ijchart.xychart.dataset.IDataset |
|---|
addChangeListener, forceDataSetChanged, removeAllChangeListener, removeChangeListener |
| Constructor Detail |
|---|
public SlidingDataset(IMatrixDataset dataset,
DatasetSlidingType slidingType,
int startIndex,
int maxCount)
dataset - IMatrixDataset
The underlying dataset (null not permitted).slidingType - DatasetSlidingType
The sliding type of dataset (null not permitted).startIndex - int
The start index.maxCount - int
The max data row or column count.| Method Detail |
|---|
public IMatrixDataset getUnderlyingDataset()
public DatasetSlidingType getSlidingType()
public void setSlidingType(DatasetSlidingType slidingType)
DatasetChangeEvent to all registered listeners.
slidingType - DatasetSlidingType
The sliding type.public int getStartIndex()
public void setStartIndex(int startIndex)
DatasetChangeEvent to all registered listeners.
startIndex - int
The start index.public int getMaxCount()
public void setMaxCount(int maxCount)
DatasetChangeEvent to all registered listeners.
maxCount - int
The max data row or column count.public int getRowCount()
getRowCount in interface IMatrixDatasetpublic java.lang.Object getRowKey(int index)
getRowKey in interface IMatrixDatasetindex - int
The row index,first is 0,next is 1.
public int getColumnCount()
getColumnCount in interface IMatrixDatasetpublic int getColumnCount(int rowIdx)
getColumnCount in interface IMatrixDatasetrowIdx - int
The row index.
public java.lang.Object getColKey(int index)
getColKey in interface IMatrixDatasetindex - int
The index,first is 0,next is 1.
public IChartData getData(int rowIndex,
int colIndex)
getData in interface IMatrixDatasetrowIndex - int
The row index.The first is at index 0,the next is at 1, and so on.colIndex - int
The column index.The first is at index 0,the next is at 1, and so on.
public boolean isEmpty()
isEmpty in interface IMatrixDatasetpublic boolean isThisDataType(java.lang.Class c)
isThisDataType in interface IDatasetc - Class
A class (null not permitted).
public void sortRowData(int rowIndex,
SortType sortType)
Comparable interface.
sortRowData in interface IMatrixDatasetrowIndex - int
The row index.The first is at index 0,the next is at 1, and so on.sortType - SortType
The sort type,ascending or descending.public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class AbstractDatasetpublic boolean equals(java.lang.Object obj)
equals in class AbstractDatasetobj - Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||