1 |
alfonx |
96 |
package skrueger.geotools.selection; |
2 |
|
|
|
3 |
|
|
import java.beans.PropertyChangeListener; |
4 |
|
|
|
5 |
|
|
import javax.swing.ListSelectionModel; |
6 |
|
|
|
7 |
|
|
import skrueger.geotools.selection.StyledLayerSelectionModel; |
8 |
|
|
|
9 |
|
|
public abstract class StyledLayerSelectionModelSynchronizer<E> implements PropertyChangeListener{ |
10 |
|
|
|
11 |
|
|
/** Flag to avoid event circles between {@link DpLayerVectorSelectionModel} |
12 |
|
|
* and {@link ListSelectionModel} of the feature table. */ |
13 |
|
|
protected boolean selectionChangeCausedByMe = false; |
14 |
|
|
/** Holds the selection model of the layer to keep synchronized |
15 |
|
|
* with the feature table. */ |
16 |
|
|
protected final StyledLayerSelectionModel<E> layerSelModel; |
17 |
|
|
|
18 |
|
|
/** |
19 |
|
|
* Creates a new synchronizer |
20 |
|
|
* |
21 |
|
|
* @param layerSelModel |
22 |
|
|
* layer selection model to keep synchronized with |
23 |
|
|
*/ |
24 |
|
|
protected StyledLayerSelectionModelSynchronizer( |
25 |
|
|
StyledLayerSelectionModel<E> layerSelModel) { |
26 |
|
|
|
27 |
|
|
this.layerSelModel = layerSelModel; |
28 |
|
|
} |
29 |
|
|
|
30 |
|
|
} |