/[schmitzm]/branches/2.0-RC2/src/skrueger/geotools/selection/StyledLayerSelectionModelSynchronizer.java
ViewVC logotype

Contents of /branches/2.0-RC2/src/skrueger/geotools/selection/StyledLayerSelectionModelSynchronizer.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 151 - (show annotations)
Fri Jun 19 16:22:29 2009 UTC (15 years, 8 months ago) by alfonx
Original Path: trunk/src/skrueger/geotools/selection/StyledLayerSelectionModelSynchronizer.java
File MIME type: text/plain
File size: 1645 byte(s)
* Selection stuff technically ready to use! :-) :-) Next translating tooltips etc... 
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 /**
10 * The {@link StyledLayerSelectionModelSynchronizer} is the super class for all
11 *
12 * @author mojays
13 *
14 * @param <E>
15 * The concrete implementation of {@link StyledLayerSelectionModel}
16 * that this Synchronizer works on.
17 */
18 public abstract class StyledLayerSelectionModelSynchronizer<E extends StyledLayerSelectionModel<?>>
19 implements PropertyChangeListener {
20 protected final Logger LOGGER = Logger.getLogger(this.getClass());
21
22 /**
23 * Flag to avoid event circles between {@link DpLayerVectorSelectionModel}
24 * and {@link ListSelectionModel} of the feature table.
25 */
26 protected boolean selectionChangeCausedByMe = false;
27 /**
28 * Holds the selection model of the layer to keep synchronized with the
29 * feature table.
30 */
31 protected final E layerSelModel;
32
33 /**
34 * Allows to enable/disable the Synchronizer's functionality it.
35 */
36 private boolean enabled = true;
37
38 /**
39 * Creates a new synchronizer
40 *
41 * @param layerSelModel
42 * layer selection model to keep synchronized with
43 */
44 protected StyledLayerSelectionModelSynchronizer(E layerSelModel) {
45
46 this.layerSelModel = layerSelModel;
47 }
48
49 /**
50 * Allows to disable this Synchronizer. Used to disable the selection
51 * functionality if no corresponding dialog is open.
52 *
53 * @param enabled
54 * <code>true</code> or <code>false</code>
55 */
56 public void setEnabled(boolean enabled) {
57 this.enabled = enabled;
58 }
59
60 public boolean isEnabled() {
61 return enabled;
62 }
63
64 }

Properties

Name Value
svn:eol-style native
svn:keywords Id
svn:mime-type text/plain

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26