changeset 7:a65793e08245

Radio buttons for each plugin are displayed if a new CollectionView is created. flys-client/trunk@1315 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 11 Feb 2011 11:16:55 +0000
parents e2b3966b40ca
children 9cb3ee7ed8ba
files flys-client/ChangeLog 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/FLYSMessages_en.properties flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java
diffstat 5 files changed, 91 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Fri Feb 11 09:51:32 2011 +0000
+++ b/flys-client/ChangeLog	Fri Feb 11 11:16:55 2011 +0000
@@ -1,3 +1,14 @@
+2011-02-11  Ingo Weinzierl <ingo@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/client/FLYSMessages_en.properties,
+	  src/main/java/de/intevation/flys/client/client/FLYSMessages_de.properties,
+	  src/main/java/de/intevation/flys/client/client/FLYSMessages.java: Added
+	  strings for the plugins.
+
+	* src/main/java/de/intevation/flys/client/client/ui/CollectionView.java:
+	  Display radio buttons if the collection is new and no plugin (winfo,
+	  minfo, map, fix analyse) has been chosen.
+
 2011-02-11  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/client/FLYSMessages_en.properties,
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSMessages.java	Fri Feb 11 09:51:32 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSMessages.java	Fri Feb 11 11:16:55 2011 +0000
@@ -31,5 +31,17 @@
 
     @DefaultMessage("New Project")
     String new_project();
+
+    @DefaultMessage("WINFO")
+    String winfo();
+
+    @DefaultMessage("MINFO")
+    String minfo();
+
+    @DefaultMessage("Map")
+    String map();
+
+    @DefaultMessage("TODO FIX ANALYSE TODO")
+    String fix();
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSMessages_de.properties	Fri Feb 11 09:51:32 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSMessages_de.properties	Fri Feb 11 11:16:55 2011 +0000
@@ -6,3 +6,7 @@
 load_projects = Lade Berechnungen...
 date_format = dd.MM.yyyy
 new_project = Neues Projekt
+winfo = WINFO
+minfo = MINFO
+map = Karte
+fix = Fixierungsanalyse
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSMessages_en.properties	Fri Feb 11 09:51:32 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSMessages_en.properties	Fri Feb 11 11:16:55 2011 +0000
@@ -6,3 +6,7 @@
 load_projects = Load calculations...
 date_format = yyyy-MM-dd
 new_project = New Project
+winfo = WINFO
+minfo = MINFO
+map = Map
+fix = TODO FIX ANALYSE TODO
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java	Fri Feb 11 09:51:32 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java	Fri Feb 11 11:16:55 2011 +0000
@@ -2,8 +2,16 @@
 
 import com.google.gwt.core.client.GWT;
 import com.google.gwt.i18n.client.DateTimeFormat;
+import com.google.gwt.user.client.ui.RadioButton;
 
+import com.smartgwt.client.widgets.Canvas;
 import com.smartgwt.client.widgets.Window;
+import com.smartgwt.client.widgets.form.DynamicForm;
+import com.smartgwt.client.widgets.form.fields.RadioGroupItem;
+import com.smartgwt.client.widgets.layout.HLayout;
+import com.smartgwt.client.widgets.layout.VLayout;
+import com.smartgwt.client.widgets.tab.Tab;
+import com.smartgwt.client.widgets.tab.TabSet;
 
 import de.intevation.flys.client.shared.model.Collection;
 
@@ -21,6 +29,12 @@
     /** The collection to be displayed.*/
     protected Collection collection;
 
+    /** The parameter tab.*/
+    protected Tab parameterTab;
+
+    /** The output tab.*/
+    protected Tab outputTab;
+
 
     /**
      * This constructor creates a new CollectionView that is used to display the
@@ -47,6 +61,52 @@
         DateTimeFormat dtf = DateTimeFormat.getFormat(messages.date_format());
         String lastAccess  = dtf.format(collection.getLastAccess());
         setTitle(lastAccess + " - " + collection.getName());
+
+        VLayout layout = new VLayout();
+        addItem(layout);
+
+        if (isNew()) {
+            layout.addMember(renderNew());
+        }
+    }
+
+
+    /**
+     * This method returns true, if the Collection is new and no plugins has
+     * been chosen.
+     *
+     * @return true, if the Collection is new.
+     */
+    public boolean isNew() {
+        return true;
+    }
+
+
+    /**
+     * This method creates a Canvas displaying the plugins of FLYS.
+     *
+     * @return a Canvas that displays the plugins of FLYS.
+     */
+    protected Canvas renderNew() {
+        HLayout layout = new HLayout();
+        layout.setWidth100();
+
+        DynamicForm    form  = new DynamicForm();
+        RadioGroupItem radio = new RadioGroupItem("plugin");
+
+        radio.setShowTitle(false);
+        radio.setVertical(false);
+        radio.setValueMap(
+            messages.winfo(),
+            messages.minfo(),
+            messages.map(),
+            messages.fix());
+
+        form.setFields(radio);
+
+        layout.addMember(form);
+
+        return layout;
     }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org