[Schmitzm-commits] r1951 - in trunk/schmitzm-gt/src/main: java/de/schmitzm/geotools/styling java/de/schmitzm/geotools/styling/chartsymbols resources/de/schmitzm/geotools/gui/resource/locales

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Mon Apr 16 01:36:29 CEST 2012


Author: alfonx
Date: 2012-04-16 01:36:29 +0200 (Mon, 16 Apr 2012)
New Revision: 1951

Modified:
   trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/styling/StylingUtil.java
   trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/styling/chartsymbols/ChartGraphic.java
   trunk/schmitzm-gt/src/main/resources/de/schmitzm/geotools/gui/resource/locales/GTResourceBundle.properties
Log:
Translations and JavaDoc for ChartGraphic symbols

Modified: trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/styling/StylingUtil.java
===================================================================
--- trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/styling/StylingUtil.java	2012-04-15 22:33:12 UTC (rev 1950)
+++ trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/styling/StylingUtil.java	2012-04-15 23:36:29 UTC (rev 1951)
@@ -3378,9 +3378,6 @@
 		 * 
 		 * See http://docs.geoserver.org/stable/en/user/styling
 		 * /sld-extensions/geometry-transformations.html
-		 * 
-		 * We only want to update or add the GeoemtryProperty for
-		 * PointSymbolizers working on Polygon geometries:
 		 */
 
 		final String newGpnFinal = newGpn;
