Mercurial > dive4elements > river
comparison flys-client/src/main/java/org/dive4elements/river/client/client/ui/DatacageButton.java @ 5834:f507086aa94b
Repaired internal references.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Thu, 25 Apr 2013 12:31:32 +0200 |
parents | flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageButton.java@c4973fa23674 |
children | 821a02bbfb4e |
comparison
equal
deleted
inserted
replaced
5833:a2bdc0f524e8 | 5834:f507086aa94b |
---|---|
1 package de.intevation.flys.client.client.ui; | |
2 | |
3 import com.smartgwt.client.widgets.Button; | |
4 import com.smartgwt.client.widgets.events.ClickEvent; | |
5 import com.smartgwt.client.widgets.events.ClickHandler; | |
6 import com.smartgwt.client.widgets.events.CloseClickHandler; | |
7 import com.smartgwt.client.widgets.events.CloseClickEvent; | |
8 | |
9 import de.intevation.flys.client.shared.model.Artifact; | |
10 import de.intevation.flys.client.shared.model.User; | |
11 | |
12 /** Button that opens view of datacage (DataCageWindow). */ | |
13 public class DatacageButton extends Button implements ClickHandler { | |
14 | |
15 protected Artifact artifact; | |
16 protected User user; | |
17 protected CollectionView view; | |
18 | |
19 public DatacageButton( | |
20 String title, | |
21 Artifact artifact, | |
22 User user, | |
23 CollectionView view | |
24 ) { | |
25 super(title); | |
26 | |
27 this.artifact = artifact; | |
28 this.user = user; | |
29 this.view = view; | |
30 | |
31 addClickHandler(this); | |
32 } | |
33 | |
34 | |
35 public void onClick(ClickEvent event) { | |
36 // TODO: fetch outs! | |
37 String outs = ""; | |
38 | |
39 final DatacageWindow dc = new DatacageWindow( | |
40 artifact, user, outs, view); | |
41 dc.addCloseClickHandler(new CloseClickHandler() { | |
42 public void onCloseClick(CloseClickEvent event) { | |
43 dc.destroy(); | |
44 } | |
45 }); | |
46 dc.show(); | |
47 } | |
48 } | |
49 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |