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