[Schmitzm-commits] r125 - trunk/src/skrueger/geotools/selection
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Sat May 23 13:33:59 CEST 2009
Author: alfonx
Date: 2009-05-23 13:33:59 +0200 (Sat, 23 May 2009)
New Revision: 125
Modified:
trunk/src/skrueger/geotools/selection/FeatureMapLayerSelectionSynchronizer.java
Log:
* Just code layout
Modified: trunk/src/skrueger/geotools/selection/FeatureMapLayerSelectionSynchronizer.java
===================================================================
--- trunk/src/skrueger/geotools/selection/FeatureMapLayerSelectionSynchronizer.java 2009-05-21 21:01:59 UTC (rev 124)
+++ trunk/src/skrueger/geotools/selection/FeatureMapLayerSelectionSynchronizer.java 2009-05-23 11:33:59 UTC (rev 125)
@@ -144,7 +144,7 @@
// the atlas, this always return the default style, but
// additionaly styles might be selected.
// Taking the style from the mapLayer indicated, that we have to
- // remove any selection rules first.
+ // remove any selection rules first.
Style originalStyle = mapLayer.getStyle();
// TODO The default style is not good here. We need
@@ -176,7 +176,8 @@
public boolean evaluate(Object obj) {
if (obj instanceof Feature) {
Feature f = (Feature) obj;
- // TODO BAD CODE! says Martin.. i am fine with it.. well.. not great...
+ // TODO BAD CODE! says Martin.. i am fine
+ // with it.. well.. not great...
for (String ffID : newSelection) {
if (ffID.equals(f.getID()))
return true;
@@ -189,30 +190,34 @@
});
- FeatureTypeStyle[] originalFeatureTypeStyles = originalStyle.getFeatureTypeStyles();
- FeatureTypeStyle[] newFeatureTypes ;
- if (originalFeatureTypeStyles[originalFeatureTypeStyles.length-1].getName() != null && originalFeatureTypeStyles[originalFeatureTypeStyles.length-1].getName().equals(SELECTION_STYLING)){
- newFeatureTypes = Arrays.copyOf(originalFeatureTypeStyles, originalFeatureTypeStyles.length-1);
+ FeatureTypeStyle[] originalFeatureTypeStyles = originalStyle
+ .getFeatureTypeStyles();
+ FeatureTypeStyle[] newFeatureTypes;
+ if (originalFeatureTypeStyles[originalFeatureTypeStyles.length - 1]
+ .getName() != null
+ && originalFeatureTypeStyles[originalFeatureTypeStyles.length - 1]
+ .getName().equals(SELECTION_STYLING)) {
+ newFeatureTypes = Arrays.copyOf(originalFeatureTypeStyles,
+ originalFeatureTypeStyles.length - 1);
} else {
newFeatureTypes = originalFeatureTypeStyles;
}
-//
-// // REMOVE any Selection_Styling FTS (usually the last one)
-//
-// for (FeatureTypeStyle fts : originalFeatureTypeStyles){
-// if (fts.getName().equals(SELECTION_STYLING)) continue;
-// newFeatureTypes =
-//
-// LangUtil.extendArray(
-// originalFeatureTypeStyles, selectionMapStyle
-// .getFeatureTypeStyles());
-// }
-
+ //
+ // // REMOVE any Selection_Styling FTS (usually the last one)
+ //
+ // for (FeatureTypeStyle fts : originalFeatureTypeStyles){
+ // if (fts.getName().equals(SELECTION_STYLING)) continue;
+ // newFeatureTypes =
+ //
+ // LangUtil.extendArray(
+ // originalFeatureTypeStyles, selectionMapStyle
+ // .getFeatureTypeStyles());
+ // }
+
// The last FTS is the selection FTS
- newFeatureTypes = LangUtil.extendArray(newFeatureTypes, selectionMapStyle
- .getFeatureTypeStyles());
-
-
+ newFeatureTypes = LangUtil.extendArray(newFeatureTypes,
+ selectionMapStyle.getFeatureTypeStyles());
+
selectionMapStyle.setFeatureTypeStyles(newFeatureTypes);
// selectionMapStyle.setFeatureTypeStyles(originalStyle.getF)
More information about the Schmitzm-commits
mailing list