changeset 9053:ad2ae847e10e

- RadioButton-Auswahl generisch - Überflutungsdauern (inudation of infrastructures) Ablauf states
author gernotbelger
date Fri, 04 May 2018 13:17:57 +0200 (2018-05-04)
parents a6c19528ac16
children 95643dffd006
files artifacts/doc/conf/artifacts/sinfo.xml artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/inundation/RiversideChoice.java artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/inundation/RiversideRadioChoice.java artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/inundation/WsplChoice.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/RadioSelect.java artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/YearEpochSelect.java artifacts/src/main/resources/messages.properties gwt-client/src/main/java/org/dive4elements/river/client/client/ui/UIProviderFactory.java
diffstat 8 files changed, 219 insertions(+), 207 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/doc/conf/artifacts/sinfo.xml	Thu May 03 14:57:31 2018 +0200
+++ b/artifacts/doc/conf/artifacts/sinfo.xml	Fri May 04 13:17:57 2018 +0200
@@ -278,24 +278,23 @@
 
 
    <!-- Calculation Mode: Überflutungsdauern Infrastrukturen BWaStr -->
+   <!-- Schrittweite benötigt für wq-state -->
+     <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition">
+      <from state="state.sinfo.calculation_mode"/>
+      <to state="state.sinfo.distance"/>
+      <condition data="calculation_mode" value="sinfo_calc_infrastructures_inundation_duration" operator="equal"/>
+    </transition>
     
      <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition">
-      <from state="state.sinfo.distance_only"/>
+      <from state="state.sinfo.distance"/> 
       <to state="state.sinfo.riverside"/>
       <condition data="calculation_mode" value="sinfo_calc_infrastructures_inundation_duration" operator="equal"/>
     </transition>
     
-    <state id="state.sinfo.riverside" description="state.sinfo.riverside" state="org.dive4elements.river.artifacts.sinfo.inundation.RiversideChoice" helpText="help.state.sinfo.riverside">
-      <data name="todo_radio_btn" type="Boolean"/>
+    <state id="state.sinfo.riverside" description="state.sinfo.riverside" state="org.dive4elements.river.artifacts.sinfo.inundation.RiversideRadioChoice" helpText="help.state.sinfo.riverside">
+      <data name="riverside" type="String"/>
     </state>
     
-    
-    <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition">
-      <from state="state.sinfo.calculation_mode"/>
-      <to state="state.sinfo.distance_only"/>
-      <condition data="calculation_mode" value="sinfo_calc_infrastructures_inundation_duration" operator="equal"/>
-    </transition>
-    
     <state id="state.sinfo.wspl" description="state.sinfo.wspl" state="org.dive4elements.river.artifacts.sinfo.inundation.WsplChoice" helpText="help.state.sinfo.wspl">
       <data name="wspl" type="Boolean"/>
     </state>
@@ -305,26 +304,29 @@
       <to state="state.sinfo.wspl"/>
       <condition data="calculation_mode" value="sinfo_calc_infrastructures_inundation_duration" operator="equal"/>
     </transition>
-    
-    <state id="state.sinfo.wqinput" description="state.sinfo.wqinput" state="org.dive4elements.river.artifacts.sinfo.inundation.WqinputChoice" helpText="help.state.sinfo.wqinput">
-      <data name="wqinput" type="Boolean"/>
-    </state>
-    
+     
+     
 	<transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition">
       <from state="state.sinfo.wspl"/>
-      <to state="state.sinfo.wqinput"/>
-      <condition data="calculation_mode" value="sinfo_calc_infrastructures_inundation_duration" operator="equal"/>
+      <to state="state.sinfo.wq"/>
+      <condition data="wspl" value="true" operator="equal"/>   
     </transition>
     
     <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition">
-      <from state="state.sinfo.wqinput"/>
+      <from state="state.sinfo.wspl"/>
+      <to state="state.sinfo.infrastructures_inundation"/>
+      <condition data="wspl" value="false" operator="equal"/>   
+    </transition>
+    
+    <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition">
+      <from state="state.sinfo.wq"/>
       <to state="state.sinfo.infrastructures_inundation"/>
       <condition data="calculation_mode" value="sinfo_calc_infrastructures_inundation_duration" operator="equal"/>
     </transition>
