comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapToolbar.java @ 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 a1ff911e8365
children 4aa70825bde1
comparison
equal deleted inserted replaced
2506:47d07709ba09 2507:7ef59d7e113d
24 import org.gwtopenmaps.openlayers.client.layer.Vector; 24 import org.gwtopenmaps.openlayers.client.layer.Vector;
25 import org.gwtopenmaps.openlayers.client.util.Attributes; 25 import org.gwtopenmaps.openlayers.client.util.Attributes;
26 26
27 import de.intevation.flys.client.client.FLYSConstants; 27 import de.intevation.flys.client.client.FLYSConstants;
28 import de.intevation.flys.client.client.ui.Toolbar; 28 import de.intevation.flys.client.client.ui.Toolbar;
29 import de.intevation.flys.client.client.ui.ImgLink;
29 import de.intevation.flys.client.client.utils.EnableDisableCmd; 30 import de.intevation.flys.client.client.utils.EnableDisableCmd;
30 import de.intevation.flys.client.shared.model.ThemeList; 31 import de.intevation.flys.client.shared.model.ThemeList;
31 32
32 33
33 /** 34 /**
52 protected ImgButton panButton; 53 protected ImgButton panButton;
53 protected ImgButton selectButton; 54 protected ImgButton selectButton;
54 protected ImgButton infoButton; 55 protected ImgButton infoButton;
55 protected ImgButton removeButton; 56 protected ImgButton removeButton;
56 protected ImgButton elevationButton; 57 protected ImgButton elevationButton;
58 protected ImgLink printMapLink;
57 59
58 protected Label epsgLabel; 60 protected Label epsgLabel;
59 61
60 protected DrawControl drawControl; 62 protected DrawControl drawControl;
61 protected MeasureControl measureControl; 63 protected MeasureControl measureControl;
104 datacageButton = createDatacageControl(); 106 datacageButton = createDatacageControl();
105 addMember(datacageButton); 107 addMember(datacageButton);
106 108
107 addWMSButton = createWMSControl(); 109 addWMSButton = createWMSControl();
108 addMember(addWMSButton); 110 addMember(addWMSButton);
111
112 printMapLink = createPrintMapLink();
113 addMember(printMapLink);
109 } 114 }
110 115
111 addMember(zoomToMaxButton); 116 addMember(zoomToMaxButton);
112 addMember(zoomBoxButton); 117 addMember(zoomBoxButton);
113 addMember(zoomOutButton); 118 addMember(zoomOutButton);
267 }); 272 });
268 273
269 return btn; 274 return btn;
270 } 275 }
271 276
277 protected ImgLink createPrintMapLink() {
278 String baseUrl = GWT.getHostPageBaseURL();
279
280 return new ImgLink(
281 baseUrl + MSG.downloadPDF(),
282 getPrintUrl(),
283 20,
284 20);
285 }
286
272 287
273 protected ImgButton createMaxExtentControl() { 288 protected ImgButton createMaxExtentControl() {
274 ImgButton zoomToMax = createButton(MSG.zoom_all(), new ClickHandler() { 289 ImgButton zoomToMax = createButton(MSG.zoom_all(), new ClickHandler() {
275 public void onClick(ClickEvent event) { 290 public void onClick(ClickEvent event) {
276 floodMap.getMap().zoomToMaxExtent(); 291 floodMap.getMap().zoomToMaxExtent();
590 epsgLabel.setAlign(Alignment.RIGHT); 605 epsgLabel.setAlign(Alignment.RIGHT);
591 epsgLabel.setWidth(75); 606 epsgLabel.setWidth(75);
592 607
593 return epsgLabel; 608 return epsgLabel;
594 } 609 }
610
611 public String getPrintUrl() {
612 String url = GWT.getModuleBaseURL();
613 GWT.log("TODO: Generate real print link.");
614 return url;
615 }
595 } 616 }
596 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 617 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org