[Schmitzm-commits] r245 - in trunk/src/schmitzm/jfree: chart/style resource/locales
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Jul 30 13:56:55 CEST 2009
Author: alfonx
Date: 2009-07-30 13:56:55 +0200 (Thu, 30 Jul 2009)
New Revision: 245
Added:
trunk/src/schmitzm/jfree/resource/locales/JFreeResourceBundle_de.properties.nativeiso
Modified:
trunk/src/schmitzm/jfree/chart/style/ChartType.java
trunk/src/schmitzm/jfree/resource/locales/JFreeResourceBundle.properties
trunk/src/schmitzm/jfree/resource/locales/JFreeResourceBundle_de.properties
Log:
* Extended ChartType with two methods that can tell us about howmay attributes are needed to create the type of chart, and howmany of them have to be numeric.
Modified: trunk/src/schmitzm/jfree/chart/style/ChartType.java
===================================================================
--- trunk/src/schmitzm/jfree/chart/style/ChartType.java 2009-07-29 09:33:33 UTC (rev 244)
+++ trunk/src/schmitzm/jfree/chart/style/ChartType.java 2009-07-30 11:56:55 UTC (rev 245)
@@ -40,7 +40,9 @@
import schmitzm.lang.ResourceProvider;
/**
- * Enum representing the style type of a chart (bar, line, area)
+ * {@link Enum} representing the style type of a chart (bar, line, area, ...).
+ * It also meta-information on these chart types, like translated titles,
+ * preview images and information about the data requirements.
*/
public enum ChartType {
@@ -116,4 +118,42 @@
return toString();
return resource;
}
+
+ /**
+ * @return the total number of possible variables presented in this chart -
+ * no matter what datatype they require. This function usually
+ * returns value 1 or 2.
+ * @see #getCountOfRequiredNumericFields()
+ */
+ public int getCountOfRequiredFields() {
+ switch (this) {
+ case BAR:
+ case LINE:
+ case AREA:
+ case POINT:
+ case SCATTER:
+ return 2;
+ default:
+ return 1;
+ }
+ }
+
+ /**
+ * @return the number of numeric variables needed to create this type of
+ * chart. Usually return a value 0,1 or 2.
+ * @see #getCountOfRequiredFields()
+ */
+ public int getCountOfRequiredNumericFields() {
+ switch (this) {
+ case BAR:
+ case LINE:
+ case AREA:
+ case POINT:
+ case SCATTER:
+ return 2;
+ default:
+ return 0;
+ }
+ }
+
};
Modified: trunk/src/schmitzm/jfree/resource/locales/JFreeResourceBundle.properties
===================================================================
--- trunk/src/schmitzm/jfree/resource/locales/JFreeResourceBundle.properties 2009-07-29 09:33:33 UTC (rev 244)
+++ trunk/src/schmitzm/jfree/resource/locales/JFreeResourceBundle.properties 2009-07-30 11:56:55 UTC (rev 245)
@@ -33,15 +33,16 @@
# --------------------------------------------------------------------------
# Diagram types
-diagram.points=Points
-diagram.lines=Lines
-diagram.bars=Bars
-diagram.areas=Areas
+diagram.points=points
+diagram.lines=lines
+diagram.bars=bars
+diagram.areas=areas
ChartType_BAR.Desc=Its a great thing to have a few barcharts at hand.
-ChartType_BAR.Title=Barchart
+ChartType_BAR.Title=barchart
-ChartType_SCATTER.Title=Scatterplot
-ChartType_PIE.Title=Piechart
-ChartType_AREA.Title=Areachart
-ChartType_LINE.Title=Linechart
+ChartType_SCATTER.Title=scatterplot
+ChartType_PIE.Title=piechart
+ChartType_AREA.Title=areachart
+ChartType_LINE.Title=linechart
+ChartType_POINT.Title=pointchart
Modified: trunk/src/schmitzm/jfree/resource/locales/JFreeResourceBundle_de.properties
===================================================================
--- trunk/src/schmitzm/jfree/resource/locales/JFreeResourceBundle_de.properties 2009-07-29 09:33:33 UTC (rev 244)
+++ trunk/src/schmitzm/jfree/resource/locales/JFreeResourceBundle_de.properties 2009-07-30 11:56:55 UTC (rev 245)
@@ -25,7 +25,7 @@
#
#Contributors:
# Martin O. J. Schmitz - initial API and implementation
-# Stefan A. Krüger - additional utility classes
+# Stefan A. Kr\u00fcger - additional utility classes
##########
# ---------------------------------------------------------------
# ------ German Translations for JFreeChart GUI components ------
@@ -36,12 +36,13 @@
diagram.points=Punkte
diagram.lines=Linien
diagram.bars=Balken
-diagram.areas=Flächen
+diagram.areas=Fl\u00E4chen
ChartType_BAR.Desc=<html>Ein Balkendiagram ist eine tolle Sache.</html>
ChartType_BAR.Title=Balkendiagramm
ChartType_SCATTER.Title=Streudiagramm
ChartType_PIE.Title=Kreisdiagramm
-ChartType_AREA.Title=Flächendiagramm
+ChartType_AREA.Title=Fl\u00E4chendiagramm
ChartType_LINE.Title=Liniendiagramm
+ChartType_POINT.Title=Punktdiagramm
Added: trunk/src/schmitzm/jfree/resource/locales/JFreeResourceBundle_de.properties.nativeiso
===================================================================
--- trunk/src/schmitzm/jfree/resource/locales/JFreeResourceBundle_de.properties.nativeiso 2009-07-29 09:33:33 UTC (rev 244)
+++ trunk/src/schmitzm/jfree/resource/locales/JFreeResourceBundle_de.properties.nativeiso 2009-07-30 11:56:55 UTC (rev 245)
@@ -0,0 +1,48 @@
+##########
+#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, focussing (not only) on Java Swing
+#and the Geotools library.
+#
+#The SCHMITZM project is hosted at:
+#http://wald.intevation.org/projects/schmitzm/
+#
+#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.
+#
+#This program is distributed in the hope that it will be useful,
+#but WITHOUT ANY WARRANTY; without even the implied warranty of
+#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#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.
+#or try this link: http://www.gnu.org/licenses/lgpl.html
+#
+#Contributors:
+# Martin O. J. Schmitz - initial API and implementation
+# Stefan A. Krüger - additional utility classes
+##########
+# ---------------------------------------------------------------
+# ------ German Translations for JFreeChart GUI components ------
+# ------ in Package schmitz.jfree ------
+# ---------------------------------------------------------------
+
+# Diagram types
+diagram.points=Punkte
+diagram.lines=Linien
+diagram.bars=Balken
+diagram.areas=Flächen
+
+ChartType_BAR.Desc=<html>Ein Balkendiagram ist eine tolle Sache.</html>
+ChartType_BAR.Title=Balkendiagramm
+
+ChartType_SCATTER.Title=Streudiagramm
+ChartType_PIE.Title=Kreisdiagramm
+ChartType_AREA.Title=Flächendiagramm
+ChartType_LINE.Title=Liniendiagramm
+ChartType_POINT.Title=Punktdiagramm
More information about the Schmitzm-commits
mailing list