comparison flys-client/src/main/java/org/dive4elements/river/client/client/ui/Toolbar.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/Toolbar.java@0be65bc65cee
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.types.Overflow;
4 import com.smartgwt.client.widgets.events.CloseClickEvent;
5 import com.smartgwt.client.widgets.events.CloseClickHandler;
6 import com.smartgwt.client.widgets.layout.HLayout;
7
8 import de.intevation.flys.client.client.event.RedrawRequestHandler;
9 import de.intevation.flys.client.shared.model.Artifact;
10 import de.intevation.flys.client.shared.model.User;
11
12
13 public abstract class Toolbar extends HLayout {
14
15 protected OutputTab outputTab;
16
17
18 public Toolbar(OutputTab outputTab) {
19 super();
20
21 // Set overflow to hidden in order to prevent nasty scrollbars in IE
22 setOverflow(Overflow.HIDDEN);
23
24 this.outputTab = outputTab;
25 }
26
27
28 public OutputTab getOutputTab() {
29 return outputTab;
30 }
31
32
33 public Artifact getArtifact() {
34 return outputTab.getCollectionView().getArtifact();
35 }
36
37
38 public User getUser() {
39 return outputTab.getCollectionView().getUser();
40 }
41
42
43 protected void openDatacageWindow(RedrawRequestHandler handler) {
44 Artifact artifact = getArtifact();
45 User user = getUser();
46
47 String outs = getOutputTab().getOutputName();
48
49 final DatacageWindow dc = new DatacageWindow(
50 artifact, user, outs, outputTab.getCollectionView());
51 dc.addRedrawRequestHandler(handler);
52 dc.addCloseClickHandler(new CloseClickHandler() {
53 @Override
54 public void onCloseClick(CloseClickEvent event) {
55 dc.destroy();
56 }
57 });
58 dc.show();
59 }
60 }
61 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org