public class GaugeModelAdapter extends ModelAdapter implements GaugeModel
DataSource
is the "big"
model.
This model interacts with the DataSource
, retrieving data
and having the data formatted so that the view can display it.
Users of the gauge bean normally do not need to call any of the methods of this class.
Modifier and Type | Field and Description |
---|---|
protected Gauge |
m_gaugeView |
dataAccess, dataDirector, dataDirectorFactory, drillingEnabled, INITIAL_DATA_COLUMN, INITIAL_DATA_ROW, INITIAL_EDGE_SIZE, listenerList, m_eh, metadataAccess
VIEW_PAGE_FIRST, VIEW_PAGE_LAST, VIEW_PAGE_NEXT, VIEW_PAGE_PREVIOUS
Constructor and Description |
---|
GaugeModelAdapter(Gauge gaugeView)
Constructor that does not specify a
DataSource . |
GaugeModelAdapter(Gauge gaugeView,
DataSource dataSource)
Constructor that specifies a
DataSource . |
Modifier and Type | Method and Description |
---|---|
DataMap |
getDataMap() |
Gauge |
getGaugeView()
Retrieves the gauge that uses this model.
|
LayerMetadataMap |
getLayerMetadataMap(int edge) |
MetadataMap |
getMetadataMap(int edge) |
protected void |
initDefaults(GaugeDefaultValues gdv)
Initialize default values from the given GaugeDefaultValues instance.
|
void |
setDataSource(DataSource ds)
Specifies the
DataSource . |
protected void |
setSupportedDataLayerFlags()
This method overrides the setSupportedDataLayerFlags in
ModelAdapter
It checks the supported data layers in datasource and set the data layer
flags to true or false. |
addDataListener, addModelListener, canDrill, canPivot, createDefaultDataSource, drillGestureHappened, fireviewDrillRequested, fireviewDrillRequesting, fireviewPageRequested, fireviewPageRequesting, fireviewPivotRequested, fireviewPivotRequesting, getControllerActions, getDataAccess, getDataDirector, getDataSource, getErrorHandler, getFormatManager, initDefaults, isDrillingEnabled, pageChangeHappened, pageChangeHappened, pivotGestureHappened, pollingRequired, removeDataListener, removeModelListener, setDataAccess, setDataDirector, setDrillingEnabled, setErrorHandler, setFormatManager, viewDataAvailable, viewDataChanged, waitDataAvailable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addDataListener, addModelListener, canDrill, canPivot, drillGestureHappened, getControllerActions, getDataAccess, getDataDirector, getDataSource, getErrorHandler, isDrillingEnabled, pageChangeHappened, pageChangeHappened, pivotGestureHappened, removeDataListener, removeModelListener, setDataAccess, setDataDirector, setDrillingEnabled, setErrorHandler, viewDataChanged
protected Gauge m_gaugeView
public GaugeModelAdapter(Gauge gaugeView)
DataSource
.
The graph constructs this object as part of its initialization.graphView
- The graph that uses this model.public GaugeModelAdapter(Gauge gaugeView, DataSource dataSource)
DataSource
.
The gauge constructs this object as part of its initialization.gaugeView
- The gauge that uses this model.dataSource
- The DataSource
that will feed data to
the gauge. Do not pass null
for this
parameter.protected void initDefaults(GaugeDefaultValues gdv)
public void setDataSource(DataSource ds)
DataSource
.setDataSource
in interface Model
setDataSource
in class ModelAdapter
ds
- The DataSource
that feeds data to the graph.protected void setSupportedDataLayerFlags()
ModelAdapter
It checks the supported data layers in datasource and set the data layer
flags to true or false. If a required data layer is not supported
create a TypeNotSupportedException, else if a requested data layer
is not supported, log an error message to ErrorHandlersetSupportedDataLayerFlags
in class ModelAdapter
public DataMap getDataMap()
getDataMap
in class ModelAdapter
DataMap
.DataMap
.
This method creates a new DataMap
for retrieving unformatted
data from the DataSource
.
Called by the superclass.public MetadataMap getMetadataMap(int edge)
getMetadataMap
in class ModelAdapter
edge
- The edge for which the MetadataMap
is needed.MetadatMap
.MetadataMap
.
This method creates a new MetadataMap
for retrieving
metadata values, such as member labels.
Called by the superclass.public LayerMetadataMap getLayerMetadataMap(int edge)
getLayerMetadataMap
in class ModelAdapter
edge
- The edge for which the LayerMetadataMap
is
needed.LayerMetadataMap
.LayerMetadataMap
.
This method creates a new LayerMetadataMap
for retrieving
metadata values, such as labels.
Called by the superclass.public Gauge getGaugeView()
getGaugeView
in interface GaugeModel