[Schmitzm-commits] r748 - in trunk/src/schmitzm/jfree: feature/style resource/locales

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Mar 3 13:41:18 CET 2010


Author: alfonx
Date: 2010-03-03 13:41:17 +0100 (Wed, 03 Mar 2010)
New Revision: 748

Modified:
   trunk/src/schmitzm/jfree/feature/style/FeatureChartUtil.java
   trunk/src/schmitzm/jfree/resource/locales/JFreeResourceBundle.properties
Log:
FeatureCHartUtil.createCategoryDataset throws an internationalized exception if an weighted aggregation is selected, but not attribute is selected for it.

Modified: trunk/src/schmitzm/jfree/feature/style/FeatureChartUtil.java
===================================================================
--- trunk/src/schmitzm/jfree/feature/style/FeatureChartUtil.java	2010-03-03 12:38:28 UTC (rev 747)
+++ trunk/src/schmitzm/jfree/feature/style/FeatureChartUtil.java	2010-03-03 12:41:17 UTC (rev 748)
@@ -61,6 +61,7 @@
 
 import schmitzm.geotools.feature.FeatureUtil;
 import schmitzm.geotools.feature.PipedFeatureIterator;
+import schmitzm.jfree.JFreeChartUtil;
 import schmitzm.jfree.chart.selection.DatasetSelectionModel;
 import schmitzm.jfree.chart.selection.DatasetSelectionModelProvider;
 import schmitzm.jfree.chart.style.ChartStyle;
@@ -566,8 +567,10 @@
 						if (chartStyle
 								.getAttributeAggregationWeightAttributeName(attrIdx) == null)
 							throw new RuntimeException(
-									"A weighted AggregationFunction is selected, but not artribute for weighting is selected."); // i8n
-
+									JFreeChartUtil.R("Exception.noWeightAttributeDefinedforAWeightedAggregation")); 
+						
+						
+						
 						// NODATA Check yValue attribute
 						String yAttrName = chartStyle.getAttributeName(attrIdx);
 						Number yValue = (Number) next.getAttribute(yAttrName);
@@ -671,12 +674,12 @@
 						}
 
 						if (attributeAggregation.isWeighted()) {
+// fliegt schon vorher raus..
+//							if (chartStyle
+//									.getAttributeAggregationWeightAttributeName(attrIdx) == null)
+//								throw new RuntimeException(
+//										JFreeChartUtil.R("Exception.noWeightAttributeDefinedforAWeightedAggregation")); 
 
-							if (chartStyle
-									.getAttributeAggregationWeightAttributeName(attrIdx) == null)
-								throw new RuntimeException(
-										"A weighted AggregationFunction is selected, but not artribute for weighting is selected."); // i8n
-
 							Object weightObj = f
 									.getAttribute(chartStyle
 											.getAttributeAggregationWeightAttributeName(attrIdx));

Modified: trunk/src/schmitzm/jfree/resource/locales/JFreeResourceBundle.properties
===================================================================
--- trunk/src/schmitzm/jfree/resource/locales/JFreeResourceBundle.properties	2010-03-03 12:38:28 UTC (rev 747)
+++ trunk/src/schmitzm/jfree/resource/locales/JFreeResourceBundle.properties	2010-03-03 12:41:17 UTC (rev 748)
@@ -85,3 +85,4 @@
 
 regressionline.tooltip=<html><i>r</i> is the product-moment-correlation coefficient and gives information about how strong the variables are related.</html>
 
+Exception.noWeightAttributeDefinedforAWeightedAggregation=A weighted AggregationFunction is selected, but not artribute for weighting is selected.
\ No newline at end of file



More information about the Schmitzm-commits mailing list