Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartToolbar.java @ 811:8fa303586f14
Pass user id to the meta data service.
flys-client/trunk@2466 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 08 Aug 2011 11:02:45 +0000 |
parents | 6050d49eaba3 |
children | 9ecd58f619a4 |
comparison
equal
deleted
inserted
replaced
810:a443dd6566b8 | 811:8fa303586f14 |
---|---|
10 import com.smartgwt.client.widgets.events.ClickHandler; | 10 import com.smartgwt.client.widgets.events.ClickHandler; |
11 import com.smartgwt.client.widgets.events.CloseClickHandler; | 11 import com.smartgwt.client.widgets.events.CloseClickHandler; |
12 import com.smartgwt.client.widgets.events.CloseClientEvent; | 12 import com.smartgwt.client.widgets.events.CloseClientEvent; |
13 | 13 |
14 import de.intevation.flys.client.shared.model.Artifact; | 14 import de.intevation.flys.client.shared.model.Artifact; |
15 import de.intevation.flys.client.shared.model.User; | |
15 | 16 |
16 import de.intevation.flys.client.client.FLYSConstants; | 17 import de.intevation.flys.client.client.FLYSConstants; |
17 import de.intevation.flys.client.client.ui.CollectionView; | 18 import de.intevation.flys.client.client.ui.CollectionView; |
18 import de.intevation.flys.client.client.ui.DatacageWindow; | 19 import de.intevation.flys.client.client.ui.DatacageWindow; |
19 | 20 |
62 panControl = new PanControl(chartTab, MSG.pan()); | 63 panControl = new PanControl(chartTab, MSG.pan()); |
63 | 64 |
64 datacage.addClickHandler(new ClickHandler() { | 65 datacage.addClickHandler(new ClickHandler() { |
65 public void onClick(ClickEvent event) { | 66 public void onClick(ClickEvent event) { |
66 GWT.log("Clicked 'datacage' button."); | 67 GWT.log("Clicked 'datacage' button."); |
67 openDatacageWindow(getArtifact()); | 68 openDatacageWindow(); |
68 } | 69 } |
69 }); | 70 }); |
70 | 71 |
71 String baseUrl = GWT.getHostPageBaseURL(); | 72 String baseUrl = GWT.getHostPageBaseURL(); |
72 zoomToMaxExtent.setSrc(baseUrl + MSG.zoom_all()); | 73 zoomToMaxExtent.setSrc(baseUrl + MSG.zoom_all()); |
119 | 120 |
120 public Artifact getArtifact() { | 121 public Artifact getArtifact() { |
121 return view.getArtifact(); | 122 return view.getArtifact(); |
122 } | 123 } |
123 | 124 |
125 public User getUser() { | |
126 return view.getUser(); | |
127 } | |
128 | |
124 | 129 |
125 public ChartOutputTab getChartOutputTab() { | 130 public ChartOutputTab getChartOutputTab() { |
126 return chartTab; | 131 return chartTab; |
127 } | 132 } |
128 | 133 |
147 addMember(spacer); | 152 addMember(spacer); |
148 addMember(position); | 153 addMember(position); |
149 } | 154 } |
150 | 155 |
151 | 156 |
152 protected void openDatacageWindow(Artifact artifact) { | 157 protected void openDatacageWindow() { |
153 final DatacageWindow dc = new DatacageWindow(artifact); | 158 Artifact artifact = getArtifact(); |
159 User user = getUser(); | |
160 | |
161 final DatacageWindow dc = new DatacageWindow(artifact, user); | |
154 dc.addCloseClickHandler(new CloseClickHandler() { | 162 dc.addCloseClickHandler(new CloseClickHandler() { |
155 public void onCloseClick(CloseClientEvent event) { | 163 public void onCloseClick(CloseClientEvent event) { |
156 dc.destroy(); | 164 dc.destroy(); |
157 } | 165 } |
158 }); | 166 }); |