Mercurial > dive4elements > river
annotate flys-client/src/main/java/de/intevation/flys/client/client/ui/Toolbar.java @ 4641:f3325079dacc
Improve the up and down arrows in the theme navigation panel
Don't stretch the arrow icons and fit to their actual size. Also put the up
buttons on the left and the down buttons on the right.
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Tue, 04 Dec 2012 16:16:43 +0100 |
parents | 0be65bc65cee |
children |
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 |
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 |
4013
0be65bc65cee
Set overflow behaviour of Toolbars to HIDDEN to avoid auto scrollbars.
Christian Lins <christian.lins@intevation.de>
parents:
2452
diff
changeset
|
8 import de.intevation.flys.client.client.event.RedrawRequestHandler; |
1364
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.Artifact; |
9981ba2ee13a
Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 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
|
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 : |