/[schmitzm]/branches/2.1/src/skrueger/geotools/selection/FeatureMapLayerSelectionSynchronizer.java
ViewVC logotype

Diff of /branches/2.1/src/skrueger/geotools/selection/FeatureMapLayerSelectionSynchronizer.java

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

branches/1.0-gt2-2.6/src/skrueger/geotools/selection/FeatureMapLayerSelectionSynchronizer.java revision 559 by alfonx, Tue Nov 24 14:12:41 2009 UTC branches/2.0-RC2/src/skrueger/geotools/selection/FeatureMapLayerSelectionSynchronizer.java revision 671 by alfonx, Wed Feb 3 19:08:37 2010 UTC
# Line 42  Line 42 
42   **/   **/
43  package skrueger.geotools.selection;  package skrueger.geotools.selection;
44    
 import java.awt.RenderingHints;  
45  import java.beans.PropertyChangeEvent;  import java.beans.PropertyChangeEvent;
46  import java.beans.PropertyChangeListener;  import java.beans.PropertyChangeListener;
47  import java.io.File;  import java.io.File;
 import java.util.HashMap;  
48  import java.util.HashSet;  import java.util.HashSet;
49  import java.util.Iterator;  import java.util.Iterator;
50  import java.util.Set;  import java.util.Set;
# Line 60  import org.geotools.feature.FeatureColle Line 58  import org.geotools.feature.FeatureColle
58  import org.geotools.feature.FeatureIterator;  import org.geotools.feature.FeatureIterator;
59  import org.geotools.filter.FidFilterImpl;  import org.geotools.filter.FidFilterImpl;
60  import org.geotools.map.MapLayer;  import org.geotools.map.MapLayer;
 import org.geotools.renderer.GTRenderer;  
 import org.geotools.renderer.label.LabelCacheImpl;  
 import org.geotools.renderer.lite.StreamingRenderer;  
61  import org.geotools.styling.FeatureTypeStyle;  import org.geotools.styling.FeatureTypeStyle;
62  import org.geotools.styling.Style;  import org.geotools.styling.Style;
63  import org.geotools.styling.visitor.DuplicatingStyleVisitor;  import org.geotools.styling.visitor.DuplicatingStyleVisitor;
# Line 73  import org.opengis.filter.Not; Line 68  import org.opengis.filter.Not;
68  import org.opengis.filter.identity.FeatureId;  import org.opengis.filter.identity.FeatureId;
69    
70  import schmitzm.geotools.FilterUtil;  import schmitzm.geotools.FilterUtil;
 import schmitzm.geotools.GTUtil;  
71  import schmitzm.geotools.gui.SelectableXMapPane;  import schmitzm.geotools.gui.SelectableXMapPane;
72  import schmitzm.geotools.map.event.FeatureSelectedEvent;  import schmitzm.geotools.map.event.FeatureSelectedEvent;
73  import schmitzm.geotools.map.event.JMapPaneListener;  import schmitzm.geotools.map.event.JMapPaneListener;
# Line 268  public class FeatureMapLayerSelectionSyn Line 262  public class FeatureMapLayerSelectionSyn
262                                  } else {                                  } else {
263                                          Set<FeatureId> fids = new HashSet<FeatureId>();                                          Set<FeatureId> fids = new HashSet<FeatureId>();
264                                          for (String fid : newSelection) {                                          for (String fid : newSelection) {
265                                                  fids.add(FilterUtil.FILTER_FAC2.featureId(fid));                                                  if (fid != null)
266                                                            fids.add(FilterUtil.FILTER_FAC2.featureId(fid));
267                                          }                                          }
268    
269                                          selectionFTStyle.rules().get(0).setFilter(                                          selectionFTStyle.rules().get(0).setFilter(
# Line 323  public class FeatureMapLayerSelectionSyn Line 318  public class FeatureMapLayerSelectionSyn
318          }          }
319    
320          /**          /**
321           * Analyses whether the selection has changed in comparison to the selection           * Analyzes whether the selection has changed in comparison to the selection
322           * stored in the mapLayer.Style           * stored in the mapLayer.Style
323           *           *
324           * @param newSelection           * @param newSelection a List<String> of all newly selected FIDs
325           * @param originalStyle           * @param originalStyle the original {@link Style} that has an earlier selection coded into the {@link Style}
326           * @return           * @return <code>true</code> if changed.
327           */           */
328          private boolean selectionChanged(Vector<String> newSelection,          private boolean selectionChanged(Vector<String> newSelection,
329                          Style originalStyle) {                          Style originalStyle) {

Legend:
Removed from v.559  
changed lines
  Added in v.671

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26