annotate flys-client/src/main/java/de/intevation/flys/client/client/ui/FLYSFooter.java @ 80:a26489e55730

Added footer and a spacer to the webpage layout. flys-client/trunk@1587 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Mon, 28 Mar 2011 11:59:00 +0000
parents
children f7967d12ce6e
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.events.ClickEvent;
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
8 import com.smartgwt.client.widgets.events.ClickHandler;
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
9 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
10
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
11 import de.intevation.flys.client.client.FLYS;
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
12 import de.intevation.flys.client.client.FLYSMessages;
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
13 import de.intevation.flys.client.shared.model.User;
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
14
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 /**
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
17 * @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
18 */
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
19 public class FLYSFooter extends HLayout {
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 /** The interface that provides i18n messages. */
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
22 private FLYSMessages messages = GWT.create(FLYSMessages.class);
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 /** An instance to FLYS.*/
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
25 protected FLYS flys;
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 open the project list.*/
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
28 protected Label home;
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 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
31 protected Label contact;
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 /** 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
34 protected Label impressum;
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 /**
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
37 * 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
38 */
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
39 public FLYSFooter(FLYS flys) {
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
40 this.flys = flys;
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
41
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
42 home = new Label(messages.footerHome());
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
43 contact = new Label(messages.footerContact());
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
44 impressum = new Label(messages.footerImpressum());
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 init();
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
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
49
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
50 /**
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
51 * 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
52 * 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
53 * 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
54 */
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
55 protected void init() {
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
56 setStyleName("bgBlueDark");
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
57 setHeight("25px");
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
58 setLayoutMargin(5);
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
59
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
60 home.setStyleName("fontLightSmall");
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
61 contact.setStyleName("fontLightSmall");
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
62 impressum.setStyleName("fontLightSmall");
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
63
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
64 HLayout panel = new HLayout();
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
65 panel.setWidth("100%");
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
66 panel.setMembersMargin(5);
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
67 panel.setAlign(Alignment.RIGHT);
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
68 panel.addMember(home);
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
69 panel.addMember(contact);
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
70 panel.addMember(impressum);
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
71 home.setAlign(Alignment.RIGHT);
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
72 contact.setAlign(Alignment.RIGHT);
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
73 impressum.setAlign(Alignment.RIGHT);
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
74
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
75 home.setWidth(70);
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
76 contact.setWidth(70);
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
77 impressum.setWidth(80);
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 addMember(panel);
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
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 /**
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
84 * 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
85 *
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
86 * @return the flys instance.
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 protected FLYS getFlys() {
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
89 return flys;
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
90 }
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
91 }
a26489e55730 Added footer and a spacer to the webpage layout.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
92 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org