Mercurial > dive4elements > river
annotate flys-client/src/main/java/de/intevation/flys/client/client/ui/Toolbar.java @ 2982:d2a54ae0016b
Switched from 2 columns and 3 rows to 3 columns and 2 rows in sq chart overview.
flys-client/trunk@4981 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Fri, 13 Jul 2012 10:09:20 +0000 |
parents | 0235cdb62c98 |
children | 0be65bc65cee |
rev | line source |
---|---|
1364
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.client.client.ui; |
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
3 import com.smartgwt.client.widgets.layout.HLayout; |
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
4 import com.smartgwt.client.widgets.events.CloseClickHandler; |
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
|
5 import com.smartgwt.client.widgets.events.CloseClickEvent; |
2452
0235cdb62c98
Issue 563.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1619
diff
changeset
|
6 import com.smartgwt.client.types.Overflow; |
1364
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
7 |
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
8 import de.intevation.flys.client.shared.model.Artifact; |
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
9 import de.intevation.flys.client.shared.model.User; |
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 |
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
11 import de.intevation.flys.client.client.event.RedrawRequestHandler; |
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 |
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
14 public abstract class Toolbar extends HLayout { |
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
15 |
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
16 protected OutputTab outputTab; |
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 |
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
19 public Toolbar(OutputTab outputTab) { |
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
20 super(); |
2452
0235cdb62c98
Issue 563.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1619
diff
changeset
|
21 setOverflow(Overflow.AUTO); |
1364
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
22 |
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
23 this.outputTab = outputTab; |
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 } |
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 public OutputTab getOutputTab() { |
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
28 return outputTab; |
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
29 } |
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 public Artifact getArtifact() { |
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
33 return outputTab.getCollectionView().getArtifact(); |
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
34 } |
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 public User getUser() { |
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
38 return outputTab.getCollectionView().getUser(); |
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
39 } |
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 protected void openDatacageWindow(RedrawRequestHandler handler) { |
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
43 Artifact artifact = getArtifact(); |
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
44 User user = getUser(); |
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
45 |
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
46 String outs = getOutputTab().getOutputName(); |
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
47 |
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
48 final DatacageWindow dc = new DatacageWindow( |
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
49 artifact, user, outs, outputTab.getCollectionView()); |
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
50 dc.addRedrawRequestHandler(handler); |
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
51 dc.addCloseClickHandler(new CloseClickHandler() { |
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
|
52 public void onCloseClick(CloseClickEvent event) { |
1364
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
53 dc.destroy(); |
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
54 } |
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
55 }); |
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
56 dc.show(); |
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 } |
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
59 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |