2 |
* Copyright (c) 2009 Martin O. J. Schmitz. |
* Copyright (c) 2009 Martin O. J. Schmitz. |
3 |
* |
* |
4 |
* This file is part of the SCHMITZM library - a collection of utility |
* This file is part of the SCHMITZM library - a collection of utility |
5 |
* classes based on Java 1.6, focussing (not only) on Java Swing |
* classes based on Java 1.6, focusing (not only) on Java Swing |
6 |
* and the Geotools library. |
* and the Geotools library. |
7 |
* |
* |
8 |
* The SCHMITZM project is hosted at: |
* The SCHMITZM project is hosted at: |
63 |
implements DatasetSelectionListener { |
implements DatasetSelectionListener { |
64 |
|
|
65 |
/** Holds the chart datset to keep synchronized with the layer selection model. */ |
/** Holds the chart datset to keep synchronized with the layer selection model. */ |
66 |
protected FeatureDatasetSelectionModel<?> datasetSelModel = null; |
protected FeatureDatasetSelectionModel<?,?,?> datasetSelModel = null; |
67 |
|
|
68 |
/** |
/** |
69 |
* Creates a new synchronizer. |
* Creates a new synchronizer. |
74 |
* dataset selection model to keep synchronized with the layer |
* dataset selection model to keep synchronized with the layer |
75 |
* selection model |
* selection model |
76 |
*/ |
*/ |
77 |
public ChartSelectionSynchronizer(StyledFeatureLayerSelectionModel layerSelModel, FeatureDatasetSelectionModel<?> datasetSelModel) { |
public ChartSelectionSynchronizer(StyledFeatureLayerSelectionModel layerSelModel, FeatureDatasetSelectionModel<?,?,?> datasetSelModel) { |
78 |
super(layerSelModel); |
super(layerSelModel); |
79 |
this.datasetSelModel = datasetSelModel; |
this.datasetSelModel = datasetSelModel; |
80 |
} |
} |
88 |
*/ |
*/ |
89 |
@Override |
@Override |
90 |
public void propertyChange(PropertyChangeEvent evt) { |
public void propertyChange(PropertyChangeEvent evt) { |
91 |
|
|
92 |
|
if (!isEnabled()) |
93 |
|
return; |
94 |
|
|
95 |
if (!(evt instanceof StyledLayerSelectionEvent)) |
if (!(evt instanceof StyledLayerSelectionEvent)) |
96 |
return; |
return; |
97 |
StyledLayerSelectionEvent selEvt = (StyledLayerSelectionEvent) evt; |
StyledLayerSelectionEvent selEvt = (StyledLayerSelectionEvent) evt; |