+     
     
     
-    
-        <state id="state.sinfo.infrastructures_inundation" description="state.sinfo.infrastructures_inundation" state="org.dive4elements.river.artifacts.sinfo.inundation.InundationState" helpText="help.state.sinfo.infrastructures_inundation">
+    <state id="state.sinfo.infrastructures_inundation" description="state.sinfo.infrastructures_inundation" state="org.dive4elements.river.artifacts.sinfo.inundation.InundationState" helpText="help.state.sinfo.infrastructures_inundation">
       <outputmodes>
         <outputmode name="infrastructures_inundation" description="output.infrastructures_inundation" mime-type="image/png" type="chart">
           <facets>
@@ -377,13 +379,16 @@
       <data name="ld_step" type="Double"/>
     </state>
 
+
+
+  
     <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition">
       <from state="state.sinfo.distance"/>
       <to state="state.sinfo.wq"/>
       <condition data="calculation_mode" value="sinfo_calc_transport_bodies_heights" operator="equal"/>
     </transition>
 
-    <state id="state.sinfo.wq" description="state.winfo.wq" state="org.dive4elements.river.artifacts.states.WQSelect" helpText="help.state.sinfo.wq">
+    <state id="state.sinfo.wq" description="state.sinfo.wq" state="org.dive4elements.river.artifacts.states.WQSelect" helpText="help.state.sinfo.wq">
       <data name="wq_isq" type="Boolean"/>
       <data name="wq_isfree" type="Boolean"/>
       <data name="wq_isrange" type="Boolean"/>
@@ -392,13 +397,13 @@
       <data name="wq_step" type="Double"/>
       <data name="wq_single" type="Double[]"/>
     </state>
-
+    
     <transition transition="org.dive4elements.river.artifacts.transitions.ValueCompareTransition">
       <from state="state.sinfo.wq"/>
       <to state="state.sinfo.transport_bodies_heights"/>
       <condition data="calculation_mode" value="sinfo_calc_transport_bodies_heights" operator="equal"/>
     </transition>
-
+    
     <state id="state.sinfo.transport_bodies_heights" description="state.sinfo.transport_bodies_heights" state="org.dive4elements.river.artifacts.sinfo.tkhstate.TkhState" helpText="help.state.sinfo.transport_bodies_heights">
       <outputmodes>
         <outputmode name="sinfo_tkk" description="output.tkk" mime-type="image/png" type="chart">
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/inundation/RiversideChoice.java	Thu May 03 14:57:31 2018 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
- * Software engineering by Intevation GmbH
- *
- * This file is Free Software under the GNU AGPL (>=v3)
- * and comes with ABSOLUTELY NO WARRANTY! Check out the
- * documentation coming with Dive4Elements River for details.
- */
-
-package org.dive4elements.river.artifacts.sinfo.inundation;
-
-import org.dive4elements.river.artifacts.states.BooleanChoiceState;
-
-/**
- * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
- */
-public class RiversideChoice extends BooleanChoiceState {
-
-    private static final long serialVersionUID = 1L;
-
-    public RiversideChoice() {
-        super("state.sinfo.riverside.option1", "active", "inactive");
-    }
-}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/inundation/RiversideRadioChoice.java	Fri May 04 13:17:57 2018 +0200
@@ -0,0 +1,36 @@
+/* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
+ * Software engineering by Intevation GmbH
+ *
+ * This file is Free Software under the GNU AGPL (>=v3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details.
+ */
+
+package org.dive4elements.river.artifacts.sinfo.inundation;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.dive4elements.river.artifacts.states.RadioSelect;
+
+/**
+ * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
+ */
+public class RiversideRadioChoice extends RadioSelect {
+    private static final long serialVersionUID = 1L;
+
+    public RiversideRadioChoice() {
+        super();
+    }
+
+    @Override
+    protected List<String> makeEntries() {
+        final List<String> entries = new ArrayList<>();
+        entries.add("state.sinfo.riverside.left");
+        entries.add("state.sinfo.riverside.right");
+        entries.add("state.sinfo.riverside.both");
+        return entries;
+
+    }
+
+}
\ No newline at end of file
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/inundation/WsplChoice.java	Thu May 03 14:57:31 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/inundation/WsplChoice.java	Fri May 04 13:17:57 2018 +0200
@@ -18,6 +18,6 @@
     private static final long serialVersionUID = 1L;
 
     public WsplChoice() {
-        super("state.sinfo.wspl.option", "wspl.active", "wspl.inactive");
+        super("state.sinfo.wspl.option", "state.sinfo.wspl.active", "state.sinfo.wspl.inactive");
     }
 }
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/RadioSelect.java	Fri May 04 13:17:57 2018 +0200
@@ -0,0 +1,54 @@
+/** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde
+ * Software engineering by
+ *  Björnsen Beratende Ingenieure GmbH
+ *  Dr. Schumacher Ingenieurbüro für Wasser und Umwelt
+ *
+ * This file is Free Software under the GNU AGPL (>=v3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details.
+ */
+package org.dive4elements.river.artifacts.states;
+
+import java.util.List;
+
+import org.dive4elements.artifacts.Artifact;
+import org.dive4elements.artifacts.CallContext;
+import org.dive4elements.artifacts.CallMeta;
+import org.dive4elements.artifacts.common.utils.XMLUtils;
+import org.dive4elements.river.artifacts.resources.Resources;
+import org.w3c.dom.Element;
+
+/**
+ * @author Domenico Nardi Tironi
+ *
+ */
+public abstract class RadioSelect extends DefaultState {
+
+    private static final long serialVersionUID = 1L;
+    private final List<String> entries;
+
+    public RadioSelect() {
+        super();
+        this.entries = makeEntries();
+    }
+
+    protected abstract List<String> makeEntries();
+
+    @Override
+    protected final String getUIProvider() {
+        return "radio_panel";
+    }
+
+    @Override
+    protected Element[] createItems(final XMLUtils.ElementCreator ec, final Artifact artifact, final String name, final CallContext context) {
+        final CallMeta meta = context.getMeta();
+        final Element[] elements = new Element[this.entries.size()];
+        int i = 0;
+        for (final String item : this.entries) {
+            elements[i] = createItem(ec, new String[] { Resources.getMsg(meta, item, item), item });
+            i++;
+        }
+        return elements;
+    }
+
+}
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/YearEpochSelect.java	Thu May 03 14:57:31 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/states/minfo/YearEpochSelect.java	Fri May 04 13:17:57 2018 +0200
@@ -8,19 +8,18 @@
 
 package org.dive4elements.river.artifacts.states.minfo;
 
