[Schmitzm-commits] r848 - trunk/src/schmitzm/jfree/chart/style

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri May 21 11:35:43 CEST 2010


Author: mojays
Date: 2010-05-21 11:35:41 +0200 (Fri, 21 May 2010)
New Revision: 848

Modified:
   trunk/src/schmitzm/jfree/chart/style/ChartStyleXMLFactory.java
Log:
BugFix for XML writing: renderer attributes (especially the new defaults) were written in main element instead of <renderer>

Modified: trunk/src/schmitzm/jfree/chart/style/ChartStyleXMLFactory.java
===================================================================
--- trunk/src/schmitzm/jfree/chart/style/ChartStyleXMLFactory.java	2010-05-19 12:49:03 UTC (rev 847)
+++ trunk/src/schmitzm/jfree/chart/style/ChartStyleXMLFactory.java	2010-05-21 09:35:41 UTC (rev 848)
@@ -678,15 +678,15 @@
       // Margin attribute
       XMLUtil.setNotNullAttribute(element, "margin", rendererStyle.getMargin());
       // Attributes for default series properties
-      XMLUtil.setNotNullAttribute(element, "paint", rendererStyle.getDefaultPaint());
-      XMLUtil.setNotNullAttribute(element, "lineWidth", rendererStyle.getDefaultLineWidth());
-      XMLUtil.setNotNullAttribute(element, "itemLabelsVisible", rendererStyle.isDefaultItemLabelsVisible());
-      XMLUtil.setNotNullAttribute(element, "shapesVisible", rendererStyle.isDefaultShapesVisible());
-      XMLUtil.setNotNullAttribute(element, "legendVisible", rendererStyle.isDefaultLegendVisible());
+      XMLUtil.setNotNullAttribute(rendererElem, "paint", rendererStyle.getDefaultPaint());
+      XMLUtil.setNotNullAttribute(rendererElem, "lineWidth", rendererStyle.getDefaultLineWidth());
+      XMLUtil.setNotNullAttribute(rendererElem, "itemLabelsVisible", rendererStyle.isDefaultItemLabelsVisible());
+      XMLUtil.setNotNullAttribute(rendererElem, "shapesVisible", rendererStyle.isDefaultShapesVisible());
+      XMLUtil.setNotNullAttribute(rendererElem, "legendVisible", rendererStyle.isDefaultLegendVisible());
       if ( rendererStyle.getDefaultLegendLabel() != null )
-        XMLUtil.setNotNullAttribute(element, "legendLabel", rendererStyle.getDefaultLegendLabel().getLabelTranslation());
+        XMLUtil.setNotNullAttribute(rendererElem, "legendLabel", rendererStyle.getDefaultLegendLabel().getLabelTranslation());
       if ( rendererStyle.getDefaultLegendTooltip() != null )
-        XMLUtil.setNotNullAttribute(element, "legendTooltip", rendererStyle.getDefaultLegendTooltip().getLabelTranslation());
+        XMLUtil.setNotNullAttribute(rendererElem, "legendTooltip", rendererStyle.getDefaultLegendTooltip().getLabelTranslation());
       
       // Create <series> child for all series
       for ( int i=0; i<rendererStyle.getSeriesCount(); i++) {



More information about the Schmitzm-commits mailing list