lt.monarch.chart.models
Interface DataModel

All Known Subinterfaces:
ArrayDataModel, MatrixDataModel
All Known Implementing Classes:
AbstractDataModel, ChartDataModel, StackedDataModel

public interface DataModel

General data model interface, which contains common methods description for all data models.


Method Summary
Modifier and Type Method and Description
 void addListener(ChartDataModelListener listener)
          Adds the specified chart data model listener to receive chart data model change events from this chart data model.
 ArrayDataModel castToArray()
          Casts the data model to array.
 MatrixDataModel castToMatrix()
          Casts the data model to matrix.
 void dispose()
          Disposes data model
 void fireDataChanged(DataModelChangeEvent event)
          Fires notification that data model has changed.
 DataModelDimensions getAddressDimensions()
          Address dimensions, which shows if the model is array or matrix.
 int getValuesInPoint()
          Gets the count of the data columns at each point in the data model.
 boolean hasColumn(DataColumnType type)
          Returns flag showing if this data model contains column of the given type.
 void removeListener(ChartDataModelListener listener)
          Removes the specified chart data model listener so that it no longer receives chart data model change events from this chart data model.
 

Method Detail

addListener

void addListener(ChartDataModelListener listener)
Adds the specified chart data model listener to receive chart data model change events from this chart data model. If listener is null, no exception is thrown and no action is performed.

Parameters:
listener - the chart data model listener

removeListener

void removeListener(ChartDataModelListener listener)
Removes the specified chart data model listener so that it no longer receives chart data model change events from this chart data model. If listener is null, no exception is thrown and no action is performed.

Parameters:
listener - the chart data model listener

getAddressDimensions

DataModelDimensions getAddressDimensions()
Address dimensions, which shows if the model is array or matrix.

Returns:
address dimensions

getValuesInPoint

int getValuesInPoint()
Gets the count of the data columns at each point in the data model.

Returns:
count of data columns at each data point

castToArray

ArrayDataModel castToArray()
Casts the data model to array.

Returns:
array data model

castToMatrix

MatrixDataModel castToMatrix()
Casts the data model to matrix.

Returns:
matrix data model

fireDataChanged

void fireDataChanged(DataModelChangeEvent event)
Fires notification that data model has changed.

Parameters:
event - data change event

dispose

void dispose()
Disposes data model


hasColumn

boolean hasColumn(DataColumnType type)
Returns flag showing if this data model contains column of the given type.

Parameters:
type - data column type
Returns:
true if column with the given type exists.