changeset 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 17815a7354bc
children 1d0fb625248d
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/FLYS.java flys-client/src/main/java/de/intevation/flys/client/client/FLYSMessages.java flys-client/src/main/java/de/intevation/flys/client/client/FLYSMessages_de.properties flys-client/src/main/java/de/intevation/flys/client/client/ui/FLYSFooter.java
diffstat 5 files changed, 131 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Mon Mar 28 11:33:09 2011 +0000
+++ b/flys-client/ChangeLog	Mon Mar 28 11:59:00 2011 +0000
@@ -1,3 +1,17 @@
+2011-03-28  Raimund Renkert <rrenkert@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/client/FLYSMessages.java: Added text
+	  for FLYSFooter.
+
+	* src/main/java/de/intevation/flys/client/client/FLYSMessages_de.properties:
+	  Added german text for footer label.
+
+	* src/main/java/de/intevation/flys/client/client/ui/FLYSFooter.java: New. A
+	  new ui element at the bottom of the page.
+
+	* src/main/java/de/intevation/flys/client/client/FLYS.java: Added footer
+	  element to FLYS webpage.
+
 2011-03-28  Raimund Renkert <rrenkert@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/client/ui/ProjectList.java:
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYS.java	Mon Mar 28 11:33:09 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYS.java	Mon Mar 28 11:59:00 2011 +0000
@@ -7,6 +7,7 @@
 import com.google.gwt.xml.client.XMLParser;
 
 import com.smartgwt.client.widgets.layout.VLayout;
+import com.smartgwt.client.widgets.layout.HLayout;
 
 import de.intevation.flys.client.shared.model.Artifact;
 import de.intevation.flys.client.shared.model.Collection;
@@ -26,6 +27,7 @@
 import de.intevation.flys.client.client.ui.FLYSWorkspace;
 import de.intevation.flys.client.client.ui.MainMenu;
 import de.intevation.flys.client.client.ui.ProjectList;
+import de.intevation.flys.client.client.ui.FLYSFooter;
 
 
 /**
@@ -57,6 +59,9 @@
     /** The FLYSWorkspace.*/
     protected FLYSWorkspace workspace;
 
+    /** The footer. */
+    protected FLYSFooter footer;
+
     /** The user who is currently logged in.*/
     protected User currentUser;
 
@@ -70,17 +75,24 @@
     public void onModuleLoad() {
 
         VLayout vertical = new VLayout();
-        vertical.setMembersMargin(2);
         vertical.setLayoutMargin(1);
         vertical.setWidth100();
         vertical.setHeight100();
 
+        HLayout spacerBar = new HLayout();
+        spacerBar.setWidth("100%");
+        spacerBar.setHeight("20px");
+        spacerBar.setStyleName("bgBlueLight");
+
         menu = new MainMenu(this);
         view = new FLYSView();
+        footer = new FLYSFooter(this);
 
         vertical.addMember(new FLYSHeader());
         vertical.addMember(menu);
+        vertical.addMember(spacerBar);
         vertical.addMember(view);
+        vertical.addMember(footer);
 
         RootPanel.get("app").add(vertical);
 
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSMessages.java	Mon Mar 28 11:33:09 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSMessages.java	Mon Mar 28 11:59:00 2011 +0000
@@ -134,6 +134,15 @@
     @DefaultMessage("m³/s")
     String unitQStep();
 
+    @DefaultMessage("Home")
+    String footerHome();
+
+    @DefaultMessage("Contact")
+    String footerContact();
+
+    @DefaultMessage("Impressum")
+    String footerImpressum();
+
     @DefaultMessage("/images/next.png")
     String imageNext();
 
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSMessages_de.properties	Mon Mar 28 11:33:09 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSMessages_de.properties	Mon Mar 28 11:59:00 2011 +0000
@@ -41,6 +41,9 @@
 unitQFrom = m³/s&nbsp;-
 unitQTo = m³/s&nbsp;a
 unitQStep = m³/s
+footerHome = Home
+footerContact = Kontakt
+footerImressum = Impressum
 
 imageNext = /images/next_de.png
 imageBack = /images/back_de.png
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/FLYSFooter.java	Mon Mar 28 11:59:00 2011 +0000
@@ -0,0 +1,92 @@
+package de.intevation.flys.client.client.ui;
+
+import com.google.gwt.core.client.GWT;
+
+import com.smartgwt.client.types.Alignment;
+import com.smartgwt.client.widgets.Label;
+import com.smartgwt.client.widgets.events.ClickEvent;
+import com.smartgwt.client.widgets.events.ClickHandler;
+import com.smartgwt.client.widgets.layout.HLayout;
+
+import de.intevation.flys.client.client.FLYS;
+import de.intevation.flys.client.client.FLYSMessages;
+import de.intevation.flys.client.shared.model.User;
+
+
+/**
+ * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a>
+ */
+public class FLYSFooter extends HLayout {
+
+    /** The interface that provides i18n messages. */
+    private FLYSMessages messages = GWT.create(FLYSMessages.class);
+
+    /** An instance to FLYS.*/
+    protected FLYS flys;
+
+    /** The button to open the project list.*/
+    protected Label home;
+
+    /** The button to switch between the english and german version.*/
+    protected Label contact;
+
+    /** The button to open an info panel.*/
+    protected Label impressum;
+
+    /**
+     * The default constructor for creating a new MainMenu.
+     */
+    public FLYSFooter(FLYS flys) {
+        this.flys     = flys;
+
+        home    = new Label(messages.footerHome());
+        contact  = new Label(messages.footerContact());
+        impressum = new Label(messages.footerImpressum());
+
+        init();
+    }
+
+
+    /**
+     * This method is called by the constructor after creating the necessary
+     * components. It initializes layout specific stuff like width, height,
+     * colors and so on and appends the components.
+     */
+    protected void init() {
+        setStyleName("bgBlueDark");
+        setHeight("25px");
+        setLayoutMargin(5);
+
+        home.setStyleName("fontLightSmall");
+        contact.setStyleName("fontLightSmall");
+        impressum.setStyleName("fontLightSmall");
+
+        HLayout panel = new HLayout();
+        panel.setWidth("100%");
+        panel.setMembersMargin(5);
+        panel.setAlign(Alignment.RIGHT);
+        panel.addMember(home);
+        panel.addMember(contact);
+        panel.addMember(impressum);
+        home.setAlign(Alignment.RIGHT);
+        contact.setAlign(Alignment.RIGHT);
+        impressum.setAlign(Alignment.RIGHT);
+
+        home.setWidth(70);
+        contact.setWidth(70);
+        impressum.setWidth(80);
+
+        addMember(panel);
+    }
+
+
+    /**
+     * Returns the FLYS instance stored in this class.
+     *
+     * @return the flys instance.
+     */
+    protected FLYS getFlys() {
+        return flys;
+    }
+}
+// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org