annotate flys-client/src/main/java/org/dive4elements/river/client/client/ui/Toolbar.java @ 5835:821a02bbfb4e

Fixed internal java dependencies
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 25 Apr 2013 13:12:15 +0200
parents f507086aa94b
children
rev   line source
5835
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
1 package org.dive4elements.river.client.client.ui;
1364
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
2
4013
0be65bc65cee Set overflow behaviour of Toolbars to HIDDEN to avoid auto scrollbars.
Christian Lins <christian.lins@intevation.de>
parents: 2452
diff changeset
3 import com.smartgwt.client.types.Overflow;
0be65bc65cee Set overflow behaviour of Toolbars to HIDDEN to avoid auto scrollbars.
Christian Lins <christian.lins@intevation.de>
parents: 2452
diff changeset
4 import com.smartgwt.client.widgets.events.CloseClickEvent;
1364
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
5 import com.smartgwt.client.widgets.events.CloseClickHandler;
4013
0be65bc65cee Set overflow behaviour of Toolbars to HIDDEN to avoid auto scrollbars.
Christian Lins <christian.lins@intevation.de>
parents: 2452
diff changeset
6 import com.smartgwt.client.widgets.layout.HLayout;
1364
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
7
5835
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
8 import org.dive4elements.river.client.client.event.RedrawRequestHandler;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
9 import org.dive4elements.river.client.shared.model.Artifact;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
10 import org.dive4elements.river.client.shared.model.User;
1364
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
11
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
12
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
13 public abstract class Toolbar extends HLayout {
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
14
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
15 protected OutputTab outputTab;
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
16
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
17
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
18 public Toolbar(OutputTab outputTab) {
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
19 super();
4013
0be65bc65cee Set overflow behaviour of Toolbars to HIDDEN to avoid auto scrollbars.
Christian Lins <christian.lins@intevation.de>
parents: 2452
diff changeset
20
0be65bc65cee Set overflow behaviour of Toolbars to HIDDEN to avoid auto scrollbars.
Christian Lins <christian.lins@intevation.de>
parents: 2452
diff changeset
21 // Set overflow to hidden in order to prevent nasty scrollbars in IE
0be65bc65cee Set overflow behaviour of Toolbars to HIDDEN to avoid auto scrollbars.
Christian Lins <christian.lins@intevation.de>
parents: 2452
diff changeset
22 setOverflow(Overflow.HIDDEN);
1364
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
23
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
24 this.outputTab = outputTab;
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
25 }
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
26
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
27
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
28 public OutputTab getOutputTab() {
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
29 return outputTab;
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
30 }
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
31
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
32
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
33 public Artifact getArtifact() {
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
34 return outputTab.getCollectionView().getArtifact();
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
35 }
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
36
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
37
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
38 public User getUser() {
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
39 return outputTab.getCollectionView().getUser();
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
40 }
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
41
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
42
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
43 protected void openDatacageWindow(RedrawRequestHandler handler) {
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
44 Artifact artifact = getArtifact();
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
45 User user = getUser();
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
46
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
47 String outs = getOutputTab().getOutputName();
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
48
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
49 final DatacageWindow dc = new DatacageWindow(
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
50 artifact, user, outs, outputTab.getCollectionView());
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
51 dc.addRedrawRequestHandler(handler);
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
52 dc.addCloseClickHandler(new CloseClickHandler() {
4013
0be65bc65cee Set overflow behaviour of Toolbars to HIDDEN to avoid auto scrollbars.
Christian Lins <christian.lins@intevation.de>
parents: 2452
diff changeset
53 @Override
1619
f8c03d3af300 Reactivated the Enterprise Blue theme. Fixes some icon and image issues in IE8.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 1364
diff changeset
54 public void onCloseClick(CloseClickEvent event) {
1364
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
55 dc.destroy();
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
56 }
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
57 });
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
58 dc.show();
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
59 }
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
60 }
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
61 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org