Mercurial > dive4elements > river
annotate flys-client/src/main/java/de/intevation/flys/client/client/ui/FLYSFooter.java @ 4205:0dd8963cec9c
Set also the width of the GaugeTree when resizing the GaugePanel
GWT is no longer able to calculate and set the correct width of the GaugeTree since
the GaugeTree is added via a Canvas wrapper. Therefore set the width manually
when resizing the GaugeTree.
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Mon, 22 Oct 2012 15:33:16 +0200 |
parents | b92281182c6b |
children |
rev | line source |
---|---|
80
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.client.client.ui; |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
2 |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
3 import com.google.gwt.core.client.GWT; |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
4 |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
5 import com.smartgwt.client.types.Alignment; |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
6 import com.smartgwt.client.widgets.Label; |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
7 import com.smartgwt.client.widgets.layout.HLayout; |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
8 |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
9 import de.intevation.flys.client.client.FLYS; |
211
b92281182c6b
Removed the FLYSMessages interface and replaced it with a FLYSConstants interface - this interface has the ability to lookup i18n strings with given keys.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
101
diff
changeset
|
10 import de.intevation.flys.client.client.FLYSConstants; |
80
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
11 |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
12 |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
13 /** |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
14 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a> |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
15 */ |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
16 public class FLYSFooter extends HLayout { |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
17 |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
18 /** The interface that provides i18n messages. */ |
211
b92281182c6b
Removed the FLYSMessages interface and replaced it with a FLYSConstants interface - this interface has the ability to lookup i18n strings with given keys.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
101
diff
changeset
|
19 private FLYSConstants messages = GWT.create(FLYSConstants.class); |
80
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
20 |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
21 /** An instance to FLYS.*/ |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
22 protected FLYS flys; |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
23 |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
24 /** The button to open the project list.*/ |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
25 protected Label home; |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
26 |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
27 /** The button to switch between the english and german version.*/ |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
28 protected Label contact; |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
29 |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
30 /** The button to open an info panel.*/ |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
31 protected Label impressum; |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
32 |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
33 /** |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
34 * The default constructor for creating a new MainMenu. |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
35 */ |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
36 public FLYSFooter(FLYS flys) { |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
37 this.flys = flys; |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
38 |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
39 home = new Label(messages.footerHome()); |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
40 contact = new Label(messages.footerContact()); |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
41 impressum = new Label(messages.footerImpressum()); |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
42 |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
43 init(); |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
44 } |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
45 |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
46 |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
47 /** |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
48 * This method is called by the constructor after creating the necessary |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
49 * components. It initializes layout specific stuff like width, height, |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
50 * colors and so on and appends the components. |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
51 */ |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
52 protected void init() { |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
53 setStyleName("bgBlueDark"); |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
54 setHeight("25px"); |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
55 setLayoutMargin(5); |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
56 |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
57 home.setStyleName("fontLightSmall"); |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
58 contact.setStyleName("fontLightSmall"); |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
59 impressum.setStyleName("fontLightSmall"); |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
60 |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
61 HLayout panel = new HLayout(); |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
62 panel.setWidth("100%"); |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
63 panel.setMembersMargin(5); |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
64 panel.setAlign(Alignment.RIGHT); |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
65 panel.addMember(home); |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
66 panel.addMember(contact); |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
67 panel.addMember(impressum); |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
68 home.setAlign(Alignment.RIGHT); |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
69 contact.setAlign(Alignment.RIGHT); |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
70 impressum.setAlign(Alignment.RIGHT); |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
71 |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
72 home.setWidth(70); |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
73 contact.setWidth(70); |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
74 impressum.setWidth(80); |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
75 |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
76 addMember(panel); |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
77 } |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
78 |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
79 |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
80 /** |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
81 * Returns the FLYS instance stored in this class. |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
82 * |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
83 * @return the flys instance. |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
84 */ |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
85 protected FLYS getFlys() { |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
86 return flys; |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
87 } |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
88 } |
a26489e55730
Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff
changeset
|
89 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |