view flys-client/src/main/java/de/intevation/flys/client/client/ui/FLYSFooter.java @ 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. flys-client/trunk@1645 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 05 Apr 2011 08:13:48 +0000
parents f7967d12ce6e
children
line wrap: on
line source
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.layout.HLayout;

import de.intevation.flys.client.client.FLYS;
import de.intevation.flys.client.client.FLYSConstants;


/**
 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a>
 */
public class FLYSFooter extends HLayout {

    /** The interface that provides i18n messages. */
    private FLYSConstants messages = GWT.create(FLYSConstants.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