com.ijchart.xychart.dataset
Interface IMatrixDataset

All Superinterfaces:
IDataset
All Known Implementing Classes:
DefaultMatrixDataset, SingleRowDataset, SlidingDataset

public interface IMatrixDataset
extends IDataset

Title: IJChart

Description: a chart library for the Java(tm) platform.

The dataset is a two-dimensional matrix, each point in the matrix is (@Link IChartData) object. Matrix of each row of a corresponding RowKey,each column of a corresponding ColKey.The data form is:
  ColKey1 ColKey2 ColKey3
RowKey1 ChartData11 ChartData12 ChartData13
RowKey2 ChartData21 ChartData22 ChartData23
RowKey3 ChartData31 ChartData32 ChartData33

The RowKey is used to draw on X-axis,and ColKey is used to draw as legend.

Copyright: Copyright (c) 2013

Company:

Version:
1.0
Author:
zhang feng min,shanghai china. Contract me by email.

Method Summary
 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 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.
 boolean isEmpty()
           Returns whether or not the dataset is empty.
 void sortRowData(int rowIndex, SortType sortType)
           Sort the datas of a dataset row.
 
Methods inherited from interface com.ijchart.xychart.dataset.IDataset
addChangeListener, forceDataSetChanged, isThisDataType, removeAllChangeListener, removeChangeListener
 

Method Detail

getRowCount

int getRowCount()
The row count of this dataset.

Returns:
int The row count.

getRowKey

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.

Parameters:
index - int The row index,first is 0,next is 1.
Returns:
Object The dataset RowKey for this index,if not found return null.

getColumnCount

int getColumnCount()
The column count of this dataset.

Returns:
int The column count.

getColumnCount

int getColumnCount(int rowIdx)
The column count of this dataset.

Parameters:
rowIdx - int The row index.
Returns:
int The column count.

getColKey

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.

Parameters:
index - int The index,first is 0,next is 1.
Returns:
Object The dataset ColKey for this index,if not found return null.

getData

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.

Parameters:
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.
Returns:
IChartData The data of matrix (maybe null).

isEmpty

boolean isEmpty()
Returns whether or not the dataset is empty.

Returns:
boolean Returns true if the axis dataset is empty,otherwise false.

sortRowData

void sortRowData(int rowIndex,
                 SortType sortType)
Sort the datas of a dataset row.

Parameters:
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.