|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlt.monarch.chart.models.AbstractDataModel
public abstract class AbstractDataModel extends java.lang.Object implements ArrayDataModel, MatrixDataModel, java.io.Serializable
Abstract data model, which has both array data model and matrix data model interfaces. Implements casting to those interfaces and contains listener methods for the models.
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<DataColumnType,DataModelColumn> |
columns
|
protected java.util.ArrayList<java.lang.Object>[] |
data
Data columns as array lists |
protected DefaultListenerList<ChartDataModelListener> |
dataListeners
|
protected DataModelDimensions |
dimensions
|
protected boolean |
suspended
|
| Constructor and Description |
|---|
AbstractDataModel()
|
| Modifier and Type | Method and Description |
|---|---|
void |
addColumn(DataColumnType type,
DataModelColumn column)
Adds new data column of the specified type to data model. |
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)
Forwards the given notification event to all ChartDataModelListener objects that
registered themselves as listeners for this chart data model. |
DataModelDimensions |
getAddressDimensions()
Address dimensions, which shows if the model is array or matrix. |
java.util.Map<DataColumnType,DataModelColumn> |
getColumns()
Programmable data model columns |
int |
getValuesInPoint()
Gets the count of the data columns at each point in the data model. |
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. |
void |
resumeListeners()
Resumes all listeners that are registered for this data model. |
void |
setColumns(java.util.Map<DataColumnType,DataModelColumn> columns)
Programmable data model columns |
void |
suspendListeners()
Suspends all listeners that are registered for this data model. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface lt.monarch.chart.models.ArrayDataModel |
|---|
getPointCount, getValueAt, setValueAt |
| Methods inherited from interface lt.monarch.chart.models.MatrixDataModel |
|---|
getPointCount, getValueAt, setValueAt |
| Methods inherited from interface lt.monarch.chart.models.DataModel |
|---|
hasColumn |
| Field Detail |
|---|
protected java.util.Map<DataColumnType,DataModelColumn> columns
protected boolean suspended
protected final DefaultListenerList<ChartDataModelListener> dataListeners
protected java.util.ArrayList<java.lang.Object>[] data
protected DataModelDimensions dimensions
| Constructor Detail |
|---|
public AbstractDataModel()
| Method Detail |
|---|
public void addListener(ChartDataModelListener listener)
DataModel
addListener in interface DataModellistener - the chart data model listenerpublic void removeListener(ChartDataModelListener listener)
DataModel
removeListener in interface DataModellistener - the chart data model listenerpublic DataModelDimensions getAddressDimensions()
DataModel
getAddressDimensions in interface DataModelpublic int getValuesInPoint()
DataModel
getValuesInPoint in interface DataModelpublic ArrayDataModel castToArray()
DataModel
castToArray in interface DataModelpublic MatrixDataModel castToMatrix()
DataModel
castToMatrix in interface DataModelpublic void fireDataChanged(DataModelChangeEvent event)
ChartDataModelListener objects that
registered themselves as listeners for this chart data model.
fireDataChanged in interface DataModelevent - the event to be forwarded
public void addColumn(DataColumnType type,
DataModelColumn column)
ArrayDataModel
addColumn in interface ArrayDataModeltype - new data column typecolumn - new data column objectpublic void dispose()
DataModel
dispose in interface DataModelpublic void suspendListeners()
public void resumeListeners()
public java.util.Map<DataColumnType,DataModelColumn> getColumns()
public void setColumns(java.util.Map<DataColumnType,DataModelColumn> columns)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||