-import org.w3c.dom.Element;
-
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallContext;
 import org.dive4elements.artifacts.CallMeta;
 import org.dive4elements.artifacts.common.utils.XMLUtils;
 import org.dive4elements.river.artifacts.resources.Resources;
 import org.dive4elements.river.artifacts.states.DefaultState;
+import org.w3c.dom.Element;
 
 /**
  * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a>
  */
-public class YearEpochSelect extends DefaultState {
+public class YearEpochSelect extends DefaultState {// TODO: RadioSelect-class; more flexible Implementation
 
     /**
      * The default constructor that initializes an empty State object.
@@ -34,49 +33,34 @@
     }
 
     @Override
-    protected Element[] createItems(
-        XMLUtils.ElementCreator ec,
-        Artifact                artifact,
-        String                  name,
-        CallContext             context)
-    {
-        CallMeta meta = context.getMeta();
+    protected Element[] createItems(final XMLUtils.ElementCreator ec, final Artifact artifact, final String name, final CallContext context) {
+        final CallMeta meta = context.getMeta();
         Element[] elements;
 
-        /* Disable calculation of official epochs
-        if (((D4EArtifact)artifact).getCurrentStateId()
-            .equals("state.minfo.sediment.load.year_epoch")
-        ) {
-            elements = new Element[3];
-            elements[2] = createItem(
-                ec,
-                new String[] {
-                    Resources.getMsg(meta,
-                        "state.minfo.off_epoch",
-                        "state.minfo.off_epoch"),
-                    "off_epoch"});
-        }
-        else {
-            elements = new Element[2];
-            } */
+        /*
+         * Disable calculation of official epochs
+         * if (((D4EArtifact)artifact).getCurrentStateId()
+         * .equals("state.minfo.sediment.load.year_epoch")
+         * ) {
+         * elements = new Element[3];
+         * elements[2] = createItem(
+         * ec,
+         * new String[] {
+         * Resources.getMsg(meta,
+         * "state.minfo.off_epoch",
+         * "state.minfo.off_epoch"),
+         * "off_epoch"});
+         * }
+         * else {
+         * elements = new Element[2];
+         * }
+         */
         elements = new Element[2];
-        elements[0] = createItem(
-                ec,
-                new String[] {
-                    Resources.getMsg(meta,
-                        "state.minfo.year",
-                        "state.minfo.year"),
-                    "year"});
+        elements[0] = createItem(ec, new String[] { Resources.getMsg(meta, "state.minfo.year", "state.minfo.year"), "year" });
 
-        elements[1] = createItem(
-            ec,
-            new String[] {
-                Resources.getMsg(meta,
-                    "state.minfo.epoch",
-                    "state.minfo.epoch"),
-                "epoch"});
+        elements[1] = createItem(ec, new String[] { Resources.getMsg(meta, "state.minfo.epoch", "state.minfo.epoch"), "epoch" });
 
-       return elements;
+        return elements;
     }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :
--- a/artifacts/src/main/resources/messages.properties	Thu May 03 14:57:31 2018 +0200
+++ b/artifacts/src/main/resources/messages.properties	Fri May 04 13:17:57 2018 +0200
@@ -845,12 +845,15 @@
 state.sinfo.riverside.option1 = Beide Uferseiten
 help.state.sinfo.wspl= ${help.url}/OnlineHilfe/SINFO#help.state.sinfo.riverside
 
-state.sinfo.wqinput = Eingabe f\u00fcr W/Q Daten
-state.sinfo.wqinput.option = wqinput-option
-help.state.sinfo.wqinput = ${help.url}/OnlineHilfe/SINFO#help.state.sinfo.wqinput
+state.sinfo.wq_adapted = Eingabe f\u00fcr W/Q Daten
+help.state.sinfo.wq_adapted = ${help.url}/OnlineHilfe/SINFO#help.state.sinfo.wq_adapted
+state.sinfo.wq = Eingabe f\u00fcr W/Q Daten
+help.state.sinfo.wq = ${help.url}/OnlineHilfe/SINFO#help.state.sinfo.wq
 
 state.sinfo.wspl = Wasserspiegellagen
 state.sinfo.wspl.option = Wasserspiegellagen zus\u00e4tzlich darstellen?
+state.sinfo.wspl.active = Ja
+state.sinfo.wspl.inactive = Nein
 help.state.sinfo.wspl= ${help.url}/OnlineHilfe/SINFO#help.state.sinfo.wspl
   
 state.sinfo.grounding.year = Jahr/Zeitraum
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/UIProviderFactory.java	Thu May 03 14:57:31 2018 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/UIProviderFactory.java	Fri May 04 13:17:57 2018 +0200
@@ -38,174 +38,127 @@
     private UIProviderFactory() {
     }
 
-    /** @param uiProvider uiprovider demanded for by state. */
-    public static UIProvider getProvider(String uiProvider, User user) {
+    /**
+     * @param uiProvider
+     *            uiprovider demanded for by state.
+     */
+    public static UIProvider getProvider(final String uiProvider, final User user) {
         if (uiProvider == null || uiProvider.equals("")) {
             return new SelectProvider();
-        }
-        else if (uiProvider.equals("select_with_map")) {
+        } else if (uiProvider.equals("select_with_map")) {
             return new MapSelection();
-        }
-        else if (uiProvider.equals("location_distance_panel")) {
+        } else if (uiProvider.equals("location_distance_panel")) {
             return new LocationDistancePanel();
-        }
-        else if (uiProvider.equals("location_panel")) {
+        } else if (uiProvider.equals("location_panel")) {
             return new SingleLocationPanel();
-        }
-        else if (uiProvider.equals("multi_location_panel")) {
+        } else if (uiProvider.equals("multi_location_panel")) {
             return new MultipleLocationPanel();
-        }
-        else if (uiProvider.equals("distance_panel")) {
+        } else if (uiProvider.equals("distance_panel")) {
             return new DistancePanel();
-        }
-        else if (uiProvider.equals("distance_only_panel")) {
+        } else if (uiProvider.equals("distance_only_panel")) {
             return new DistanceOnlyPanel();
-        }
-        else if (uiProvider.equals("waterlevel_ground_panel")) {
+        } else if (uiProvider.equals("waterlevel_ground_panel")) {
             return new WaterlevelGroundPanel();
-        }
-        else if (uiProvider.equals("wq_panel")) {
+        } else if (uiProvider.equals("wq_panel")) {
             return new WQInputPanel();
-        }
-        else if (uiProvider.equals("wq_panel_adapted")) {
+        } else if (uiProvider.equals("wq_panel_adapted")) {
             return new WQAdaptedInputPanel();
-        }
-        else if (uiProvider.equals("wq_panel_adapted_fixing")) {
+        } else if (uiProvider.equals("wq_panel_adapted_fixing")) {
             return new WQAdaptedFixingInputPanel();
-        }
-        else if (uiProvider.equals("q_segmented_panel")) {
+        } else if (uiProvider.equals("q_segmented_panel")) {
             return new QSegmentedInputPanel();
-        }
-        else if (uiProvider.equals("river_panel")) {
+        } else if (uiProvider.equals("river_panel")) {
             return new LinkSelection();
-        }
-        else if (uiProvider.equals("continue")) {
+        } else if (uiProvider.equals("continue")) {
             return new ContinuePanel();
-        }
-        else if (uiProvider.equals("wsp_datacage_panel")) {
+        } else if (uiProvider.equals("wsp_datacage_panel")) {
             return new WspDatacagePanel(user);
-        }
-        else if (uiProvider.equals("dgm_datacage_panel")) {
+        } else if (uiProvider.equals("dgm_datacage_panel")) {
             return new DemDatacagePanel(user);
-        }
-        else if (uiProvider.equals("waterlevel_twin_panel")) {
+        } else if (uiProvider.equals("waterlevel_twin_panel")) {
             return new WaterlevelTwinPanel(user);
-        }
-        else if (uiProvider.equals("auto_integer")) {
+        } else if (uiProvider.equals("auto_integer")) {
             return new AutoIntegerPanel();
-        }
-        else if (uiProvider.equals("boolean_panel")) {
+        } else if (uiProvider.equals("boolean_panel")) {
             return new BooleanPanel();
-        }
-        else if (uiProvider.equals("noinput")) {
+        } else if (uiProvider.equals("noinput")) {
             return new NoInputPanel();
-        }
-        else if (uiProvider.equals("map_digitize")) {
+        } else if (uiProvider.equals("map_digitize")) {
             return new DigitizePanel();
-        }
-        else if (uiProvider.equals("timerange")) {
+        } else if (uiProvider.equals("timerange")) {
             return new IntegerRangePanel();
-        }
-        else if (uiProvider.equals("wq_simple_array")) {
+        } else if (uiProvider.equals("wq_simple_array")) {
             return new WQSimpleArrayPanel();
-        }
-        else if (uiProvider.equals("gaugetimerange")) {
+        } else if (uiProvider.equals("gaugetimerange")) {
             return new GaugeTimeRangePanel();
-        }
-        else if (uiProvider.equals("fix.location_panel")) {
+        } else if (uiProvider.equals("fix.location_panel")) {
             return new FixLocationPanel();
-        }
-        else if (uiProvider.equals("fix.period_panel")) {
+        } else if (uiProvider.equals("fix.period_panel")) {
             return new FixPeriodPanel();
-        }
-        else if (uiProvider.equals("fix.period_ref_panel")) {
+        } else if (uiProvider.equals("fix.period_ref_panel")) {
             return new FixPeriodPanel("ref_start", "ref_end");
-        }
-        else if (uiProvider.equals("fix.period_ana_panel")) {
+        } else if (uiProvider.equals("fix.period_ana_panel")) {
             return new FixMultiPeriodPanel();
-        }
-        else if (uiProvider.equals("fix.qselect_panel")) {
+        } else if (uiProvider.equals("fix.qselect_panel")) {
             return new FixQSelectPanel();
-        }
-        else if (uiProvider.equals("fix.gaugeselect_panel")) {
+        } else if (uiProvider.equals("fix.gaugeselect_panel")) {
             return new FixGaugeSelectPanel();
-        }
-        else if (uiProvider.equals("fix.event_panel")) {
+        } else if (uiProvider.equals("fix.event_panel")) {
             return new FixEventSelect();
-        }
-        else if (uiProvider.equals("fix.preprocessing_panel")) {
+        } else if (uiProvider.equals("fix.preprocessing_panel")) {
             return new BooleanPanel();
-        }
-        else if (uiProvider.equals("fix.functionselect")) {
+        } else if (uiProvider.equals("fix.functionselect")) {
             return new FixFunctionSelect();
-        }
-        else if (uiProvider.equals("period_select")) {
+        } else if (uiProvider.equals("period_select")) {
             return new PeriodPanel();
-        }
-        else if (uiProvider.equals("periods_select")) {
+        } else if (uiProvider.equals("periods_select")) {
             return new MultiPeriodPanel();
-        }
-        else if (uiProvider.equals("sq.period.select")) {
+        } else if (uiProvider.equals("sq.period.select")) {
             return new SQPeriodPanel();
-        }
-        else if (uiProvider.equals("outliers_input")) {
+        } else if (uiProvider.equals("outliers_input")) {
             return new DoubleInputPanel();
-        }
-        else if (uiProvider.equals("percent_input")) {
+        } else if (uiProvider.equals("percent_input")) {
             return new DoubleInputPanel("percent");
-        }
-        else if (uiProvider.equals("parameter-matrix")) {
+        } else if (uiProvider.equals("parameter-matrix")) {
             return new ParameterMatrixPanel();
-        }
-        else if (uiProvider.equals("minfo.bed.year_epoch")) {
+        } else if (uiProvider.equals("minfo.bed.year_epoch")) {
             return new RadioPanel();
-        }
-        else if (uiProvider.equals("bedquality_periods_select")) {
+        } else if (uiProvider.equals("radio_panel")) {
+            return new RadioPanel();
+        } else if (uiProvider.equals("bedquality_periods_select")) {
             return new BedMultiPeriodPanel();
-        }
-        else if (uiProvider.equals("bedheights_twin_panel")) {
+        } else if (uiProvider.equals("bedheights_twin_panel")) {
             return new BedHeightsDatacagePanel(user);
-        }
-        else if (uiProvider.equals("minfo.bed.char_diameter")) {
+        } else if (uiProvider.equals("minfo.bed.char_diameter")) {
             return new CheckboxPanel();
-        }
-        else if (uiProvider.equals("minfo.sedimentload_unit_select")) {
+        } else if (uiProvider.equals("minfo.sedimentload_unit_select")) {
             return new RadioPanel();
-        }
-        else if (uiProvider.equals("static_data")) {
+        } else if (uiProvider.equals("static_data")) {
+            return new StaticDataPanel();
+        } else if (uiProvider.equals("minfo.sedimentload_distance_select")) {
+            return new SedLoadDistancePanel();
+        } else if (uiProvider.equals("minfo.sedimentload_year_select")) {
+            return new SedLoadPeriodPanel();
+        } else if (uiProvider.equals("minfo.sedimentload_epoch_select")) {
+            return new SedLoadEpochPanel();
+        } else if (uiProvider.equals("minfo.sedimentload_sqti_select")) {
+            return new SedLoadSQTiPanel();
+        } else if (uiProvider.equals("hws_datacage_panel")) {
+            return new HWSDatacagePanel(user);
+        } else if (uiProvider.equals("user_rgd_panel")) {
+            return new UserRGDProvider();
+        } else if (uiProvider.equals("static_sqrelation")) {
             return new StaticDataPanel();
         }
-        else if (uiProvider.equals("minfo.sedimentload_distance_select")) {
-            return new SedLoadDistancePanel();
-        }
-        else if (uiProvider.equals("minfo.sedimentload_year_select")) {
-            return new SedLoadPeriodPanel();
-        }
-        else if (uiProvider.equals("minfo.sedimentload_epoch_select")) {
-            return new SedLoadEpochPanel();
-        }
-        else if (uiProvider.equals("minfo.sedimentload_sqti_select")) {
-            return new SedLoadSQTiPanel();
-        }
-        else if (uiProvider.equals("hws_datacage_panel")) {
-            return new HWSDatacagePanel(user);
-        }
-        else if (uiProvider.equals("user_rgd_panel")) {
-            return new UserRGDProvider();
-        }
-        else if (uiProvider.equals("static_sqrelation")) {
-            return new StaticDataPanel();
-        }
-        
+
         if ("sinfo_flowdepth_twin_panel".equals(uiProvider))
-        	return new FlowDepthTwinPanel(user);
+            return new FlowDepthTwinPanel(user);
 
         if ("sinfo_flowdepthminmax_twin_panel".equals(uiProvider))
             return new FlowDepthMinMaxTwinPanel(user);
-        
-        //GWT.log("Picked default provider.");
+
+        // GWT.log("Picked default provider.");
         return new SelectProvider();
     }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
-

http://dive4elements.wald.intevation.org