[Schmitzm-commits] r1363 - in trunk/src/schmitzm/geotools: gui/resource/locales styling

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Sun Dec 26 22:40:53 CET 2010


Author: alfonx
Date: 2010-12-26 22:40:53 +0100 (Sun, 26 Dec 2010)
New Revision: 1363

Modified:
   trunk/src/schmitzm/geotools/gui/resource/locales/GTResourceBundle.properties
   trunk/src/schmitzm/geotools/gui/resource/locales/GTResourceBundle_de.properties
   trunk/src/schmitzm/geotools/styling/StylingUtil.java
Log:


Modified: trunk/src/schmitzm/geotools/gui/resource/locales/GTResourceBundle.properties
===================================================================
--- trunk/src/schmitzm/geotools/gui/resource/locales/GTResourceBundle.properties	2010-12-26 20:20:41 UTC (rev 1362)
+++ trunk/src/schmitzm/geotools/gui/resource/locales/GTResourceBundle.properties	2010-12-26 21:40:53 UTC (rev 1363)
@@ -191,4 +191,4 @@
 AtlasFeatureLayerFilterDialog.WindowTitle = Filter by attribute: ${0}
 FilterTableCellEditor.FilterDialogTitle = Filter for ${0} (${1}), ${2}
 
-ScalePane.OGCScale=Scale: 1:${0}
\ No newline at end of file
+ScalePane.OGCScale=Scale: 1:${0}

Modified: trunk/src/schmitzm/geotools/gui/resource/locales/GTResourceBundle_de.properties
===================================================================
--- trunk/src/schmitzm/geotools/gui/resource/locales/GTResourceBundle_de.properties	2010-12-26 20:20:41 UTC (rev 1362)
+++ trunk/src/schmitzm/geotools/gui/resource/locales/GTResourceBundle_de.properties	2010-12-26 21:40:53 UTC (rev 1363)
@@ -189,4 +189,4 @@
 AtlasFeatureLayerFilterDialog.AttributeTableHeader.VariableName=Variable
 AtlasFeatureLayerFilterDialog.WindowTitle=Attributfilter\: ${0}
 
-ScalePane.OGCScale=Maßstab: 1:${0}
\ No newline at end of file
+ScalePane.OGCScale=Ma\ufffdstab: 1:${0}

Modified: trunk/src/schmitzm/geotools/styling/StylingUtil.java
===================================================================
--- trunk/src/schmitzm/geotools/styling/StylingUtil.java	2010-12-26 20:20:41 UTC (rev 1362)
+++ trunk/src/schmitzm/geotools/styling/StylingUtil.java	2010-12-26 21:40:53 UTC (rev 1363)
@@ -128,6 +128,7 @@
 import org.opengis.filter.And;
 import org.opengis.filter.Filter;
 import org.opengis.filter.FilterFactory;
+import org.opengis.filter.FilterFactory2;
 import org.opengis.filter.PropertyIsEqualTo;
 import org.opengis.filter.expression.Expression;
 import org.opengis.filter.expression.Function;
@@ -3138,5 +3139,36 @@
 		}
 		sym.setGeometryPropertyName(newGpn == null ? null : newGpn.toString());
 	}
+    /***************************************************************************
+     * 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 Tzeggai</a>
+     */
 
+    public static void copyAllValues(final TextSymbolizer from,
+                    final TextSymbolizer to) {
+            to.setLabel(from.getLabel());
+            to.setPriority(from.getPriority());
+
+            // TODO Does not copy all that has to be copied!
+
+            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