/[schmitzm]/branches/1.0-gt2-2.6/src/skrueger/geotools/selection/StyledLayerSelectionModelSynchronizer.java
ViewVC logotype

Diff of /branches/1.0-gt2-2.6/src/skrueger/geotools/selection/StyledLayerSelectionModelSynchronizer.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 150 by mojays, Sat May 30 14:29:58 2009 UTC revision 151 by alfonx, Fri Jun 19 16:22:29 2009 UTC
# Line 10  import org.apache.log4j.Logger; Line 10  import org.apache.log4j.Logger;
10   * The {@link StyledLayerSelectionModelSynchronizer} is the super class for all   * The {@link StyledLayerSelectionModelSynchronizer} is the super class for all
11   *   *
12   * @author mojays   * @author mojays
13   *   *
14   * @param <E>   * @param <E>
15     *            The concrete implementation of {@link StyledLayerSelectionModel}
16     *            that this Synchronizer works on.
17   */   */
18  public abstract class StyledLayerSelectionModelSynchronizer<E extends StyledLayerSelectionModel<?>> implements PropertyChangeListener{  public abstract class StyledLayerSelectionModelSynchronizer<E extends StyledLayerSelectionModel<?>>
19                    implements PropertyChangeListener {
20          protected final Logger LOGGER = Logger.getLogger(this.getClass());          protected final Logger LOGGER = Logger.getLogger(this.getClass());
21            
22            /** Flag to avoid event circles between {@link DpLayerVectorSelectionModel}          /**
23             *  and {@link ListSelectionModel} of the feature table. */           * Flag to avoid event circles between {@link DpLayerVectorSelectionModel}
24            protected boolean selectionChangeCausedByMe = false;           * and {@link ListSelectionModel} of the feature table.
25            /** Holds the selection model of the layer to keep synchronized           */
26             *  with the feature table. */          protected boolean selectionChangeCausedByMe = false;
27            protected final E layerSelModel;          /**
28             * Holds the selection model of the layer to keep synchronized with the
29            /**           * feature table.
30                   * Creates a new synchronizer           */
31                   *          protected final E layerSelModel;
32                   * @param layerSelModel  
33                   *            layer selection model to keep synchronized with          /**
34                   */           * Allows to enable/disable the Synchronizer's functionality it.
35                  protected StyledLayerSelectionModelSynchronizer(E layerSelModel) {           */
36            private boolean enabled = true;
37                          this.layerSelModel = layerSelModel;  
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  }  }

Legend:
Removed from v.150  
changed lines
  Added in v.151

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26