[Schmitzm-commits] r242 - trunk/src/schmitzm/geotools/styling
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Jul 28 14:06:41 CEST 2009
Author: alfonx
Date: 2009-07-28 14:06:39 +0200 (Tue, 28 Jul 2009)
New Revision: 242
Modified:
trunk/src/schmitzm/geotools/styling/StylingUtil.java
Log:
* Removed some deprecated methods from ASUtil.
* Moved a method
copyAllValues(TextSymbolizer from, TextSymbolozer to)
from ASUtil.java to StylingUtil.java in SCHMITZM
Modified: trunk/src/schmitzm/geotools/styling/StylingUtil.java
===================================================================
--- trunk/src/schmitzm/geotools/styling/StylingUtil.java 2009-07-28 09:03:44 UTC (rev 241)
+++ trunk/src/schmitzm/geotools/styling/StylingUtil.java 2009-07-28 12:06:39 UTC (rev 242)
@@ -91,6 +91,7 @@
import org.opengis.coverage.grid.Grid;
import org.opengis.coverage.grid.GridCoverage;
import org.opengis.filter.Filter;
+import org.opengis.filter.FilterFactory2;
import org.opengis.filter.expression.Expression;
import org.opengis.filter.expression.Literal;
import org.opengis.filter.expression.NilExpression;
@@ -2085,4 +2086,31 @@
}
+ /***************************************************************************
+ * Copies all Values from one {@link TextSymbolizer} to another
+ * {@link TextSymbolizer}
+ *
+ * @param from {@link TextSymbolizer} source
+ * @param to {@link TextSymbolizer} target. May not be <code>null</code>.
+ *
+ * @author <a href="mailto:skpublic at wikisquare.de">Stefan Alfons
+ * Krüger</a>
+ */
+ public static void copyAllValues(final TextSymbolizer from,
+ final TextSymbolizer to) {
+ to.setLabel(from.getLabel());
+
+ final FilterFactory2 ff2 = FeatureUtil.FILTER_FACTORY2;
+
+ to.getFonts()[0].setFontFamily(ff2.literal(from.getFonts()[0]
+ .getFontFamily().toString()));
+ to.getFonts()[0].setFontSize(ff2.literal(from.getFonts()[0]
+ .getFontSize().toString()));
+ to.getFonts()[0].setFontWeight(ff2.literal(from.getFonts()[0]
+ .getFontWeight().toString()));
+ to.getFonts()[0].setFontStyle(ff2.literal(from.getFonts()[0]
+ .getFontStyle().toString()));
+ }
+
+
}
More information about the Schmitzm-commits
mailing list