annotate gwt-client/src/main/java/org/dive4elements/river/client/client/ui/ParameterList.java @ 9071:a561b882436d

create module bundu (Betrieb & Unterhaltung) incl. original Fixierungsanalyse+Ausgelagerte Wasserspiegellage
author gernotbelger
date Wed, 16 May 2018 11:08:56 +0200
parents 8c3e5682cb60
children 02739b8c010d
rev   line source
5861
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
2 * Software engineering by Intevation GmbH
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
3 *
5993
ea9eef426962 Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5861
diff changeset
4 * This file is Free Software under the GNU AGPL (>=v3)
5861
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the
5993
ea9eef426962 Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5861
diff changeset
6 * documentation coming with Dive4Elements River for details.
5861
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
7 */
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
8
5835
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
9 package org.dive4elements.river.client.client.ui;
23
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
11 import java.util.ArrayList;
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
12 import java.util.List;
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
13 import java.util.Map;
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
14 import java.util.Set;
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
15 import java.util.TreeMap;
23
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
16
5835
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
17 import org.dive4elements.river.client.client.Config;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
18 import org.dive4elements.river.client.client.FLYS;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
19 import org.dive4elements.river.client.client.FLYSConstants;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
20 import org.dive4elements.river.client.client.event.AdvanceHandler;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
21 import org.dive4elements.river.client.client.event.CollectionChangeEvent;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
22 import org.dive4elements.river.client.client.event.CollectionChangeHandler;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
23 import org.dive4elements.river.client.client.event.HasParameterChangeHandler;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
24 import org.dive4elements.river.client.client.event.HasStepBackHandlers;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
25 import org.dive4elements.river.client.client.event.HasStepForwardHandlers;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
26 import org.dive4elements.river.client.client.event.OutputModesChangeEvent;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
27 import org.dive4elements.river.client.client.event.OutputModesChangeHandler;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
28 import org.dive4elements.river.client.client.event.ParameterChangeEvent;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
29 import org.dive4elements.river.client.client.event.ParameterChangeHandler;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
30 import org.dive4elements.river.client.client.event.StepBackEvent;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
31 import org.dive4elements.river.client.client.event.StepBackHandler;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
32 import org.dive4elements.river.client.client.event.StepForwardEvent;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
33 import org.dive4elements.river.client.client.event.StepForwardHandler;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
34 import org.dive4elements.river.client.client.services.AdvanceService;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
35 import org.dive4elements.river.client.client.services.AdvanceServiceAsync;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
36 import org.dive4elements.river.client.client.services.ArtifactService;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
37 import org.dive4elements.river.client.client.services.ArtifactServiceAsync;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
38 import org.dive4elements.river.client.client.services.ReportService;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
39 import org.dive4elements.river.client.client.services.ReportServiceAsync;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
40 import org.dive4elements.river.client.client.services.StepForwardService;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
41 import org.dive4elements.river.client.client.services.StepForwardServiceAsync;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
42 import org.dive4elements.river.client.client.ui.stationinfo.GaugePanel;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
43 import org.dive4elements.river.client.client.ui.stationinfo.InfoPanel;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
44 import org.dive4elements.river.client.client.ui.stationinfo.MeasurementStationPanel;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
45 import org.dive4elements.river.client.shared.model.Artifact;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
46 import org.dive4elements.river.client.shared.model.ArtifactDescription;
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
47 import org.dive4elements.river.client.shared.model.BUNDUArtifact;
5835
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
48 import org.dive4elements.river.client.shared.model.Collection;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
49 import org.dive4elements.river.client.shared.model.Data;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
50 import org.dive4elements.river.client.shared.model.DataItem;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
51 import org.dive4elements.river.client.shared.model.DataList;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
52 import org.dive4elements.river.client.shared.model.DefaultData;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
53 import org.dive4elements.river.client.shared.model.DefaultDataItem;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
54 import org.dive4elements.river.client.shared.model.ExportMode;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
55 import org.dive4elements.river.client.shared.model.FixAnalysisArtifact;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
56 import org.dive4elements.river.client.shared.model.MINFOArtifact;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
57 import org.dive4elements.river.client.shared.model.OutputMode;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
58 import org.dive4elements.river.client.shared.model.ReportMode;
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
59 import org.dive4elements.river.client.shared.model.River;
8854
7bbfb24e6eec SINFO - first prototype of BArt Fließtiefen
gernotbelger
parents: 7982
diff changeset
60 import org.dive4elements.river.client.shared.model.SINFOArtifact;
8995
8c3e5682cb60 Introduced UNFO module
gernotbelger
parents: 8870
diff changeset
61 import org.dive4elements.river.client.shared.model.UINFOArtifact;
5835
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
62 import org.dive4elements.river.client.shared.model.WINFOArtifact;
4062
145980c21700 Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents: 3974
diff changeset
63
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
64 import com.google.gwt.core.client.GWT;
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
65 import com.google.gwt.user.client.rpc.AsyncCallback;
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
66 import com.smartgwt.client.types.Overflow;
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
67 import com.smartgwt.client.types.VerticalAlignment;
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
68 import com.smartgwt.client.types.VisibilityMode;
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
69 import com.smartgwt.client.util.SC;
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
70 import com.smartgwt.client.widgets.Canvas;
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
71 import com.smartgwt.client.widgets.layout.HLayout;
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
72 import com.smartgwt.client.widgets.layout.SectionStack;
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
73 import com.smartgwt.client.widgets.layout.SectionStackSection;
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
74 import com.smartgwt.client.widgets.layout.VLayout;
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
75 import com.smartgwt.client.widgets.tab.Tab;
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
76 import com.smartgwt.client.widgets.tab.events.TabSelectedHandler;
23
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
77
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
78 public class ParameterList extends Tab implements StepBackHandler, StepForwardHandler, ParameterChangeHandler, HasParameterChangeHandler, CollectionChangeHandler, OutputModesChangeHandler, AdvanceHandler {
4184
03de5c424f95 Fix warnings and minor TODOs in flys-client.
Christian Lins <christian.lins@intevation.de>
parents: 4062
diff changeset
79 private static final long serialVersionUID = 5204784727239299980L;
03de5c424f95 Fix warnings and minor TODOs in flys-client.
Christian Lins <christian.lins@intevation.de>
parents: 4062
diff changeset
80
789
e8be9a188e64 Layout improvements related to the height of components in the current parameterlist.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 788
diff changeset
81 public static final String STYLENAME_OLD_PARAMETERS = "oldParameters";
e8be9a188e64 Layout improvements related to the height of components in the current parameterlist.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 788
diff changeset
82
6579
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 6232
diff changeset
83 /** The message class that provides i18n strings. */
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.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 103
diff changeset
84 protected FLYSConstants MSG = GWT.create(FLYSConstants.class);
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
85
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
86 /** The ArtifactService used to communicate with the Artifact server. */
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
87 protected ArtifactServiceAsync artifactService = GWT.create(ArtifactService.class);
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
88
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
89 /** The StepForwardService used to put data into an existing artifact. */
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
90 protected StepForwardServiceAsync forwardService = GWT.create(StepForwardService.class);
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
91
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
92 /** The StepForwardService used to put data into an existing artifact. */
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
93 protected AdvanceServiceAsync advanceService = GWT.create(AdvanceService.class);
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
94
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
95 protected ReportServiceAsync reportService = GWT.create(ReportService.class);
604
84d3c5fde5bb First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 589
diff changeset
96
6579
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 6232
diff changeset
97 /** The list of ParameterizationChangeHandler. */
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
98 protected List<ParameterChangeHandler> parameterHandlers;
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
99
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
100 protected FLYS flys;
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
101
60
f793d35bfb08 Implemented a mechanism to step back to previous states.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 57
diff changeset
102 protected CollectionView cView;
23
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
103
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
104 protected Artifact artifact;
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
105
51
a2923d63f530 Introduced a data structure DataList to manage to list of Data objects of a single state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 50
diff changeset
106 protected List<DataList> old;
790
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
107 protected Map<String, Canvas> oldStorage;
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
108 protected DataList current;
23
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
109
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
110 protected UIProvider uiProvider;
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
111
256
5e1c1b7d6516 Added table and service for calculation output to UI.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 233
diff changeset
112 protected VLayout topLayout;
23
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
113 protected VLayout oldItems;
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
114 protected VLayout currentItems;
275
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 271
diff changeset
115 protected VLayout exportModes;
582
78907f0fb939 Added dummy report panel.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 572
diff changeset
116 protected VLayout report;
788
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
117 protected VLayout helperPanel;
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
118 protected VLayout tablePanel;
4270
cde9a6fe1844 Refactor ParameterList to use new InfoPanel base class
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4254
diff changeset
119 protected InfoPanel infoPanel;
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
120 protected Canvas reportPanel;
23
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
121
4254
33b15ac17fd1 Only create and add GaugePanel when necessary
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4229
diff changeset
122 private SectionStack stack;
33b15ac17fd1 Only create and add GaugePanel when necessary
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4229
diff changeset
123
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
124 public ParameterList(final FLYS flys, final CollectionView cView, final String title) {
90
f8c240f28c2a The title of the parameter tab will change after the module has been selectd.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 83
diff changeset
125 super(title);
f8c240f28c2a The title of the parameter tab will change after the module has been selectd.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 83
diff changeset
126
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
127 this.cView = cView;
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
128 this.flys = flys;
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
129
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
130 this.parameterHandlers = new ArrayList<ParameterChangeHandler>();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
131 this.old = new ArrayList<DataList>();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
132 this.oldStorage = new TreeMap<String, Canvas>();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
133 this.topLayout = new VLayout();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
134 this.oldItems = new VLayout();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
135 this.currentItems = new VLayout();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
136 this.exportModes = new VLayout();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
137 this.report = new VLayout();
23
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
138
224
a4a68b4ee2a3 Improved the CollectionView and the ParameterList - both can be initialized with an existing artifact (parameterization).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 215
diff changeset
139 addParameterChangeHandler(this);
a4a68b4ee2a3 Improved the CollectionView and the ParameterList - both can be initialized with an existing artifact (parameterization).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 215
diff changeset
140
23
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
141 init();
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
142 }
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
143
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
144 public ParameterList(final FLYS flys, final CollectionView cView, final String title, final Artifact artifact) {
224
a4a68b4ee2a3 Improved the CollectionView and the ParameterList - both can be initialized with an existing artifact (parameterization).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 215
diff changeset
145 super(title);
a4a68b4ee2a3 Improved the CollectionView and the ParameterList - both can be initialized with an existing artifact (parameterization).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 215
diff changeset
146
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
147 this.cView = cView;
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
148 this.flys = flys;
224
a4a68b4ee2a3 Improved the CollectionView and the ParameterList - both can be initialized with an existing artifact (parameterization).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 215
diff changeset
149 this.artifact = artifact;
a4a68b4ee2a3 Improved the CollectionView and the ParameterList - both can be initialized with an existing artifact (parameterization).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 215
diff changeset
150
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
151 this.parameterHandlers = new ArrayList<ParameterChangeHandler>();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
152 this.old = new ArrayList<DataList>();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
153 this.oldStorage = new TreeMap<String, Canvas>();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
154 this.topLayout = new VLayout();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
155 this.oldItems = new VLayout();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
156 this.currentItems = new VLayout();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
157 this.exportModes = new VLayout();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
158 this.report = new VLayout();
224
a4a68b4ee2a3 Improved the CollectionView and the ParameterList - both can be initialized with an existing artifact (parameterization).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 215
diff changeset
159
a4a68b4ee2a3 Improved the CollectionView and the ParameterList - both can be initialized with an existing artifact (parameterization).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 215
diff changeset
160 init();
a4a68b4ee2a3 Improved the CollectionView and the ParameterList - both can be initialized with an existing artifact (parameterization).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 215
diff changeset
161
a4a68b4ee2a3 Improved the CollectionView and the ParameterList - both can be initialized with an existing artifact (parameterization).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 215
diff changeset
162 addParameterChangeHandler(this);
a4a68b4ee2a3 Improved the CollectionView and the ParameterList - both can be initialized with an existing artifact (parameterization).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 215
diff changeset
163
790
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
164 setArtifact(artifact, false);
224
a4a68b4ee2a3 Improved the CollectionView and the ParameterList - both can be initialized with an existing artifact (parameterization).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 215
diff changeset
165 }
a4a68b4ee2a3 Improved the CollectionView and the ParameterList - both can be initialized with an existing artifact (parameterization).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 215
diff changeset
166
23
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
167 protected void init() {
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
168 final HLayout rootLayout = new HLayout();
90
f8c240f28c2a The title of the parameter tab will change after the module has been selectd.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 83
diff changeset
169 rootLayout.setMembersMargin(20);
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
170
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
171 final VLayout left = new VLayout();
53
3d5d7788d471 The widgets in the static part of the parameter panel are created using UIProviders now. The ParameterList does not build widgets any longer.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 51
diff changeset
172
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
173 if (this.old == null || this.old.size() == 0) {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
174 this.oldItems.setHeight(1);
83
4784ca718476 Improved the positioning of helper widgets and some layout specific stuff.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 73
diff changeset
175 }
4784ca718476 Improved the positioning of helper widgets and some layout specific stuff.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 73
diff changeset
176
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
177 this.oldItems.setMembersMargin(10);
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
178 this.oldItems.setStyleName(STYLENAME_OLD_PARAMETERS);
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
179 this.currentItems.setAlign(VerticalAlignment.TOP);
23
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
180
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
181 left.setMembersMargin(20);
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
182 left.setWidth(300);
50
827eb4e06ebf Added space between old params panel and new params panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 40
diff changeset
183
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
184 left.addMember(this.oldItems);
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
185 left.addMember(this.currentItems);
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
186 left.addMember(this.exportModes);
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
187 left.addMember(this.report);
582
78907f0fb939 Added dummy report panel.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 572
diff changeset
188
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
189 this.reportPanel = new Canvas();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
190 this.reportPanel.setHeight("*");
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
191 this.report.addMember(this.reportPanel);
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
192
90
f8c240f28c2a The title of the parameter tab will change after the module has been selectd.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 83
diff changeset
193 rootLayout.addMember(left);
788
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
194 rootLayout.addMember(createSectionStack());
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
195
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
196 this.topLayout.addMember(rootLayout);
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
197 if (this.artifact == null) {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
198 final Canvas moduleSelection = renderNew();
224
a4a68b4ee2a3 Improved the CollectionView and the ParameterList - both can be initialized with an existing artifact (parameterization).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 215
diff changeset
199 moduleSelection.setLayoutAlign(VerticalAlignment.TOP);
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
200 this.currentItems.addMember(moduleSelection);
224
a4a68b4ee2a3 Improved the CollectionView and the ParameterList - both can be initialized with an existing artifact (parameterization).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 215
diff changeset
201 }
90
f8c240f28c2a The title of the parameter tab will change after the module has been selectd.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 83
diff changeset
202
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
203 setPane(this.topLayout);
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
204 }
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
205
788
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
206 protected SectionStack createSectionStack() {
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
207 this.stack = new SectionStack();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
208 this.stack.setHeight100();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
209 this.stack.setCanResizeSections(true);
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
210 this.stack.setVisibilityMode(VisibilityMode.MULTIPLE);
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
211 this.stack.setOverflow(Overflow.SCROLL);
788
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
212
3346
f2039d030b5e Cosmetics, docs.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2500
diff changeset
213 // This canvas is used to render helper widgets.
788
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
214 final SectionStackSection helperSection = new SectionStackSection();
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
215 helperSection.setExpanded(false);
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
216 helperSection.setTitle(this.MSG.helperPanelTitle());
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
217 this.helperPanel = new VLayout() {
4062
145980c21700 Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents: 3974
diff changeset
218 @Override
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
219 public void addMember(final Canvas component) {
788
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
220 super.addMember(component);
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
221 ParameterList.this.stack.expandSection(helperSection.getID());
788
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
222 }
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
223
4062
145980c21700 Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents: 3974
diff changeset
224 @Override
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
225 public void removeMembers(final Canvas[] components) {
788
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
226 super.removeMembers(components);
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
227 helperSection.setExpanded(false);
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
228 }
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
229 };
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
230 this.helperPanel.setWidth100();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
231 this.helperPanel.setHeight100();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
232 helperSection.setItems(this.helperPanel);
788
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
233
3346
f2039d030b5e Cosmetics, docs.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2500
diff changeset
234 // This canvas is used to render calculation results.
788
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
235 final SectionStackSection tableSection = new SectionStackSection();
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
236 tableSection.setExpanded(false);
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
237 tableSection.setTitle(this.MSG.calcTableTitle());
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
238 this.tablePanel = new VLayout() {
4062
145980c21700 Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents: 3974
diff changeset
239 @Override
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
240 public void addMember(final Canvas component) {
788
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
241 super.addMember(component);
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
242 tableSection.setExpanded(true);
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
243 if (ParameterList.this.stack.getSection(InfoPanel.SECTION_ID) != null) {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
244 ParameterList.this.stack.getSection(InfoPanel.SECTION_ID).setExpanded(false);
7982
b1ff606f01ee Fixed some smartgwt 4.1 related issues.
Raimund Renkert <rrenkert@intevation.de>
parents: 7934
diff changeset
245 }
788
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
246 }
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
247
4062
145980c21700 Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents: 3974
diff changeset
248 @Override
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
249 public void removeMembers(final Canvas[] components) {
788
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
250 super.removeMembers(components);
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
251 tableSection.setExpanded(false);
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
252 }
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
253 };
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
254 this.tablePanel.setHeight100();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
255 this.tablePanel.setWidth100();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
256 tableSection.setItems(this.tablePanel);
788
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
257
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
258 this.stack.setSections(helperSection, tableSection);
788
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
259
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
260 return this.stack;
788
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
261 }
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
262
3346
f2039d030b5e Cosmetics, docs.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2500
diff changeset
263 /** Sets and forwards artifact. */
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
264 protected void setArtifact(final Artifact artifact) {
790
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
265 setArtifact(artifact, true);
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
266 }
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
267
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
268 protected void setArtifact(final Artifact artifact, final boolean forward) {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
269 final Artifact tmp = this.artifact;
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
270 this.artifact = artifact;
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
271
790
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
272 if (forward) {
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
273 fireParameterChangeEvent(tmp, this.artifact, ParameterChangeEvent.Type.FORWARD);
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
274 } else {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
275 fireParameterChangeEvent(tmp, this.artifact, ParameterChangeEvent.Type.BACK);
790
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
276 }
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
277 }
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
278
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
279 /**
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
280 * This method registers a new ParameterChangeHandler.
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
281 *
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
282 * @param handler
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
283 * The new ParameterChangeHandler.
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
284 */
4062
145980c21700 Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents: 3974
diff changeset
285 @Override
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
286 public void addParameterChangeHandler(final ParameterChangeHandler handler) {
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
287 if (handler != null) {
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
288 this.parameterHandlers.add(handler);
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
289 }
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
290 }
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
291
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
292 /**
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
293 * This method calls the <code>onParameterChange()</code> method of all
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
294 * registered ParameterChangeHandler.
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
295 */
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
296 protected void fireParameterChangeEvent(final Artifact old, final Artifact newArt, final ParameterChangeEvent.Type type) {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
297 final ParameterChangeEvent e = new ParameterChangeEvent(old, newArt, type);
790
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
298
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
299 for (final ParameterChangeHandler handler : this.parameterHandlers) {
790
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
300 handler.onParameterChange(e);
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
301 }
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
302 }
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
303
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
304 /**
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
305 * This method creates a Canvas displaying the plugins of FLYS combined with
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
306 * a widget to select a river.
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
307 *
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
308 * @return a Canvas that displays the supported plugins and rivers of FLYS.
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
309 */
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
310 protected Canvas renderNew() {
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
311 final River[] rivers = this.flys.getRivers();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
312 final DataItem[] items = new DataItem[rivers.length];
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
313
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
314 int i = 0;
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
315 for (final River river : rivers) {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
316 final String name = river.getName();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
317 final String mUuid = river.getModelUuid();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
318 items[i++] = new DefaultDataItem(name, null, mUuid);
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
319 }
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
320
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
321 final Data data = new DefaultData("river", this.MSG.river_selection(), null, items);
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
322
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
323 final LinkSelection widget = new LinkSelection();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
324 final HasStepForwardHandlers handler = widget;
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
325
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
326 widget.setContainer(this.helperPanel);
83
4784ca718476 Improved the positioning of helper widgets and some layout specific stuff.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 73
diff changeset
327
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
328 handler.addStepForwardHandler(new StepForwardHandler() {
4184
03de5c424f95 Fix warnings and minor TODOs in flys-client.
Christian Lins <christian.lins@intevation.de>
parents: 4062
diff changeset
329 private static final long serialVersionUID = -6210719844707004860L;
03de5c424f95 Fix warnings and minor TODOs in flys-client.
Christian Lins <christian.lins@intevation.de>
parents: 4062
diff changeset
330
4062
145980c21700 Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents: 3974
diff changeset
331 @Override
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
332 public void onStepForward(final StepForwardEvent event) {
3353
08f8524a81ad Lock the screen when the parameterization of a Collection's master Artifact changes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3346
diff changeset
333 lockUI();
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
334 final Data[] data = event.getData();
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
335
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
336 final DataItem[] moduleItems = data[0].getItems();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
337 final DataItem[] riversItems = data[1].getItems();
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
338
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
339 final String module = moduleItems[0].getStringValue();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
340 final String river = riversItems[0].getStringValue();
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
341
4184
03de5c424f95 Fix warnings and minor TODOs in flys-client.
Christian Lins <christian.lins@intevation.de>
parents: 4062
diff changeset
342 if (module == null || river == null) {
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
343 GWT.log("ParameterList.renderNew(): module == null " + "|| river == null");
3353
08f8524a81ad Lock the screen when the parameterization of a Collection's master Artifact changes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3346
diff changeset
344 unlockUI();
90
f8c240f28c2a The title of the parameter tab will change after the module has been selectd.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 83
diff changeset
345 return;
f8c240f28c2a The title of the parameter tab will change after the module has been selectd.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 83
diff changeset
346 }
8870
c26fb37899ca Introduced groups for modules. Modules marked with the same group-id, will be put together in the ui.
gernotbelger
parents: 8860
diff changeset
347 final String newTitle = moduleItems[0].getLabel();
102
33e24b33fc38 Improved the way how to i18n strings in our application.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 90
diff changeset
348 setTitle(newTitle);
90
f8c240f28c2a The title of the parameter tab will change after the module has been selectd.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 83
diff changeset
349
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
350 final Config config = Config.getInstance();
229
924da6695800 Each service is now called with the name of the current locale to set the request object's locale manually in the HttpClient.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 224
diff changeset
351 final String locale = config.getLocale();
924da6695800 Each service is now called with the name of the current locale to set the request object's locale manually in the HttpClient.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 224
diff changeset
352
3346
f2039d030b5e Cosmetics, docs.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 2500
diff changeset
353 final Data[] feedData = new Data[] { data[1] };
229
924da6695800 Each service is now called with the name of the current locale to set the request object's locale manually in the HttpClient.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 224
diff changeset
354
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
355 ParameterList.this.artifactService.create(locale, module.toLowerCase(), null, new AsyncCallback<Artifact>() {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
356 @Override
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
357 public void onFailure(final Throwable caught) {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
358 unlockUI();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
359 GWT.log("Could not create the new artifact.");
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
360 SC.warn(FLYS.getExceptionString(ParameterList.this.MSG, caught));
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
361 }
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
362
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
363 @Override
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
364 public void onSuccess(final Artifact artifact) {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
365 GWT.log("Successfully created a new artifact.");
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
366
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
367 ParameterList.this.forwardService.go(locale, artifact, feedData, new AsyncCallback<Artifact>() {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
368 @Override
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
369 public void onFailure(final Throwable caught) {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
370 unlockUI();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
371 GWT.log("Could not feed the artifact.");
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
372 SC.warn(caught.getMessage());
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
373 }
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
374
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
375 @Override
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
376 public void onSuccess(final Artifact artifact) {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
377 GWT.log("Successfully feed the artifact.");
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
378 ParameterList.this.old.clear();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
379 ParameterList.this.cView.addArtifactToCollection(artifact);
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
380 setArtifact(artifact);
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
381 unlockUI();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
382 }
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
383 });
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
384 }
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
385 });
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
386 }
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
387 });
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
388
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
389 final DataList list = new DataList();
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
390 list.add(data);
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
391
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
392 return widget.create(list);
23
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
393 }
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
394
38
7142386e86c2 Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 23
diff changeset
395 protected void clearOldData() {
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
396 this.old.clear();
38
7142386e86c2 Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 23
diff changeset
397 }
7142386e86c2 Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 23
diff changeset
398
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
399 public void addOldData(final DataList old) {
790
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
400 addOldData(old, true);
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
401 }
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
402
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
403 public void addOldData(final DataList old, final boolean redraw) {
23
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
404 if (old != null) {
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
405 this.old.add(old);
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
406 }
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
407
790
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
408 refreshOld(redraw);
23
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
409 }
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
410
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
411 public void addOldDatas(final DataList[] old) {
790
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
412 addOldDatas(old, true);
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
413 }
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
414
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
415 public void addOldDatas(final DataList[] old, final boolean redraw) {
23
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
416 if (old != null && old.length > 0) {
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
417 for (final DataList o : old) {
785
3ae0facd4cab Added a panel that lets users step to a next state without feeding the current artifact with new data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 604
diff changeset
418 if (o == null) {
3ae0facd4cab Added a panel that lets users step to a next state without feeding the current artifact with new data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 604
diff changeset
419 continue;
3ae0facd4cab Added a panel that lets users step to a next state without feeding the current artifact with new data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 604
diff changeset
420 }
3ae0facd4cab Added a panel that lets users step to a next state without feeding the current artifact with new data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 604
diff changeset
421
38
7142386e86c2 Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 23
diff changeset
422 if (!exists(o)) {
7142386e86c2 Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 23
diff changeset
423 GWT.log("Data '" + o.getLabel() + "' is new.");
790
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
424 addOldData(o, false);
38
7142386e86c2 Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 23
diff changeset
425 }
23
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
426 }
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
427
790
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
428 if (redraw) {
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
429 addOldData(null, true);
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
430 }
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
431
23
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
432 return;
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
433 }
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
434
790
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
435 addOldData(null, true);
23
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
436 }
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
437
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
438 public boolean exists(final DataList data) {
785
3ae0facd4cab Added a panel that lets users step to a next state without feeding the current artifact with new data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 604
diff changeset
439 if (data == null) {
3ae0facd4cab Added a panel that lets users step to a next state without feeding the current artifact with new data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 604
diff changeset
440 return false;
3ae0facd4cab Added a panel that lets users step to a next state without feeding the current artifact with new data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 604
diff changeset
441 }
3ae0facd4cab Added a panel that lets users step to a next state without feeding the current artifact with new data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 604
diff changeset
442
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
443 final String stateName = data.getState();
38
7142386e86c2 Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 23
diff changeset
444
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
445 for (final DataList o : this.old) {
51
a2923d63f530 Introduced a data structure DataList to manage to list of Data objects of a single state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 50
diff changeset
446 if (stateName.equals(o.getState())) {
38
7142386e86c2 Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 23
diff changeset
447 return true;
7142386e86c2 Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 23
diff changeset
448 }
7142386e86c2 Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 23
diff changeset
449 }
7142386e86c2 Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 23
diff changeset
450
7142386e86c2 Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 23
diff changeset
451 return false;
7142386e86c2 Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 23
diff changeset
452 }
7142386e86c2 Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 23
diff changeset
453
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
454 public void setCurrentData(final DataList current, final UIProvider uiProvider) {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
455 this.current = current;
23
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
456 this.uiProvider = uiProvider;
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
457
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
458 refreshCurrent();
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
459 }
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
460
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
461 public void refreshOld(final boolean redrawAll) {
790
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
462 if (redrawAll) {
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
463 refreshAllOld();
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
464 } else {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
465 final DataList dataList = this.old.get(this.old.size() - 1);
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
466 final String state = dataList.getState();
23
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
467
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
468 if (this.oldStorage.get(state) == null) {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
469 final String provider = dataList.getUIProvider();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
470 final UIProvider uiprovider = UIProviderFactory.getProvider(provider, this.flys.getCurrentUser());
790
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
471 ((HasStepBackHandlers) uiprovider).addStepBackHandler(this);
23
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
472
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
473 final Canvas c = uiprovider.createOld(dataList);
790
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
474 if (c != null) {
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
475 this.oldStorage.put(dataList.getState(), c);
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
476 this.oldItems.addMember(c);
790
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
477 }
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
478 }
23
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
479 }
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
480
790
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
481 updateOldHeight();
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
482 }
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
483
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
484 protected void refreshAllOld() {
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
485 final List<String> not = new ArrayList<String>();
790
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
486
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
487 for (final DataList data : this.old) {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
488 final String state = data.getState();
790
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
489
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
490 final Canvas c = this.oldStorage.get(state);
790
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
491
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
492 if (c != null) {
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
493 not.add(state);
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
494 }
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
495 }
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
496
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
497 final Map<String, Canvas> newOld = new TreeMap<String, Canvas>();
790
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
498
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
499 final Set<Map.Entry<String, Canvas>> entries = this.oldStorage.entrySet();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
500 for (final Map.Entry<String, Canvas> entry : entries) {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
501 final String state = entry.getKey();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
502 final Canvas value = entry.getValue();
790
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
503
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
504 if (not.indexOf(state) < 0) {
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
505 this.oldItems.removeMember(value);
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
506 } else {
790
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
507 newOld.put(state, value);
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
508 }
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
509 }
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
510
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
511 this.oldStorage = newOld;
790
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
512 }
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
513
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
514 protected void updateOldHeight() {
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
515 final int minHeight = this.oldItems.getMinHeight();
23
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
516 if (minHeight <= 20) {
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
517 this.oldItems.setHeight(20);
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
518 } else {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
519 this.oldItems.setHeight(minHeight);
23
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
520 }
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
521 }
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
522
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
523 /**
6579
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 6232
diff changeset
524 * Refreshes the part displaying the data of the current state.
23
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
525 * The UI is created using the UIProvider stored in the Data object.
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
526 */
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
527 public void refreshCurrent() {
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
528 this.currentItems.removeMembers(this.currentItems.getMembers());
53
3d5d7788d471 The widgets in the static part of the parameter panel are created using UIProviders now. The ParameterList does not build widgets any longer.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 51
diff changeset
529
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
530 if (this.current != null && this.uiProvider != null) {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
531 final Canvas c = this.uiProvider.create(this.current);
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
532 final Canvas h = this.uiProvider.createHelpLink(this.current, null, this.flys);
2500
69a498896c9c Create a link to an online help page and put it in front of the input panels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1493
diff changeset
533
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
534 final HLayout wrapper = new HLayout();
2500
69a498896c9c Create a link to an online help page and put it in front of the input panels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1493
diff changeset
535 wrapper.addMember(h);
69a498896c9c Create a link to an online help page and put it in front of the input panels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1493
diff changeset
536 wrapper.addMember(c);
69a498896c9c Create a link to an online help page and put it in front of the input panels.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1493
diff changeset
537
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
538 this.currentItems.addMember(wrapper);
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
539 } else if (this.uiProvider != null) {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
540 final Canvas c = this.uiProvider.create(null);
54
0db278371632 Remove the dynamic parameter panel if a state is reached that doesn't need any user input.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 53
diff changeset
541 c.setLayoutAlign(VerticalAlignment.TOP);
0db278371632 Remove the dynamic parameter panel if a state is reached that doesn't need any user input.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 53
diff changeset
542
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
543 this.currentItems.addMember(c);
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
544 } else {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
545 this.currentItems.setHeight(1);
275
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 271
diff changeset
546 }
789
e8be9a188e64 Layout improvements related to the height of components in the current parameterlist.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 788
diff changeset
547
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
548 final Canvas[] members = this.currentItems.getMembers();
789
e8be9a188e64 Layout improvements related to the height of components in the current parameterlist.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 788
diff changeset
549 if (members == null || members.length == 0) {
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
550 this.currentItems.setHeight(1);
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
551 } else {
789
e8be9a188e64 Layout improvements related to the height of components in the current parameterlist.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 788
diff changeset
552 int height = 0;
e8be9a188e64 Layout improvements related to the height of components in the current parameterlist.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 788
diff changeset
553
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
554 for (final Canvas member : members) {
789
e8be9a188e64 Layout improvements related to the height of components in the current parameterlist.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 788
diff changeset
555 height += member.getHeight();
e8be9a188e64 Layout improvements related to the height of components in the current parameterlist.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 788
diff changeset
556 }
e8be9a188e64 Layout improvements related to the height of components in the current parameterlist.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 788
diff changeset
557
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
558 this.currentItems.setHeight(height);
789
e8be9a188e64 Layout improvements related to the height of components in the current parameterlist.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 788
diff changeset
559 }
23
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
560 }
60
f793d35bfb08 Implemented a mechanism to step back to previous states.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 57
diff changeset
561
f793d35bfb08 Implemented a mechanism to step back to previous states.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 57
diff changeset
562 /**
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
563 * This method is called if the user clicks on the 'next' button to advance
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
564 * to the next state.
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
565 *
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
566 * @param event
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
567 * The StepForwardEvent.
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
568 */
4062
145980c21700 Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents: 3974
diff changeset
569 @Override
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
570 public void onStepForward(final StepForwardEvent event) {
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
571 GWT.log("CollectionView - onStepForward()");
3353
08f8524a81ad Lock the screen when the parameterization of a Collection's master Artifact changes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3346
diff changeset
572 lockUI();
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
573
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
574 final Config config = Config.getInstance();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
575 final String locale = config.getLocale();
229
924da6695800 Each service is now called with the name of the current locale to set the request object's locale manually in the HttpClient.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 224
diff changeset
576
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
577 this.forwardService.go(locale, this.artifact, event.getData(), new AsyncCallback<Artifact>() {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
578 @Override
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
579 public void onFailure(final Throwable caught) {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
580 unlockUI();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
581 GWT.log("Could not feed the artifact.");
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
582 SC.warn(FLYS.getExceptionString(ParameterList.this.MSG, caught));
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
583 }
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
584
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
585 @Override
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
586 public void onSuccess(final Artifact artifact) {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
587 GWT.log("Successfully feed the artifact.");
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
588 ParameterList.this.old.clear();
790
3fa8583434b2 Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 789
diff changeset
589
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
590 setArtifact(artifact, true);
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
591 unlockUI();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
592 }
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
593 });
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
594 }
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
595
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
596 /**
60
f793d35bfb08 Implemented a mechanism to step back to previous states.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 57
diff changeset
597 * This method is used to remove all old items from this list after the user
f793d35bfb08 Implemented a mechanism to step back to previous states.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 57
diff changeset
598 * has clicked the step back button.
f793d35bfb08 Implemented a mechanism to step back to previous states.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 57
diff changeset
599 *
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
600 * @param e
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
601 * The StepBackEvent that holds the identifier of the target state.
60
f793d35bfb08 Implemented a mechanism to step back to previous states.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 57
diff changeset
602 */
4062
145980c21700 Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents: 3974
diff changeset
603 @Override
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
604 public void onStepBack(final StepBackEvent e) {
3353
08f8524a81ad Lock the screen when the parameterization of a Collection's master Artifact changes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3346
diff changeset
605 lockUI();
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
606 final String target = e.getTarget();
229
924da6695800 Each service is now called with the name of the current locale to set the request object's locale manually in the HttpClient.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 224
diff changeset
607
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
608 final Config config = Config.getInstance();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
609 final String locale = config.getLocale();
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
610
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
611 this.advanceService.advance(locale, this.artifact, target, new AsyncCallback<Artifact>() {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
612 @Override
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
613 public void onFailure(final Throwable caught) {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
614 unlockUI();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
615 GWT.log("Could not go back to '" + target + "'");
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
616 SC.warn(FLYS.getExceptionString(ParameterList.this.MSG, caught));
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
617 }
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
618
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
619 @Override
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
620 public void onSuccess(final Artifact artifact) {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
621 GWT.log("Successfully step back to '" + target + "'");
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
622
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
623 ParameterList.this.old.clear();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
624
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
625 setArtifact(artifact, false);
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
626 unlockUI();
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
627 }
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
628 });
60
f793d35bfb08 Implemented a mechanism to step back to previous states.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 57
diff changeset
629 }
72
9b726350ab07 Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 60
diff changeset
630
4062
145980c21700 Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents: 3974
diff changeset
631 @Override
785
3ae0facd4cab Added a panel that lets users step to a next state without feeding the current artifact with new data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 604
diff changeset
632 public void onAdvance(final String target) {
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
633 final Config config = Config.getInstance();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
634 final String locale = config.getLocale();
785
3ae0facd4cab Added a panel that lets users step to a next state without feeding the current artifact with new data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 604
diff changeset
635
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
636 this.advanceService.advance(locale, this.artifact, target, new AsyncCallback<Artifact>() {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
637 @Override
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
638 public void onFailure(final Throwable caught) {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
639 GWT.log("Could not go to '" + target + "'");
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
640 SC.warn(FLYS.getExceptionString(ParameterList.this.MSG, caught));
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
641 }
785
3ae0facd4cab Added a panel that lets users step to a next state without feeding the current artifact with new data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 604
diff changeset
642
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
643 @Override
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
644 public void onSuccess(final Artifact artifact) {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
645 GWT.log("Successfully advanced to '" + target + "'");
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
646
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
647 ParameterList.this.old.clear();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
648
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
649 setArtifact(artifact, true);
785
3ae0facd4cab Added a panel that lets users step to a next state without feeding the current artifact with new data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 604
diff changeset
650 }
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
651 });
785
3ae0facd4cab Added a panel that lets users step to a next state without feeding the current artifact with new data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 604
diff changeset
652 }
3ae0facd4cab Added a panel that lets users step to a next state without feeding the current artifact with new data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 604
diff changeset
653
72
9b726350ab07 Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 60
diff changeset
654 /**
9b726350ab07 Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 60
diff changeset
655 * Implements the onCollectionChange() method to do update the GUI after the
9b726350ab07 Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 60
diff changeset
656 * parameterization has changed.
9b726350ab07 Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 60
diff changeset
657 *
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
658 * @param event
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
659 * The ParameterChangeEvent.
72
9b726350ab07 Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 60
diff changeset
660 */
4062
145980c21700 Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents: 3974
diff changeset
661 @Override
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
662 public void onParameterChange(final ParameterChangeEvent event) {
72
9b726350ab07 Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 60
diff changeset
663 GWT.log("ParameterList.onParameterChange");
9b726350ab07 Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 60
diff changeset
664
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
665 final Canvas[] c = this.helperPanel.getMembers();
788
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
666 if (c != null && c.length > 0) {
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
667 this.helperPanel.removeMembers(c);
83
4784ca718476 Improved the positioning of helper widgets and some layout specific stuff.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 73
diff changeset
668 }
4784ca718476 Improved the positioning of helper widgets and some layout specific stuff.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 73
diff changeset
669
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
670 final Artifact art = event.getNewValue();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
671 final ArtifactDescription desc = art.getArtifactDescription();
72
9b726350ab07 Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 60
diff changeset
672
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
673 final DataList currentData = desc.getCurrentData();
72
9b726350ab07 Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 60
diff changeset
674 if (currentData != null) {
9b726350ab07 Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 60
diff changeset
675 // the user has to enter some attributes
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
676 final String uiProvider = currentData.getUIProvider();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
677 final UIProvider provider = UIProviderFactory.getProvider(uiProvider, this.flys.getCurrentUser());
72
9b726350ab07 Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 60
diff changeset
678
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
679 provider.setContainer(this.helperPanel);
233
137daff2c732 Prepared UI elements for the location and distance input tables.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 229
diff changeset
680 provider.setArtifact(art);
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
681 provider.setCollection(this.cView.getCollection());
915
89a47098bcbd Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 909
diff changeset
682 provider.setParameterList(this);
83
4784ca718476 Improved the positioning of helper widgets and some layout specific stuff.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 73
diff changeset
683
73
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
684 ((HasStepForwardHandlers) provider).addStepForwardHandler(this);
39210a74db07 Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 72
diff changeset
685 ((HasStepBackHandlers) provider).addStepBackHandler(this);
72
9b726350ab07 Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 60
diff changeset
686
9b726350ab07 Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 60
diff changeset
687 setCurrentData(currentData, provider);
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
688 } else {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
689 final String[] reachable = desc.getReachableStates();
785
3ae0facd4cab Added a panel that lets users step to a next state without feeding the current artifact with new data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 604
diff changeset
690 if (reachable != null && reachable.length > 0) {
3ae0facd4cab Added a panel that lets users step to a next state without feeding the current artifact with new data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 604
diff changeset
691 // We have reached a final state with the option to step to
3ae0facd4cab Added a panel that lets users step to a next state without feeding the current artifact with new data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 604
diff changeset
692 // further to a next state. But in the current state, no user
3ae0facd4cab Added a panel that lets users step to a next state without feeding the current artifact with new data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 604
diff changeset
693 // data is required.
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
694 final UIProvider ui = UIProviderFactory.getProvider("continue", null);
785
3ae0facd4cab Added a panel that lets users step to a next state without feeding the current artifact with new data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 604
diff changeset
695 ui.setArtifact(art);
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
696 ui.setCollection(this.cView.getCollection());
915
89a47098bcbd Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 909
diff changeset
697 ui.setParameterList(this);
785
3ae0facd4cab Added a panel that lets users step to a next state without feeding the current artifact with new data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 604
diff changeset
698
3ae0facd4cab Added a panel that lets users step to a next state without feeding the current artifact with new data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 604
diff changeset
699 ((ContinuePanel) ui).addAdvanceHandler(this);
3ae0facd4cab Added a panel that lets users step to a next state without feeding the current artifact with new data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 604
diff changeset
700
3ae0facd4cab Added a panel that lets users step to a next state without feeding the current artifact with new data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 604
diff changeset
701 setCurrentData(null, ui);
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
702 } else {
785
3ae0facd4cab Added a panel that lets users step to a next state without feeding the current artifact with new data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 604
diff changeset
703 // we have reached a final state with no more user input
3ae0facd4cab Added a panel that lets users step to a next state without feeding the current artifact with new data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 604
diff changeset
704 setCurrentData(null, null);
3ae0facd4cab Added a panel that lets users step to a next state without feeding the current artifact with new data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 604
diff changeset
705 }
72
9b726350ab07 Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 60
diff changeset
706 }
8854
7bbfb24e6eec SINFO - first prototype of BArt Fließtiefen
gernotbelger
parents: 7982
diff changeset
707
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
708 // FIXME: we got a whole artifact framework to separate ui and backend stuff, but in the end.... we have switches over
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
709 // specific datatypes here...
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
710 if (art instanceof WINFOArtifact || art instanceof SINFOArtifact || art instanceof UINFOArtifact || art instanceof FixAnalysisArtifact
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
711 || art instanceof BUNDUArtifact) {
4270
cde9a6fe1844 Refactor ParameterList to use new InfoPanel base class
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4254
diff changeset
712 createGaugePanel();
cde9a6fe1844 Refactor ParameterList to use new InfoPanel base class
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4254
diff changeset
713 renderInfo(desc.getRiver(), desc.getOldData());
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
714 } else if (art instanceof MINFOArtifact) {
4271
6c776f102e03 Show measurement info panel if MINFO artifact is choosen
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4270
diff changeset
715 createMeasurementStationPanel();
6c776f102e03 Show measurement info panel if MINFO artifact is choosen
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4270
diff changeset
716 renderInfo(desc.getRiver(), desc.getOldData());
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
717 } else {
4270
cde9a6fe1844 Refactor ParameterList to use new InfoPanel base class
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4254
diff changeset
718 removeInfoPanel();
4254
33b15ac17fd1 Only create and add GaugePanel when necessary
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4229
diff changeset
719 }
72
9b726350ab07 Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 60
diff changeset
720
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
721 addOldDatas(desc.getOldData(), event.getType() == ParameterChangeEvent.Type.BACK);
72
9b726350ab07 Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 60
diff changeset
722 }
256
5e1c1b7d6516 Added table and service for calculation output to UI.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 233
diff changeset
723
4062
145980c21700 Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents: 3974
diff changeset
724 @Override
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
725 public void onCollectionChange(final CollectionChangeEvent event) {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
726 final Collection c = event.getNewValue();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
727 final Map<String, OutputMode> outs = c.getOutputModes();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
728 final Set<String> keys = outs.keySet();
275
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 271
diff changeset
729
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
730 final OutputMode[] outputs = new OutputMode[outs.size()];
513
e090fbd5a535 Added a mechanism to listen to changes relating to output modes of collections and artifacts. Solves a part of ISSUE-62.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 282
diff changeset
731
e090fbd5a535 Added a mechanism to listen to changes relating to output modes of collections and artifacts. Solves a part of ISSUE-62.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 282
diff changeset
732 int idx = 0;
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
733 for (final String outname : keys) {
513
e090fbd5a535 Added a mechanism to listen to changes relating to output modes of collections and artifacts. Solves a part of ISSUE-62.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 282
diff changeset
734 outputs[idx++] = outs.get(outname);
e090fbd5a535 Added a mechanism to listen to changes relating to output modes of collections and artifacts. Solves a part of ISSUE-62.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 282
diff changeset
735 }
e090fbd5a535 Added a mechanism to listen to changes relating to output modes of collections and artifacts. Solves a part of ISSUE-62.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 282
diff changeset
736
e090fbd5a535 Added a mechanism to listen to changes relating to output modes of collections and artifacts. Solves a part of ISSUE-62.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 282
diff changeset
737 updateExportModes(c, getExportModes(outputs));
589
942bd0e7e332 Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 582
diff changeset
738 updateReportModes(c, getReportModes(outputs));
513
e090fbd5a535 Added a mechanism to listen to changes relating to output modes of collections and artifacts. Solves a part of ISSUE-62.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 282
diff changeset
739 }
e090fbd5a535 Added a mechanism to listen to changes relating to output modes of collections and artifacts. Solves a part of ISSUE-62.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 282
diff changeset
740
4062
145980c21700 Handle error conditions more robust.
Christian Lins <christian.lins@intevation.de>
parents: 3974
diff changeset
741 @Override
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
742 public void onOutputModesChange(final OutputModesChangeEvent event) {
513
e090fbd5a535 Added a mechanism to listen to changes relating to output modes of collections and artifacts. Solves a part of ISSUE-62.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 282
diff changeset
743
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
744 final Collection c = this.cView.getCollection();
513
e090fbd5a535 Added a mechanism to listen to changes relating to output modes of collections and artifacts. Solves a part of ISSUE-62.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 282
diff changeset
745
e090fbd5a535 Added a mechanism to listen to changes relating to output modes of collections and artifacts. Solves a part of ISSUE-62.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 282
diff changeset
746 if (c != null) {
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
747 final OutputMode[] outs = event.getOutputModes();
589
942bd0e7e332 Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 582
diff changeset
748 updateExportModes(c, getExportModes(outs));
942bd0e7e332 Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 582
diff changeset
749 updateReportModes(c, getReportModes(outs));
513
e090fbd5a535 Added a mechanism to listen to changes relating to output modes of collections and artifacts. Solves a part of ISSUE-62.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 282
diff changeset
750 }
e090fbd5a535 Added a mechanism to listen to changes relating to output modes of collections and artifacts. Solves a part of ISSUE-62.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 282
diff changeset
751 }
e090fbd5a535 Added a mechanism to listen to changes relating to output modes of collections and artifacts. Solves a part of ISSUE-62.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 282
diff changeset
752
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
753 protected List<ReportMode> getReportModes(final OutputMode[] outs) {
513
e090fbd5a535 Added a mechanism to listen to changes relating to output modes of collections and artifacts. Solves a part of ISSUE-62.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 282
diff changeset
754
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
755 final List<ReportMode> reports = new ArrayList<ReportMode>();
589
942bd0e7e332 Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 582
diff changeset
756
942bd0e7e332 Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 582
diff changeset
757 if (outs == null || outs.length == 0) {
942bd0e7e332 Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 582
diff changeset
758 return reports;
942bd0e7e332 Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 582
diff changeset
759 }
942bd0e7e332 Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 582
diff changeset
760
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
761 for (final OutputMode out : outs) {
589
942bd0e7e332 Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 582
diff changeset
762 if (out instanceof ReportMode) {
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
763 reports.add((ReportMode) out);
589
942bd0e7e332 Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 582
diff changeset
764 }
942bd0e7e332 Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 582
diff changeset
765 }
942bd0e7e332 Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 582
diff changeset
766
942bd0e7e332 Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 582
diff changeset
767 return reports;
942bd0e7e332 Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 582
diff changeset
768 }
942bd0e7e332 Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 582
diff changeset
769
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
770 protected List<ExportMode> getExportModes(final OutputMode[] outs) {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
771 final List<ExportMode> exports = new ArrayList<ExportMode>();
275
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 271
diff changeset
772
513
e090fbd5a535 Added a mechanism to listen to changes relating to output modes of collections and artifacts. Solves a part of ISSUE-62.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 282
diff changeset
773 if (outs == null || outs.length == 0) {
e090fbd5a535 Added a mechanism to listen to changes relating to output modes of collections and artifacts. Solves a part of ISSUE-62.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 282
diff changeset
774 return exports;
e090fbd5a535 Added a mechanism to listen to changes relating to output modes of collections and artifacts. Solves a part of ISSUE-62.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 282
diff changeset
775 }
275
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 271
diff changeset
776
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
777 for (final OutputMode out : outs) {
275
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 271
diff changeset
778 if (out instanceof ExportMode) {
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 271
diff changeset
779 exports.add((ExportMode) out);
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 271
diff changeset
780 }
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 271
diff changeset
781 }
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 271
diff changeset
782
513
e090fbd5a535 Added a mechanism to listen to changes relating to output modes of collections and artifacts. Solves a part of ISSUE-62.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 282
diff changeset
783 return exports;
275
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 271
diff changeset
784 }
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 271
diff changeset
785
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
786 protected void updateExportModes(final Collection c, final List<ExportMode> exports) {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
787 final int num = exports != null ? exports.size() : 0;
275
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 271
diff changeset
788 GWT.log("Update export modes: " + num);
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 271
diff changeset
789
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
790 this.exportModes.removeMembers(this.exportModes.getMembers());
275
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 271
diff changeset
791
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 271
diff changeset
792 if (exports.size() > 0) {
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
793 this.exportModes.addMember(new ExportPanel(c, exports));
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
794 } else {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
795 this.exportModes.setHeight(1);
789
e8be9a188e64 Layout improvements related to the height of components in the current parameterlist.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 788
diff changeset
796 }
275
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 271
diff changeset
797 }
8264b02091ef ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 271
diff changeset
798
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
799 protected void updateReportModes(final Collection c, final List<ReportMode> reports) {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
800 final int num = reports != null ? reports.size() : 0;
589
942bd0e7e332 Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 582
diff changeset
801 GWT.log("Update report modes: " + num);
942bd0e7e332 Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 582
diff changeset
802
604
84d3c5fde5bb First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 589
diff changeset
803 if (num == 0) {
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
804 this.reportPanel.setContents("");
604
84d3c5fde5bb First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 589
diff changeset
805 return;
84d3c5fde5bb First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 589
diff changeset
806 }
84d3c5fde5bb First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 589
diff changeset
807
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
808 final Config config = Config.getInstance();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
809 final String locale = config.getLocale();
604
84d3c5fde5bb First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 589
diff changeset
810
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
811 final String cid = c.identifier();
604
84d3c5fde5bb First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 589
diff changeset
812
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
813 for (final ReportMode report : reports) {
589
942bd0e7e332 Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 582
diff changeset
814 GWT.log("report '" + report.toString() + "'");
604
84d3c5fde5bb First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 589
diff changeset
815
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
816 this.reportService.report(cid, locale, report.getName(), new AsyncCallback<String>() {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
817 @Override
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
818 public void onFailure(final Throwable caught) {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
819 SC.warn(FLYS.getExceptionString(ParameterList.this.MSG, caught));
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
820 }
604
84d3c5fde5bb First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 589
diff changeset
821
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
822 @Override
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
823 public void onSuccess(final String msg) {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
824 setReportMessage(msg);
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
825 }
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
826 });
589
942bd0e7e332 Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 582
diff changeset
827 }
604
84d3c5fde5bb First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 589
diff changeset
828 }
589
942bd0e7e332 Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 582
diff changeset
829
4617
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 4556
diff changeset
830 /** Sets content of reportPanel. */
604
84d3c5fde5bb First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 589
diff changeset
831 protected void setReportMessage(String msg) {
84d3c5fde5bb First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 589
diff changeset
832 GWT.log("returned from service: " + msg);
84d3c5fde5bb First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 589
diff changeset
833 if (msg == null) {
84d3c5fde5bb First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 589
diff changeset
834 msg = "";
84d3c5fde5bb First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 589
diff changeset
835 }
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
836 this.reportPanel.setContents(msg);
589
942bd0e7e332 Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 582
diff changeset
837 }
942bd0e7e332 Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 582
diff changeset
838
256
5e1c1b7d6516 Added table and service for calculation output to UI.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 233
diff changeset
839 /**
5e1c1b7d6516 Added table and service for calculation output to UI.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 233
diff changeset
840 * Adds a table to the parameterlist to show calculated data.
5e1c1b7d6516 Added table and service for calculation output to UI.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 233
diff changeset
841 *
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
842 * @param table
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
843 * The table data panel.
256
5e1c1b7d6516 Added table and service for calculation output to UI.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 233
diff changeset
844 */
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
845 public void setTable(final TableDataPanel table) {
788
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
846 removeTable();
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
847
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
848 final Canvas c = table.create();
788
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
849 c.setHeight100();
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
850 c.setWidth100();
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
851
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
852 this.tablePanel.addMember(c);
788
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
853 }
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
854
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
855 public boolean hasTable() {
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
856 final Canvas[] members = this.tablePanel.getMembers();
788
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
857
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
858 return members != null && members.length > 0;
260
dd1dad2ff94e Remove the data table on step back.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 256
diff changeset
859 }
dd1dad2ff94e Remove the data table on step back.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 256
diff changeset
860
dd1dad2ff94e Remove the data table on step back.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 256
diff changeset
861 /**
dd1dad2ff94e Remove the data table on step back.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 256
diff changeset
862 * Removes the table from the parameter list.
dd1dad2ff94e Remove the data table on step back.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 256
diff changeset
863 */
788
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
864 public void removeTable() {
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
865 final Canvas[] members = this.tablePanel.getMembers();
260
dd1dad2ff94e Remove the data table on step back.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 256
diff changeset
866
788
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
867 if (members != null && members.length > 0) {
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
868 this.tablePanel.removeMembers(members);
788
dfbc6693247e Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
869 }
256
5e1c1b7d6516 Added table and service for calculation output to UI.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 233
diff changeset
870 }
915
89a47098bcbd Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 909
diff changeset
871
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
872 public void registerCollectionViewTabHandler(final TabSelectedHandler tsh) {
4662
9220ab02f34f Codeformat++
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4617
diff changeset
873 this.cView.registerTabHandler(tsh);
915
89a47098bcbd Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 909
diff changeset
874 }
3353
08f8524a81ad Lock the screen when the parameterization of a Collection's master Artifact changes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3346
diff changeset
875
08f8524a81ad Lock the screen when the parameterization of a Collection's master Artifact changes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3346
diff changeset
876 protected void lockUI() {
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
877 this.cView.lockUI();
3353
08f8524a81ad Lock the screen when the parameterization of a Collection's master Artifact changes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3346
diff changeset
878 }
08f8524a81ad Lock the screen when the parameterization of a Collection's master Artifact changes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3346
diff changeset
879
08f8524a81ad Lock the screen when the parameterization of a Collection's master Artifact changes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3346
diff changeset
880 protected void unlockUI() {
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
881 this.cView.unlockUI();
3353
08f8524a81ad Lock the screen when the parameterization of a Collection's master Artifact changes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 3346
diff changeset
882 }
3715
8d3e48f189d2 Add first draft for the gauge overview info ui
Bjoern Ricks <bjoern.ricks@intevation.de>
parents: 3353
diff changeset
883
4254
33b15ac17fd1 Only create and add GaugePanel when necessary
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4229
diff changeset
884 private void createGaugePanel() {
33b15ac17fd1 Only create and add GaugePanel when necessary
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4229
diff changeset
885 GWT.log("ParameterList - createGaugePanel");
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
886 if (this.infoPanel == null) {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
887 this.infoPanel = new GaugePanel(this.flys);
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
888 this.infoPanel.setWidth100();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
889 this.infoPanel.setHeight100();
4254
33b15ac17fd1 Only create and add GaugePanel when necessary
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4229
diff changeset
890 }
33b15ac17fd1 Only create and add GaugePanel when necessary
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4229
diff changeset
891 }
33b15ac17fd1 Only create and add GaugePanel when necessary
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4229
diff changeset
892
4271
6c776f102e03 Show measurement info panel if MINFO artifact is choosen
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4270
diff changeset
893 private void createMeasurementStationPanel() {
6c776f102e03 Show measurement info panel if MINFO artifact is choosen
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4270
diff changeset
894 GWT.log("ParameterList - createMeasurementStationPanel");
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
895 if (this.infoPanel == null) {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
896 this.infoPanel = new MeasurementStationPanel(this.flys);
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
897 this.infoPanel.setWidth100();
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
898 this.infoPanel.setHeight100();
4271
6c776f102e03 Show measurement info panel if MINFO artifact is choosen
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4270
diff changeset
899 }
6c776f102e03 Show measurement info panel if MINFO artifact is choosen
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4270
diff changeset
900 }
6c776f102e03 Show measurement info panel if MINFO artifact is choosen
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4270
diff changeset
901
4270
cde9a6fe1844 Refactor ParameterList to use new InfoPanel base class
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4254
diff changeset
902 private void showInfoPanel() {
cde9a6fe1844 Refactor ParameterList to use new InfoPanel base class
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4254
diff changeset
903 GWT.log("ParameterList - showInfoPanel");
cde9a6fe1844 Refactor ParameterList to use new InfoPanel base class
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4254
diff changeset
904
cde9a6fe1844 Refactor ParameterList to use new InfoPanel base class
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4254
diff changeset
905 /* Don't add InfoPanel twice */
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
906 SectionStackSection info = this.stack.getSection(InfoPanel.SECTION_ID);
7934
71a2e408adca Moved info stack section to top level widget (parameterlist).
Raimund Renkert <rrenkert@intevation.de>
parents: 7762
diff changeset
907 if (info == null) {
71a2e408adca Moved info stack section to top level widget (parameterlist).
Raimund Renkert <rrenkert@intevation.de>
parents: 7762
diff changeset
908 info = new SectionStackSection();
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
909 info.setTitle(this.infoPanel.getSectionTitle());
7934
71a2e408adca Moved info stack section to top level widget (parameterlist).
Raimund Renkert <rrenkert@intevation.de>
parents: 7762
diff changeset
910 info.setID(InfoPanel.SECTION_ID);
71a2e408adca Moved info stack section to top level widget (parameterlist).
Raimund Renkert <rrenkert@intevation.de>
parents: 7762
diff changeset
911 info.setName(InfoPanel.SECTION_ID);
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
912 info.setItems(this.infoPanel);
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
913 this.stack.addSection(info, 0);
4270
cde9a6fe1844 Refactor ParameterList to use new InfoPanel base class
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4254
diff changeset
914 }
cde9a6fe1844 Refactor ParameterList to use new InfoPanel base class
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4254
diff changeset
915
7934
71a2e408adca Moved info stack section to top level widget (parameterlist).
Raimund Renkert <rrenkert@intevation.de>
parents: 7762
diff changeset
916 info.setExpanded(true);
4254
33b15ac17fd1 Only create and add GaugePanel when necessary
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4229
diff changeset
917 }
33b15ac17fd1 Only create and add GaugePanel when necessary
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4229
diff changeset
918
4270
cde9a6fe1844 Refactor ParameterList to use new InfoPanel base class
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4254
diff changeset
919 private void hideInfoPanel() {
cde9a6fe1844 Refactor ParameterList to use new InfoPanel base class
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4254
diff changeset
920 GWT.log("ParameterList - hideInfoPanel");
4254
33b15ac17fd1 Only create and add GaugePanel when necessary
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4229
diff changeset
921
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
922 if (this.infoPanel != null) {
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
923 this.infoPanel.hide();
4254
33b15ac17fd1 Only create and add GaugePanel when necessary
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4229
diff changeset
924 }
33b15ac17fd1 Only create and add GaugePanel when necessary
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4229
diff changeset
925 }
33b15ac17fd1 Only create and add GaugePanel when necessary
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4229
diff changeset
926
4270
cde9a6fe1844 Refactor ParameterList to use new InfoPanel base class
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4254
diff changeset
927 private void removeInfoPanel() {
cde9a6fe1844 Refactor ParameterList to use new InfoPanel base class
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4254
diff changeset
928 GWT.log("ParameterList - removeInfoPanel");
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
929 final SectionStackSection exists = this.stack.getSection(InfoPanel.SECTION_ID);
4292
250c4a0fa696 Remove InfoPanel stack only if it exists
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4271
diff changeset
930 if (exists != null) {
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
931 this.stack.removeSection(InfoPanel.SECTION_ID);
4292
250c4a0fa696 Remove InfoPanel stack only if it exists
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4271
diff changeset
932 }
4254
33b15ac17fd1 Only create and add GaugePanel when necessary
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4229
diff changeset
933 }
33b15ac17fd1 Only create and add GaugePanel when necessary
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4229
diff changeset
934
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
935 private void renderInfo(final String river, final DataList[] data) {
4270
cde9a6fe1844 Refactor ParameterList to use new InfoPanel base class
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4254
diff changeset
936 GWT.log("ParameterList - renderInfo");
cde9a6fe1844 Refactor ParameterList to use new InfoPanel base class
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4254
diff changeset
937
cde9a6fe1844 Refactor ParameterList to use new InfoPanel base class
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4254
diff changeset
938 if (river != null) {
cde9a6fe1844 Refactor ParameterList to use new InfoPanel base class
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4254
diff changeset
939 showInfoPanel();
9071
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
940 this.infoPanel.setRiver(river);
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
941 this.infoPanel.setData(data);
a561b882436d create module bundu (Betrieb & Unterhaltung)
gernotbelger
parents: 8995
diff changeset
942 } else {
4270
cde9a6fe1844 Refactor ParameterList to use new InfoPanel base class
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4254
diff changeset
943 GWT.log("ParameterList - renderInfo no river");
cde9a6fe1844 Refactor ParameterList to use new InfoPanel base class
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4254
diff changeset
944 hideInfoPanel();
cde9a6fe1844 Refactor ParameterList to use new InfoPanel base class
Björn Ricks <bjoern.ricks@intevation.de>
parents: 4254
diff changeset
945 }
3715
8d3e48f189d2 Add first draft for the gauge overview info ui
Bjoern Ricks <bjoern.ricks@intevation.de>
parents: 3353
diff changeset
946 }
23
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
947 }
dc086030e6a3 The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
948 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org