view flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartPropertiesEditor.java @ 1430:6bb6d43eeb2d

Cosmetics. flys-client/trunk@3383 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Mon, 12 Dec 2011 07:23:24 +0000
parents 16b7adc66330
children 987f95ceb623
line wrap: on
line source
package de.intevation.flys.client.client.ui.chart;

import java.util.LinkedHashMap;

import com.google.gwt.core.client.GWT;

import com.smartgwt.client.widgets.Window;
import com.smartgwt.client.widgets.tab.TabSet;
import com.smartgwt.client.widgets.tab.Tab;
import com.smartgwt.client.widgets.layout.VLayout;
import com.smartgwt.client.widgets.layout.HLayout;
import com.smartgwt.client.widgets.Button;
import com.smartgwt.client.widgets.form.DynamicForm;
import com.smartgwt.client.widgets.form.fields.FormItem;
import com.smartgwt.client.widgets.form.fields.CheckboxItem;
import com.smartgwt.client.widgets.form.fields.SelectItem;
import com.smartgwt.client.widgets.form.fields.StaticTextItem;

import com.smartgwt.client.widgets.events.ClickEvent;
import com.smartgwt.client.widgets.events.ClickHandler;
import com.smartgwt.client.widgets.form.events.ItemChangedEvent;
import com.smartgwt.client.widgets.form.events.ItemChangedHandler;
import com.smartgwt.client.types.Alignment;

import de.intevation.flys.client.client.FLYSConstants;
import de.intevation.flys.client.client.ui.OutputTab;

/**
 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a>
 */
public class ChartPropertiesEditor
extends Window
implements ClickHandler
{
    /** The interface that provides i18n messages. */
    protected FLYSConstants MSG = GWT.create(FLYSConstants.class);

    /** The tab called the editor window. */
    protected OutputTab tab;

    /** The tabset for chart properties */
    protected TabSet tabs;

    /**
     * Setup editor dialog.
     * @param callerTab      The tab called the editor window.
     */
    public ChartPropertiesEditor(OutputTab callerTab) {
        this.tab = callerTab;
        this.tabs = new TabSet();

        init();
    }

    /**
     * Initialize the editor window and its components.
     */
    protected void init() {
        setTitle(MSG.properties());
        setCanDragReposition(true);
        setCanDragResize(true);

        Tab diagram = new Tab(MSG.diagram());
        Tab axes = new Tab(MSG.axes());
        Tab legend = new Tab(MSG.legend());
        tabs.addTab(diagram);
        tabs.addTab(axes);
        tabs.addTab(legend);

        Button accept = new Button(MSG.label_ok());
        Button cancel = new Button(MSG.label_cancel());
        cancel.addClickHandler(this);
        accept.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent e) {

            }
        });

        HLayout buttons = new HLayout();
        buttons.addMember(accept);
        buttons.addMember(cancel);
        buttons.setAlign(Alignment.CENTER);
        buttons.setHeight(30);

        addItem(tabs);
        addItem(buttons);
        setWidth(300);
        setHeight(410);
        centerInPage();
    }

    /**
     * This method is called when the user aborts theming.
     * @param event The event.
     */
    public void onClick(ClickEvent event) {
        this.hide();
    }
}

http://dive4elements.wald.intevation.org