# HG changeset patch # User Raimund Renkert # Date 1328181280 0 # Node ID 45cd2364adad6bc17a88e16f39d8d447659da041 # Parent dbdf954dbe94c15b561133d42a71cf291f69f23f Issue 466. CSV export for activated chart themes. flys-client/trunk@3875 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r dbdf954dbe94 -r 45cd2364adad flys-client/ChangeLog --- a/flys-client/ChangeLog Thu Feb 02 07:40:44 2012 +0000 +++ b/flys-client/ChangeLog Thu Feb 02 11:14:40 2012 +0000 @@ -1,3 +1,19 @@ +2012-02-02 Raimund Renkert + + Issue 466: CSV export for chart themes. + + * src/main/java/de/intevation/flys/client/client/ui/chart/ChartToolbar.java + Added button for CSV download. + + * src/main/java/de/intevation/flys/client/server/ChartOutputServiceImpl.java: + Added 'csv' as export format. + + * src/main/java/de/intevation/flys/client/client/FLYSConstants.java, + src/main/java/de/intevation/flys/client/client/FLYSConstants.properties, + src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties, + src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties: + Added path for csv export icon. + 2012-02-02 Felix Wolfsteller * src/main/java/de/intevation/flys/client/server/DataFactory.java, diff -r dbdf954dbe94 -r 45cd2364adad flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java Thu Feb 02 07:40:44 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java Thu Feb 02 11:14:40 2012 +0000 @@ -296,6 +296,8 @@ String downloadSVG(); + String downloadCSV(); + String loadingImg(); String cancelCalculation(); diff -r dbdf954dbe94 -r 45cd2364adad flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties --- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties Thu Feb 02 07:40:44 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties Thu Feb 02 11:14:40 2012 +0000 @@ -86,6 +86,7 @@ downloadPNG = images/downloadPNG.png downloadPDF = images/downloadPDF.png downloadSVG = images/downloadSVG.png +downloadCSV = images/save.gif loadingImg = images/loading.gif cancelCalculation = images/cancelCalculation.png markerRed = images/marker_red.png diff -r dbdf954dbe94 -r 45cd2364adad flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties --- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties Thu Feb 02 07:40:44 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties Thu Feb 02 11:14:40 2012 +0000 @@ -85,6 +85,7 @@ downloadPNG = images/downloadPNG.png downloadPDF = images/downloadPDF.png downloadSVG = images/downloadSVG.png +downloadCSV = images/save.gif loadingImg = images/loading.gif cancelCalculation = images/cancelCalculation.png markerRed = images/marker_red.png diff -r dbdf954dbe94 -r 45cd2364adad flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties --- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties Thu Feb 02 07:40:44 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties Thu Feb 02 11:14:40 2012 +0000 @@ -86,6 +86,7 @@ downloadPNG = images/downloadPNG.png downloadPDF = images/downloadPDF.png downloadSVG = images/downloadSVG.png +downloadCSV = images/save.gif loadingImg = images/loading.gif cancelCalculation = images/cancelCalculation.png markerRed = images/marker_red.png diff -r dbdf954dbe94 -r 45cd2364adad flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartToolbar.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartToolbar.java Thu Feb 02 07:40:44 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartToolbar.java Thu Feb 02 11:14:40 2012 +0000 @@ -36,6 +36,8 @@ protected Canvas downloadSVG; + protected Canvas downloadCSV; + protected MousePositionPanel position; protected ZoomboxControl zoombox; @@ -101,6 +103,12 @@ 20, 20); + downloadCSV = new ImgLink( + baseUrl + MSG.downloadCSV(), + chartTab.getExportUrl(-1, -1, "csv"), + 20, + 20); + zoomToMaxExtent.setSrc(baseUrl + MSG.zoom_all()); adjustImageButton(zoomToMaxExtent); zoomToMaxExtent.addClickHandler(new ClickHandler() { @@ -185,6 +193,7 @@ addMember(downloadPNG); addMember(downloadPDF); addMember(downloadSVG); + addMember(downloadCSV); addMember(zoomToMaxExtent); addMember(historyBack); addMember(zoomOut); diff -r dbdf954dbe94 -r 45cd2364adad flys-client/src/main/java/de/intevation/flys/client/server/ChartOutputServiceImpl.java --- a/flys-client/src/main/java/de/intevation/flys/client/server/ChartOutputServiceImpl.java Thu Feb 02 07:40:44 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/server/ChartOutputServiceImpl.java Thu Feb 02 11:14:40 2012 +0000 @@ -114,6 +114,9 @@ else if (format.equals("svg")) { return ".svg"; } + else if (format.equals("csv")) { + return ".csv"; + } return ".png"; } @@ -129,6 +132,9 @@ else if (format.equals("svg")) { return "svg+xml"; } + else if (format.equals("csv")) { + return "text/plain"; + } return "image/png"; }