changeset 3200:099f18a4e227

Only dates as point labels flys-artifacts/trunk@4817 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Christian Lins <christian.lins@intevation.de>
date Wed, 27 Jun 2012 16:12:32 +0000
parents b29d7bb8eb8c
children 1c00ed73ccf4
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/exports/fixings/FixWQCurveGenerator.java
diffstat 2 files changed, 11 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Wed Jun 27 15:56:53 2012 +0000
+++ b/flys-artifacts/ChangeLog	Wed Jun 27 16:12:32 2012 +0000
@@ -1,3 +1,8 @@
+2012-06-27	Christian Lins <christian.lins@intevation.de>
+
+	* src/main/java/de/intevation/flys/exports/fixings/FixWQCurveGenerator.java:
+	  Show only dates as point labels.
+
 2012-06-27	Christian Lins <christian.lins@intevation.de>
 
 	* doc/conf/conf.xml:
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/fixings/FixWQCurveGenerator.java	Wed Jun 27 15:56:53 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/fixings/FixWQCurveGenerator.java	Wed Jun 27 16:12:32 2012 +0000
@@ -16,6 +16,8 @@
 import de.intevation.flys.jfree.JFreeUtil;
 import de.intevation.flys.jfree.StyledXYSeries;
 
+import java.text.DateFormat;
+
 import java.util.ArrayList;
 import java.util.List;
 
@@ -167,16 +169,14 @@
             XYSeries series = new StyledXYSeries(aaf.getFacetDescription(), doc);
             List<XYTextAnnotation> textAnnos = new ArrayList<XYTextAnnotation>();
 
+            DateFormat dateFormat = DateFormat.getDateInstance(
+                DateFormat.SHORT);
+
             for(QW qw : qws) {
                 series.add(qw.getQ(), qw.getW());
 
-                StringBuilder label = new StringBuilder();
-                label.append(qw.getDate());
-                label.append(" ");
-                label.append(qw.getDescription());
-
                 XYTextAnnotation anno = new CollisionFreeXYTextAnnotation(
-                    label.toString(),
+                    dateFormat.format(qw.getDate()),
                     qw.getQ(),
                     qw.getW());
                 textAnnos.add(anno);

http://dive4elements.wald.intevation.org