[Schmitzm-commits] r104 - in trunk: dist src/skrueger/geotools/selection
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri May 8 15:49:38 CEST 2009
Author: alfonx
Date: 2009-05-08 15:49:34 +0200 (Fri, 08 May 2009)
New Revision: 104
Modified:
trunk/dist/schmitzm-src.zip
trunk/dist/schmitzm.jar
trunk/src/skrueger/geotools/selection/FeatureMapLayerSelectionSynchronizer.java
Log:
(Hacking Session in action - atomic commits can't be ensured)
- Moved Style-cloning methods fro skrueger.sld.Utilities.java to schmitzm-StylingUtil.java
Modified: trunk/dist/schmitzm-src.zip
===================================================================
(Binary files differ)
Modified: trunk/dist/schmitzm.jar
===================================================================
(Binary files differ)
Modified: trunk/src/skrueger/geotools/selection/FeatureMapLayerSelectionSynchronizer.java
===================================================================
--- trunk/src/skrueger/geotools/selection/FeatureMapLayerSelectionSynchronizer.java 2009-05-08 13:48:00 UTC (rev 103)
+++ trunk/src/skrueger/geotools/selection/FeatureMapLayerSelectionSynchronizer.java 2009-05-08 13:49:34 UTC (rev 104)
@@ -30,6 +30,7 @@
import org.geotools.styling.RuleImpl;
import org.geotools.styling.Style;
import org.geotools.styling.StyleImpl;
+import org.geotools.styling.Symbolizer;
import org.opengis.filter.Filter;
import org.opengis.filter.FilterVisitor;
import org.opengis.layer.StyleURL;
@@ -40,6 +41,7 @@
import schmitzm.geotools.map.event.JMapPaneEvent;
import schmitzm.geotools.map.event.JMapPaneListener;
import schmitzm.geotools.styling.StylingUtil;
+import schmitzm.lang.LangUtil;
import skrueger.geotools.StyledFeatureCollectionInterface;
import skrueger.geotools.StyledMapInterface;
import skrueger.geotools.selection.StyledFeatureLayerSelectionModel;
@@ -131,7 +133,7 @@
selectionChangeCausedByMe = false;
}
- private void changeLayerStyle(Vector<Feature> newSelection) {
+ private void changeLayerStyle(final Vector<Feature> newSelection) {
Style selectionMapStyle = null;
try {
if (newSelection.isEmpty()) {
@@ -159,13 +161,25 @@
@Override
public boolean evaluate(Object obj) {
-
+ if (obj instanceof Feature) {
+ Feature f = (Feature)obj;
+ LOGGER.info("treffer");
+ return newSelection.contains(f);
+
+ }
+ LOGGER.info("kein treffer");
return false;
}
});
+ Symbolizer[] symbolizers = selectedRule.getSymbolizers();
+ Style selectedStyle = StylingUtil.createDefaultStyle(styledMapLayer.getGeoObject());
+ LangUtil.extendArray(symbolizers, selectedStyle);
+ selectedRule.setSymbolizers(symbolizers);
+ LangUtil.extendArray(rules, selectedRule);
+
// selectionMapStyle.setFeatureTypeStyles(originalStyle.getF)
// Flat copy the style
More information about the Schmitzm-commits
mailing list