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

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

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

revision 103 by mojays, Fri May 8 13:48:00 2009 UTC revision 104 by alfonx, Fri May 8 13:49:34 2009 UTC
# Line 30  import org.geotools.styling.Rule; Line 30  import org.geotools.styling.Rule;
30  import org.geotools.styling.RuleImpl;  import org.geotools.styling.RuleImpl;
31  import org.geotools.styling.Style;  import org.geotools.styling.Style;
32  import org.geotools.styling.StyleImpl;  import org.geotools.styling.StyleImpl;
33    import org.geotools.styling.Symbolizer;
34  import org.opengis.filter.Filter;  import org.opengis.filter.Filter;
35  import org.opengis.filter.FilterVisitor;  import org.opengis.filter.FilterVisitor;
36  import org.opengis.layer.StyleURL;  import org.opengis.layer.StyleURL;
# Line 40  import schmitzm.geotools.map.event.Featu Line 41  import schmitzm.geotools.map.event.Featu
41  import schmitzm.geotools.map.event.JMapPaneEvent;  import schmitzm.geotools.map.event.JMapPaneEvent;
42  import schmitzm.geotools.map.event.JMapPaneListener;  import schmitzm.geotools.map.event.JMapPaneListener;
43  import schmitzm.geotools.styling.StylingUtil;  import schmitzm.geotools.styling.StylingUtil;
44    import schmitzm.lang.LangUtil;
45  import skrueger.geotools.StyledFeatureCollectionInterface;  import skrueger.geotools.StyledFeatureCollectionInterface;
46  import skrueger.geotools.StyledMapInterface;  import skrueger.geotools.StyledMapInterface;
47  import skrueger.geotools.selection.StyledFeatureLayerSelectionModel;  import skrueger.geotools.selection.StyledFeatureLayerSelectionModel;
# Line 131  public class FeatureMapLayerSelectionSyn Line 133  public class FeatureMapLayerSelectionSyn
133                  selectionChangeCausedByMe = false;                  selectionChangeCausedByMe = false;
134          }          }
135    
136          private void changeLayerStyle(Vector<Feature> newSelection) {          private void changeLayerStyle(final Vector<Feature> newSelection) {
137                  Style selectionMapStyle = null;                  Style selectionMapStyle = null;
138                  try {                  try {
139                          if (newSelection.isEmpty()) {                          if (newSelection.isEmpty()) {
# Line 159  public class FeatureMapLayerSelectionSyn Line 161  public class FeatureMapLayerSelectionSyn
161    
162                                          @Override                                          @Override
163                                          public boolean evaluate(Object obj) {                                          public boolean evaluate(Object obj) {
164                                                                                                    if (obj instanceof Feature) {
165                                                            Feature f = (Feature)obj;
166                                                            LOGGER.info("treffer");
167                                                            return newSelection.contains(f);
168                                                            
169                                                    }
170                                                    LOGGER.info("kein treffer");
171                                                  return false;                                                  return false;
172                                          }                                          }
173                                                                                    
174                                  });                                  });
175                                                                    
176                                    Symbolizer[] symbolizers = selectedRule.getSymbolizers();
177                                    Style selectedStyle = StylingUtil.createDefaultStyle(styledMapLayer.getGeoObject());
178                                    LangUtil.extendArray(symbolizers, selectedStyle);
179                                    selectedRule.setSymbolizers(symbolizers);
180                                    
181                                    LangUtil.extendArray(rules, selectedRule);
182                                                                    
183  //                              selectionMapStyle.setFeatureTypeStyles(originalStyle.getF)  //                              selectionMapStyle.setFeatureTypeStyles(originalStyle.getF)
184                                                                    

Legend:
Removed from v.103  
changed lines
  Added in v.104

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26