|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ChartDataTransform
Interface for classes which can transform a data source into a List of objects that can be fed into
a MetaDatasetProducer
. Usually, the data source will just be another object, possibly
even a List itself or an object with some property that is a List.
Users of a ChartDataTransform
can also register with it to receive notifications when
the data source has changed in a way that affects the chart data. Currently, most MetaDatasetProducers
can handle mods to existing data and new data being added. Can't handle data being deleted. The
events are broadcast just like an ObservableList
.
Field Summary | |
---|---|
static java.lang.String |
PROP_DATA_SOURCE
|
Method Summary | |
---|---|
java.lang.Object |
getChartDataItem(java.lang.Object keyData)
Using the passed in object, return any matching data from the data source. |
java.util.List |
getDataList()
Generates or extracts list with the data objects used to produce a chart Dataset
from a stored data object. |
java.lang.Object |
getDataSource()
Retrieve the data source that is used. |
java.lang.Object |
getOriginalDataItem(java.lang.Object chartData)
The opposite of getChartDataItem , invoked with information from the chart. |
void |
releaseDataSource()
Tells the transform that its work is done. |
Methods inherited from interface org.progeeks.util.beans.StandardBean |
---|
addPropertyChangeListener, addPropertyChangeListener, hasListeners, hasListeners, removePropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener |
Field Detail |
---|
static final java.lang.String PROP_DATA_SOURCE
Method Detail |
---|
java.util.List getDataList()
Dataset
from a stored data object.
java.lang.UnsupportedOperationException
- - if this transform does not support this operationjava.lang.Object getChartDataItem(java.lang.Object keyData)
ResultSet
to a chart controller in a setFocus
call. The
transform could translate the result set into a List of beans that the chart controller can
then use a DatasetProducer to find the corresponding points on the chart.
keyData
-
java.lang.Object getDataSource()
setDataSource
call
to make the property immutable. Once a Transform has been build and is creating data for a chart,
you don't want to remove the whole underlying data structure, largely because charts aren't good
at deleting data.
java.lang.Object getOriginalDataItem(java.lang.Object chartData)
getChartDataItem
, invoked with information from the chart.
Attempts to return the original data object that is represented by the passed parameter.
Useful for when a user action on the chart needs to be broadcast outside of the chart context
in a form that other components can understand.
chartData
- If the List that was passed to the chart originally from
getDataList
contained the actual data from the DataSource, then
chartData
can just be returned directly. Otherwise,
chartData
should contain enough information for the transform to
know how to retrieve the original information. For example, chartData
may be a clone of the original object.
original data cannot be obtained.void releaseDataSource()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |