diff flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartPropertiesEditor.java @ 1429:16b7adc66330

Added stub for chart property editor. flys-client/trunk@3375 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 09 Dec 2011 14:45:53 +0000
parents
children 987f95ceb623
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartPropertiesEditor.java	Fri Dec 09 14:45:53 2011 +0000
@@ -0,0 +1,99 @@
+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