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

Diff of /branches/2.0-RC2/src/skrueger/geotools/selection/FeatureMapLayerSelectionSynchronizer.java

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

revision 100 by alfonx, Fri May 8 12:29:45 2009 UTC revision 101 by alfonx, Fri May 8 13:17:02 2009 UTC
# Line 26  import javax.swing.text.Utilities; Line 26  import javax.swing.text.Utilities;
26    
27  import org.geotools.feature.Feature;  import org.geotools.feature.Feature;
28  import org.geotools.map.MapLayer;  import org.geotools.map.MapLayer;
29    import org.geotools.styling.Rule;
30    import org.geotools.styling.RuleImpl;
31  import org.geotools.styling.Style;  import org.geotools.styling.Style;
32    import org.geotools.styling.StyleImpl;
33    import org.opengis.filter.Filter;
34    import org.opengis.filter.FilterVisitor;
35    import org.opengis.layer.StyleURL;
36    
37  import schmitzm.geotools.gui.FeatureCollectionTableModel;  import schmitzm.geotools.gui.FeatureCollectionTableModel;
38  import schmitzm.geotools.gui.JMapPane;  import schmitzm.geotools.gui.JMapPane;
# Line 135  public class FeatureMapLayerSelectionSyn Line 141  public class FeatureMapLayerSelectionSyn
141                                                                    
142                          } else {                          } else {
143                                  LOGGER.debug("SELECTION .. change style");                                  LOGGER.debug("SELECTION .. change style");
                                 selectionMapStyle = StylingUtil  
                                                 .createDefaultStyle(styledMapLayer.getGeoObject());  
144                                                                    
145                                  selectionMapStyle = styledMapLayer.getStyle();                                  Style originalStyle = styledMapLayer.getStyle();
146                                    
147                                    // TODO This clone is a deep clone and it is slow..
148                                    selectionMapStyle =  StylingUtil.clone(originalStyle);
149                                    
150                                    Rule[] rules = selectionMapStyle.getFeatureTypeStyles()[0].getRules();
151                                    
152                                    Rule selectedRule = StylingUtil.STYLE_FACTORY.createRule();
153                                    selectedRule.setFilter(new Filter() {
154    
155                                            @Override
156                                            public Object accept(FilterVisitor visitor, Object extraData) {
157                                                    return null;
158                                            }
159    
160                                            @Override
161                                            public boolean evaluate(Object obj) {
162                                                    
163                                                    return false;
164                                            }
165                                            
166                                    });
167                                    
168                                    
169    //                              selectionMapStyle.setFeatureTypeStyles(originalStyle.getF)
170                                    
171                                    // Flat copy the style
172                                    
173                                    
174                                    
175                                                                    
176                          }                          }
177    

Legend:
Removed from v.100  
changed lines
  Added in v.101

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26