|
|||||||||
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.DefaultMatrixDataset
public class DefaultMatrixDataset
Title: IJChart
Description: a chart library for the Java(tm) platform.
The default implement of interface IMatrixDataset.Copyright: Copyright (c) 2013
Company:
Constructor Summary | |
---|---|
DefaultMatrixDataset()
No argument constructor. |
Method Summary | |
---|---|
void |
addColKey(java.lang.Object colKey)
Add a ColKey. |
void |
addData(int rowIndex,
IChartData chartData)
Add a IChartData to dataset. |
void |
addDatas(int rowIndex,
java.util.Collection chartDatas)
Add IChartData datas to dataset. |
void |
addDatas(int rowIndex,
IChartData[] chartDatas)
Add IChartData datas to dataset. |
void |
addRowData()
Add one row to data list. |
void |
addRowData(int count)
Add multiple rows to data list. |
void |
addRowKey(java.lang.Object rowKey)
Add a RowKey. |
java.lang.Object |
deleteColKey(int index)
Delete ColKey by index. |
boolean |
deleteColKey(java.lang.Object colKey)
Delete this ColKey. |
void |
deleteRow(int rowIndex)
Delete the datas of a dataset row. |
java.lang.Object |
deleteRowKey(int index)
Delete RowKey by index. |
boolean |
deleteRowKey(java.lang.Object rowKey)
Delete this RowKey. |
boolean |
equals(java.lang.Object obj)
Override equals method. |
java.lang.Object |
getColKey(int index)
Get ColKey by index. |
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. |
protected java.util.List |
getDatasetColKeys()
Returns the colKeys of this dataset,if a column line data is not colKey, is null. |
java.util.List |
getDatasetRowKeys()
Returns the rowKeys of this dataset,if a row line data is not rowKey, is null. |
int |
getRowCount()
Returns the row count of this dataset. |
java.util.List |
getRowDatas(int rowIndex)
Returns all datas of the specified row index. |
java.lang.Object |
getRowKey(int index)
Get RolKey by index. |
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 |
setColKey(int index,
java.lang.Object colKey)
Sets the ColKey value by index. |
void |
setData(int rowIndex,
int colIndex,
IChartData chartData)
Change the dataset value by row index and column index. |
void |
setRowKey(int index,
java.lang.Object rowKey)
Sets the RowKey value by row index. |
void |
sortRowData(int rowIndex,
SortType sortType)
Sort the datas of a dataset row,the data must implements Comparable interface. |
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, toString, wait, wait, wait |
Methods inherited from interface com.ijchart.xychart.dataset.IDataset |
---|
addChangeListener, forceDataSetChanged, removeAllChangeListener, removeChangeListener |
Constructor Detail |
---|
public DefaultMatrixDataset()
Method Detail |
---|
public void addRowKey(java.lang.Object rowKey)
rowKey
- Object
RowKey (null permitted).public void setRowKey(int index, java.lang.Object rowKey)
index
- int
The row index.rowKey
- Object
New RowKey value (null permitted).public java.lang.Object deleteRowKey(int index)
index
- int
The row index.
public boolean deleteRowKey(java.lang.Object rowKey)
rowKey
- Object
The RowKey (null permitted).
public java.lang.Object getRowKey(int index)
getRowKey
in interface IMatrixDataset
index
- int
The row index.
public void addColKey(java.lang.Object colKey)
colKey
- Object
ColKey (null permitted).public void setColKey(int index, java.lang.Object colKey)
index
- int
The index.colKey
- Object
New ColKey value (null permitted).public java.lang.Object deleteColKey(int index)
index
- int
The index.
public boolean deleteColKey(java.lang.Object colKey)
colKey
- Object
The ColKey (null permitted).
public java.lang.Object getColKey(int index)
getColKey
in interface IMatrixDataset
index
- int
The index.
public void addRowData()
public void addRowData(int count)
count
- int
.public void deleteRow(int rowIndex)
rowIndex
- int
The row index.public void addData(int rowIndex, IChartData chartData)
IChartData
to dataset.
rowIndex
- int
The row index.chartData
- IChartData
The IChartData
object (null permitted).public void addDatas(int rowIndex, java.util.Collection chartDatas)
IChartData
datas to dataset.
rowIndex
- int
The row index.chartDatas
- Collection
The IChartData
object (null permitted).public void addDatas(int rowIndex, IChartData[] chartDatas)
IChartData
datas to dataset.
rowIndex
- int
The row index.chartDatas
- IChartData
The IChartData
object (null permitted).public void setData(int rowIndex, int colIndex, IChartData chartData)
rowIndex
- int
The row index.colIndex
- int
The column index.chartData
- IChartData
The IChartData
object (null permitted).public int getRowCount()
getRowCount
in interface IMatrixDataset
public int getColumnCount()
getColumnCount
in interface IMatrixDataset
public int getColumnCount(int rowIdx)
getColumnCount
in interface IMatrixDataset
rowIdx
- int
The row index.
public IChartData getData(int rowIndex, int colIndex)
getData
in interface IMatrixDataset
rowIndex
- 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 java.util.List getRowDatas(int rowIndex)
rowIndex
- int
The row index.The first is at index 0,the next is at 1, and so on.
public java.util.List getDatasetRowKeys()
public boolean isThisDataType(java.lang.Class c)
isThisDataType
in interface IDataset
c
- Class
A class (null not permitted).
public boolean isEmpty()
isEmpty
in interface IMatrixDataset
public void sortRowData(int rowIndex, SortType sortType)
Comparable
interface.
sortRowData
in interface IMatrixDataset
rowIndex
- 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.protected java.util.List getDatasetColKeys()
public int hashCode()
hashCode
in class AbstractDataset
public boolean equals(java.lang.Object obj)
equals
in class AbstractDataset
obj
- Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |