[Schmitzm-commits] r868 - trunk/src/schmitzm/geotools/styling

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu May 27 01:25:25 CEST 2010


Author: alfonx
Date: 2010-05-27 01:25:21 +0200 (Thu, 27 May 2010)
New Revision: 868

Modified:
   trunk/src/schmitzm/geotools/styling/StylingUtil.java
Log:
.equals(...) instead of .equal(...)!


Modified: trunk/src/schmitzm/geotools/styling/StylingUtil.java
===================================================================
--- trunk/src/schmitzm/geotools/styling/StylingUtil.java	2010-05-26 22:42:07 UTC (rev 867)
+++ trunk/src/schmitzm/geotools/styling/StylingUtil.java	2010-05-26 23:25:21 UTC (rev 868)
@@ -228,9 +228,9 @@
 							.colorExpression(Color.YELLOW.brighter())), size3,
 					zeroLit) }, new org.geotools.styling.Symbol[0],
 			FeatureUtil.FILTER_FACTORY2.literal(1), size3, zeroLit);
-	
-	public static final String SELECTION_RULE_ID = "SelectionRule marking selected features";
 
+	public static final String SELECTION_RULE_ID = "SelectionRule";
+
 	/**
 	 * Erstellt einen Default-Style fuer die Klassen/Interfaces:
 	 * StyledFeaturesInterface, GridCoverage2D, FeatureCollection, FeatureSource
@@ -1806,18 +1806,14 @@
 	 */
 	public static FeatureTypeStyle createSelectionStyle(
 			GeometryForm geometryForm) {
-		// /**
-		// * Let's see if we have a cached version of the requested style.
-		// */
-		// if (selectionStyles.containsKey(geometryForm))
-		// return selectionStyles.get(geometryForm);
-
 		Symbolizer[] symbolizers = createSelectionSymbolizers(geometryForm);
 
-		return STYLE_BUILDER.createFeatureTypeStyle(symbolizers,0.0,
+		return STYLE_BUILDER.createFeatureTypeStyle(symbolizers, 0.0,
 				Double.POSITIVE_INFINITY);
 	}
 
+	
+	
 	/**
 	 * Creates a rule which paints features as selected.
 	 * 
@@ -1838,19 +1834,20 @@
 
 		Rule rule = STYLE_FACTORY.createRule();
 		rule.setName(SELECTION_RULE_ID);
+		rule.setTitle("marking selected features");
 
 		// Filter: Eine OR Filter Verknüpfung für jede Selektions EQUALS
 		List<Filter> equals = new ArrayList<Filter>();
 		if (selectionIds.size() > 0) {
 			for (String id : selectionIds) {
-				Equals equal = FilterUtil.FILTER_FAC2.equal(
-						FilterUtil.FILTER_FAC2.literal(id),
-						FilterUtil.FILTER_FAC2.property(idPropertyName));
+				PropertyIsEqualTo equal = FilterUtil.FILTER_FAC2.equals(
+						FilterUtil.FILTER_FAC2.property(idPropertyName),
+						FilterUtil.FILTER_FAC2.literal(id));
 				equals.add(equal);
 			}
 			rule.setFilter(FilterUtil.FILTER_FAC2.or(equals));
 		} else {
-			// if nothing is selected, return an empty rule without symbolizers. 
+			// if nothing is selected, return an empty rule without symbolizers.
 			return rule;
 		}
 



More information about the Schmitzm-commits mailing list