changeset 2507:7ef59d7e113d

Added link to print map. flys-client/trunk@4362 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 08 May 2012 15:37:21 +0000
parents 47d07709ba09
children 4aa70825bde1
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapToolbar.java
diffstat 2 files changed, 26 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Mon May 07 17:18:07 2012 +0000
+++ b/flys-client/ChangeLog	Tue May 08 15:37:21 2012 +0000
@@ -1,3 +1,8 @@
+2012-05-07	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/client/ui/map/MapToolbar.java:
+	  Added link to print map. TODO: Figure out how create link.
+
 2012-05-07	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/server/MapPrintServiceImpl.java:
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapToolbar.java	Mon May 07 17:18:07 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapToolbar.java	Tue May 08 15:37:21 2012 +0000
@@ -26,6 +26,7 @@
 
 import de.intevation.flys.client.client.FLYSConstants;
 import de.intevation.flys.client.client.ui.Toolbar;
+import de.intevation.flys.client.client.ui.ImgLink;
 import de.intevation.flys.client.client.utils.EnableDisableCmd;
 import de.intevation.flys.client.shared.model.ThemeList;
 
@@ -54,6 +55,7 @@
     protected ImgButton infoButton;
     protected ImgButton removeButton;
     protected ImgButton elevationButton;
+    protected ImgLink   printMapLink;
 
     protected Label epsgLabel;
 
@@ -106,6 +108,9 @@
 
             addWMSButton = createWMSControl();
             addMember(addWMSButton);
+
+            printMapLink = createPrintMapLink();
+            addMember(printMapLink);
         }
 
         addMember(zoomToMaxButton);
@@ -269,6 +274,16 @@
         return btn;
     }
 
+    protected ImgLink createPrintMapLink() {
+        String baseUrl = GWT.getHostPageBaseURL();
+
+        return new ImgLink(
+            baseUrl + MSG.downloadPDF(),
+            getPrintUrl(),
+            20,
+            20);
+    }
+
 
     protected ImgButton createMaxExtentControl() {
         ImgButton zoomToMax = createButton(MSG.zoom_all(), new ClickHandler() {
@@ -592,5 +607,11 @@
 
         return epsgLabel;
     }
+
+    public String getPrintUrl() {
+        String url = GWT.getModuleBaseURL();
+        GWT.log("TODO: Generate real print link.");
+        return url;
+    }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org