@@ -3396,11 +3393,9 @@
 		if (newGpn != null) {
 
 			if (sym.getGeometry() != null) {
-				System.out.println(sym.getGeometry());
 				Expression accepted = (Expression) sym.getGeometry().accept(
 						setPropertiesToNewGeom, null);
 				sym.setGeometry(accepted);
-				System.out.println(sym.getGeometry());
 			} else
 				sym.setGeometryPropertyName(newGpn);
 

Modified: trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/styling/chartsymbols/ChartGraphic.java
===================================================================
--- trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/styling/chartsymbols/ChartGraphic.java	2012-04-15 22:33:12 UTC (rev 1950)
+++ trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/styling/chartsymbols/ChartGraphic.java	2012-04-15 23:36:29 UTC (rev 1951)
@@ -30,14 +30,16 @@
  */
 public class ChartGraphic {
 
-	public enum ChartTyp {
-		p, p3, bhg, bvg, bhs, bvs, bvo, lc;
+	public enum ChartGraphicTyp {
+		p3, p, bhg, bvg, bhs, bvs, lc
+		// bvo, Vertical bar chart in which bars are stacked
+		;
 
 		/**
 		 * @return a human-readable and translated Title
 		 */
 		public String getTitle() {
-			return GeotoolsGUIUtil.R("ChartTyp." + this.toString());
+			return GeotoolsGUIUtil.R("ChartGraphicTyp." + this.toString());
 		}
 	}
 
@@ -54,8 +56,9 @@
 			url.append("&chd=t:");
 			for (String att : attributes) {
 
-				if (chartType == ChartTyp.p || chartType == ChartTyp.p3
-						|| chartType == ChartTyp.lc) {
+				if (chartType == ChartGraphicTyp.p
+						|| chartType == ChartGraphicTyp.p3
+						|| chartType == ChartGraphicTyp.lc) {
 
 					// Sum up all others in this "row" to 100
 					StringBuffer allOthers = new StringBuffer();
@@ -77,8 +80,9 @@
 
 				}
 
-				if (chartType == ChartTyp.p || chartType == ChartTyp.p3
-						|| chartType == ChartTyp.lc)
+				if (chartType == ChartGraphicTyp.p
+						|| chartType == ChartGraphicTyp.p3
+						|| chartType == ChartGraphicTyp.lc)
 					url.append(",");
 				else
 					url.append("|");
@@ -226,7 +230,7 @@
 							"cht=(.*?)(&.*|^)");
 					Matcher m = typePattern.matcher(url);
 					if (m.find() && m.groupCount() > 0) {
-						chartType = ChartTyp.valueOf(m.group(1));
+						chartType = ChartGraphicTyp.valueOf(m.group(1));
 					}
 
 					// Read the ATTRIBUTE NAMES from the Style
@@ -289,7 +293,7 @@
 		this(null);
 	}
 
-	private ChartTyp chartType = ChartTyp.bvg;
+	private ChartGraphicTyp chartType = ChartGraphicTyp.bvg;
 
 	List<String> attributes = new ArrayList<String>();
 
@@ -421,11 +425,11 @@
 		}
 	}
 
-	public ChartTyp getChartType() {
+	public ChartGraphicTyp getChartType() {
 		return chartType;
 	}
 
-	public void setChartType(ChartTyp chartType) {
+	public void setChartType(ChartGraphicTyp chartType) {
 		if (this.chartType != chartType) {
 			this.chartType = chartType;
 			fireEvents(new ChartGraphicChangedEvent());
@@ -499,7 +503,8 @@
 				maxValue = 100.;
 			this.maxValue = maxValue;
 
-			if (chartType != ChartTyp.p && chartType != ChartTyp.p3)
+			if (chartType != ChartGraphicTyp.p
+					&& chartType != ChartGraphicTyp.p3)
 				fireEvents(new ChartGraphicChangedEvent());
 		}
 	}

Modified: trunk/schmitzm-gt/src/main/resources/de/schmitzm/geotools/gui/resource/locales/GTResourceBundle.properties
===================================================================
--- trunk/schmitzm-gt/src/main/resources/de/schmitzm/geotools/gui/resource/locales/GTResourceBundle.properties	2012-04-15 22:33:12 UTC (rev 1950)
+++ trunk/schmitzm-gt/src/main/resources/de/schmitzm/geotools/gui/resource/locales/GTResourceBundle.properties	2012-04-15 23:36:29 UTC (rev 1951)
@@ -2,7 +2,8 @@
 #Copyright (c) 2009 Martin O. J. Schmitz.
 #
 #This file is part of the SCHMITZM library - a collection of utility 
-#classes based on Java 1.6, focusing (not only) on Java Swing 
+#classes based on Java 1.6
+ChartGraphicTyp.focusing (not only) on Java Swing 
 #and the Geotools library.
 #
 #The SCHMITZM project is hosted at:
@@ -11,7 +12,8 @@
 #This program is free software; you can redistribute it and/or
 #modify it under the terms of the GNU Lesser General Public License
 #as published by the Free Software Foundation; either version 3
-#of the License, or (at your option) any later version.
+#of the License
+ChartGraphicTyp.or (at your option) any later version.
 #
 #This program is distributed in the hope that it will be useful,
 #but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -19,8 +21,15 @@
 #GNU General Public License for more details.
 #
 #You should have received a copy of the GNU Lesser General Public License (license.txt)
-#along with this program; if not, write to the Free Software
-#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+#along with this program; if not
+ChartGraphicTyp.write to the Free Software
+#Foundation
+ChartGraphicTyp.Inc.
+ChartGraphicTyp.51 Franklin Street
+ChartGraphicTyp.Fifth Floor
+ChartGraphicTyp.Boston
+ChartGraphicTyp.MA  02110-1301
+ChartGraphicTyp.USA.
 #or try this link: http://www.gnu.org/licenses/lgpl.html
 #
 #Contributors:
@@ -59,7 +68,8 @@
 Attributes=Attributes
 CRSLabel=Map shown in\: ${0} 
 CRSLabel.TT=Shows the coordinate reference system (CRS) of the map. 
-FilterTableCellEditor.FilterDialogTitle=Filter for ${0} (${1}), ${2}
+FilterTableCellEditor.FilterDialogTitle=Filter for ${0} (${1})
+ChartGraphicTyp.${2}
 Logoposition.BOTTOMLEFT=bottom-left
 Logoposition.BOTTOMRIGHT=bottom-right
 Logoposition.TOPLEFT=top-left
@@ -197,3 +207,13 @@
 StyleToolBar.BorderWidth=Border width
 StyleToolBar.FillColor=Fill
 StyleToolBar.PointMark=Point style
+
+ChartGraphicTyp.p=Pie chart
+ChartGraphicTyp.p3=Pie chart 3D
+ChartGraphicTyp.bhg=Bar horiz. grouped
+ChartGraphicTyp.bvg=Bar vert. grouped
+ChartGraphicTyp.bhs=Bar horiz. stacked
+ChartGraphicTyp.bvs=Bar vert. stacked
+ChartGraphicTyp.lc=Line chart
+ChartGraphicTyp.bvo=Vertical bar chart in which bars are stacked
+



More information about the Schmitzm-commits mailing list