Mercurial > dive4elements > river
changeset 1587:45cd2364adad
Issue 466.
CSV export for activated chart themes.
flys-client/trunk@3875 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Thu, 02 Feb 2012 11:14:40 +0000 |
parents | dbdf954dbe94 |
children | e0d665661a1d |
files | flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartToolbar.java flys-client/src/main/java/de/intevation/flys/client/server/ChartOutputServiceImpl.java |
diffstat | 7 files changed, 36 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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 <raimund.renkert@intevation.de> + + 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 <felix.wolfsteller@intevation.de> * src/main/java/de/intevation/flys/client/server/DataFactory.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();
--- 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
--- 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
--- 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
--- 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);
--- 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"; }