skrueger.geotools.selection
Class ChartSelectionSynchronizer
java.lang.Object
skrueger.geotools.selection.StyledLayerSelectionModelSynchronizer<StyledFeatureLayerSelectionModel>
skrueger.geotools.selection.ChartSelectionSynchronizer
- All Implemented Interfaces:
- PropertyChangeListener, EventListener, DatasetSelectionListener
public class ChartSelectionSynchronizer
- extends StyledLayerSelectionModelSynchronizer<StyledFeatureLayerSelectionModel>
- implements DatasetSelectionListener
This class keeps the selection of a Dataset
(based on feature
attributes) synchronized with the StyledLayerSelectionModel
of a layer.
This is done by implementing:
After creating, the instance of this synchronizer must be added as listener
to both, the StyledLayerSelectionModel
and the chart's
DatasetSelectionModel
(e.g. the renderer).
- Author:
- Martin Schmitz
- See Also:
DatasetSelectionModelProvider
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
datasetSelModel
protected FeatureDatasetSelectionModel<?,?,?> datasetSelModel
- Holds the chart datset to keep synchronized with the layer selection model.
ChartSelectionSynchronizer
public ChartSelectionSynchronizer(StyledFeatureLayerSelectionModel layerSelModel,
FeatureDatasetSelectionModel<?,?,?> datasetSelModel)
- Creates a new synchronizer.
- Parameters:
layerSelModel
- layer selection model to keep synchronized with the dataset
selection modeldatasetSelModel
- dataset selection model to keep synchronized with the layer
selection model
propertyChange
public void propertyChange(PropertyChangeEvent evt)
- Called by
StyledLayerSelectionModel
when the selection on other
selection components (map, table, ...) has changed. When calling this
method changes the dataset selection according to the
StyledLayerSelectionModel
selection.
- Specified by:
propertyChange
in interface PropertyChangeListener
- Parameters:
evt
- an event
selectionChanged
public void selectionChanged(DatasetSelectionChangeEvent evt)
- Called when the chart selection is changed by the user. When calling this
method changes the selection of the
StyledLayerSelectionModel
.
- Specified by:
selectionChanged
in interface DatasetSelectionListener
- Parameters:
evt
- an event