Mercurial > dive4elements > river
annotate flys-client/src/main/java/de/intevation/flys/client/client/ui/ParameterList.java @ 785:3ae0facd4cab
Added a panel that lets users step to a next state without feeding the current artifact with new data.
flys-client/trunk@2282 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 05 Jul 2011 16:12:34 +0000 |
parents | 84d3c5fde5bb |
children | dfbc6693247e |
rev | line source |
---|---|
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
|
1 package de.intevation.flys.client.client.ui; |
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
|
2 |
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
|
3 import java.util.ArrayList; |
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
|
4 import java.util.List; |
275
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
5 import java.util.Map; |
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
6 import java.util.Set; |
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
|
7 |
38
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
8 import com.google.gwt.core.client.GWT; |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
9 import com.google.gwt.user.client.rpc.AsyncCallback; |
38
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
10 |
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
|
11 import com.smartgwt.client.types.VerticalAlignment; |
215
e02f50a3ad59
Improved the exception handling of artifact / collection specific operations. Warning dialog are displayed after such an exception.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
211
diff
changeset
|
12 import com.smartgwt.client.util.SC; |
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
|
13 import com.smartgwt.client.widgets.Canvas; |
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
|
14 import com.smartgwt.client.widgets.layout.HLayout; |
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
|
15 import com.smartgwt.client.widgets.layout.VLayout; |
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
|
16 import com.smartgwt.client.widgets.tab.Tab; |
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
|
17 |
72
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
18 import de.intevation.flys.client.shared.model.Artifact; |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
19 import de.intevation.flys.client.shared.model.ArtifactDescription; |
275
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
20 import de.intevation.flys.client.shared.model.Collection; |
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
|
21 import de.intevation.flys.client.shared.model.Data; |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
22 import de.intevation.flys.client.shared.model.DataItem; |
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
|
23 import de.intevation.flys.client.shared.model.DataList; |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
24 import de.intevation.flys.client.shared.model.DefaultData; |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
25 import de.intevation.flys.client.shared.model.DefaultDataItem; |
589
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
26 import de.intevation.flys.client.shared.model.ReportMode; |
275
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
27 import de.intevation.flys.client.shared.model.ExportMode; |
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
28 import de.intevation.flys.client.shared.model.OutputMode; |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
29 import de.intevation.flys.client.shared.model.River; |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
30 import de.intevation.flys.client.client.Config; |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
31 import de.intevation.flys.client.client.FLYS; |
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
|
32 import de.intevation.flys.client.client.FLYSConstants; |
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
|
33 import de.intevation.flys.client.client.event.AdvanceHandler; |
275
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
34 import de.intevation.flys.client.client.event.CollectionChangeEvent; |
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
35 import de.intevation.flys.client.client.event.CollectionChangeHandler; |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
36 import de.intevation.flys.client.client.event.HasParameterChangeHandler; |
60
f793d35bfb08
Implemented a mechanism to step back to previous states.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
57
diff
changeset
|
37 import de.intevation.flys.client.client.event.HasStepBackHandlers; |
72
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
38 import de.intevation.flys.client.client.event.HasStepForwardHandlers; |
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
|
39 import de.intevation.flys.client.client.event.OutputModesChangeEvent; |
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
|
40 import de.intevation.flys.client.client.event.OutputModesChangeHandler; |
72
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
41 import de.intevation.flys.client.client.event.ParameterChangeEvent; |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
42 import de.intevation.flys.client.client.event.ParameterChangeHandler; |
60
f793d35bfb08
Implemented a mechanism to step back to previous states.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
57
diff
changeset
|
43 import de.intevation.flys.client.client.event.StepBackEvent; |
f793d35bfb08
Implemented a mechanism to step back to previous states.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
57
diff
changeset
|
44 import de.intevation.flys.client.client.event.StepBackHandler; |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
45 import de.intevation.flys.client.client.event.StepForwardEvent; |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
46 import de.intevation.flys.client.client.event.StepForwardHandler; |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
47 import de.intevation.flys.client.client.services.AdvanceService; |
604
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
48 import de.intevation.flys.client.client.services.ReportService; |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
49 import de.intevation.flys.client.client.services.AdvanceServiceAsync; |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
50 import de.intevation.flys.client.client.services.ArtifactService; |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
51 import de.intevation.flys.client.client.services.ArtifactServiceAsync; |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
52 import de.intevation.flys.client.client.services.StepForwardService; |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
53 import de.intevation.flys.client.client.services.StepForwardServiceAsync; |
604
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
54 import de.intevation.flys.client.client.services.ReportServiceAsync; |
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
|
55 |
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
|
56 |
60
f793d35bfb08
Implemented a mechanism to step back to previous states.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
57
diff
changeset
|
57 public class ParameterList |
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
|
58 extends Tab |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
59 implements StepBackHandler, StepForwardHandler, ParameterChangeHandler, |
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
|
60 HasParameterChangeHandler, CollectionChangeHandler, |
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
|
61 OutputModesChangeHandler, AdvanceHandler |
60
f793d35bfb08
Implemented a mechanism to step back to previous states.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
57
diff
changeset
|
62 { |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
63 /** 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
|
64 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
|
65 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
66 /** The ArtifactService used to communicate with the Artifact server. */ |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
67 protected ArtifactServiceAsync artifactService = |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
68 GWT.create(ArtifactService.class); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
69 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
70 /** The StepForwardService used to put data into an existing artifact. */ |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
71 protected StepForwardServiceAsync forwardService = |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
72 GWT.create(StepForwardService.class); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
73 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
74 /** The StepForwardService used to put data into an existing artifact. */ |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
75 protected AdvanceServiceAsync advanceService = |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
76 GWT.create(AdvanceService.class); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
77 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
78 |
604
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
79 protected ReportServiceAsync reportService = |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
80 GWT.create(ReportService.class); |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
81 |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
82 |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
83 /** The list of ParameterizationChangeHandler.*/ |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
84 protected List<ParameterChangeHandler> parameterHandlers; |
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 protected FLYS flys; |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
87 |
60
f793d35bfb08
Implemented a mechanism to step back to previous states.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
57
diff
changeset
|
88 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
|
89 |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
90 protected Artifact artifact; |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
91 |
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
|
92 protected List<DataList> old; |
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
|
93 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
|
94 |
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
|
95 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
|
96 |
256
5e1c1b7d6516
Added table and service for calculation output to UI.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
233
diff
changeset
|
97 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
|
98 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
|
99 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
|
100 protected VLayout exportModes; |
582
78907f0fb939
Added dummy report panel.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
572
diff
changeset
|
101 protected VLayout report; |
83
4784ca718476
Improved the positioning of helper widgets and some layout specific stuff.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
102 protected Canvas helperPanel; |
260
dd1dad2ff94e
Remove the data table on step back.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
256
diff
changeset
|
103 protected Canvas tablePanel; |
582
78907f0fb939
Added dummy report panel.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
572
diff
changeset
|
104 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
|
105 |
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
|
106 public ParameterList(FLYS flys, CollectionView cView, String 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
|
107 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
|
108 |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
109 this.cView = cView; |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
110 this.flys = flys; |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
111 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
112 parameterHandlers = new ArrayList<ParameterChangeHandler>(); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
113 old = new ArrayList<DataList>(); |
256
5e1c1b7d6516
Added table and service for calculation output to UI.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
233
diff
changeset
|
114 topLayout = new VLayout(); |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
115 oldItems = new VLayout(); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
116 currentItems = new VLayout(); |
275
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
117 exportModes = new VLayout(); |
582
78907f0fb939
Added dummy report panel.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
572
diff
changeset
|
118 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
|
119 |
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
|
120 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
|
121 |
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
|
122 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
|
123 } |
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
|
124 |
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
|
125 |
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
|
126 public ParameterList( |
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
|
127 FLYS flys, |
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
|
128 CollectionView cView, |
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
|
129 String 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
|
130 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
|
131 { |
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
|
132 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
|
133 |
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
|
134 this.cView = cView; |
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
|
135 this.flys = flys; |
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
|
136 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
|
137 |
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
|
138 parameterHandlers = new ArrayList<ParameterChangeHandler>(); |
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 old = new ArrayList<DataList>(); |
256
5e1c1b7d6516
Added table and service for calculation output to UI.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
233
diff
changeset
|
140 topLayout = 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
|
141 oldItems = new VLayout(); |
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
|
142 currentItems = new VLayout(); |
275
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
143 exportModes = new VLayout(); |
582
78907f0fb939
Added dummy report panel.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
572
diff
changeset
|
144 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
|
145 |
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 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
|
147 |
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
|
148 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
|
149 |
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 setArtifact(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
|
151 } |
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
|
152 |
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
|
153 |
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
|
154 protected void init() { |
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
|
155 HLayout rootLayout = new HLayout(); |
260
dd1dad2ff94e
Remove the data table on step back.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
256
diff
changeset
|
156 tablePanel = new Canvas(); |
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
|
157 rootLayout.setMembersMargin(20); |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
158 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
159 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
|
160 |
83
4784ca718476
Improved the positioning of helper widgets and some layout specific stuff.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
161 if (old == null || old.size() == 0) { |
572
830e4720caad
Avoid GWT throwing warnings if no 'old' items exist for the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
513
diff
changeset
|
162 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
|
163 } |
4784ca718476
Improved the positioning of helper widgets and some layout specific stuff.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
164 |
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
|
165 oldItems.setMembersMargin(10); |
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
|
166 currentItems.setAlign(VerticalAlignment.TOP); |
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 |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
168 left.setMembersMargin(20); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
169 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
|
170 |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
171 left.addMember(oldItems); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
172 left.addMember(currentItems); |
275
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
173 left.addMember(exportModes); |
582
78907f0fb939
Added dummy report panel.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
572
diff
changeset
|
174 left.addMember(report); |
78907f0fb939
Added dummy report panel.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
572
diff
changeset
|
175 |
78907f0fb939
Added dummy report panel.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
572
diff
changeset
|
176 reportPanel = new Canvas(); |
78907f0fb939
Added dummy report panel.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
572
diff
changeset
|
177 reportPanel.setHeight("*"); |
78907f0fb939
Added dummy report panel.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
572
diff
changeset
|
178 report.addMember(reportPanel); |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
179 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
180 // This canvas is used to render helper widgets |
83
4784ca718476
Improved the positioning of helper widgets and some layout specific stuff.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
181 helperPanel = new Canvas(); |
269
eb3c16df59db
ISSUE-41 Moved the panel that shows the computation results right beside the parameterization - NOTE: issue is still open.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
260
diff
changeset
|
182 helperPanel.setWidth("*"); |
eb3c16df59db
ISSUE-41 Moved the panel that shows the computation results right beside the parameterization - NOTE: issue is still open.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
260
diff
changeset
|
183 helperPanel.setHeight100(); |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
184 |
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
|
185 rootLayout.addMember(left); |
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
|
186 rootLayout.addMember(helperPanel); |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
187 |
256
5e1c1b7d6516
Added table and service for calculation output to UI.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
233
diff
changeset
|
188 topLayout.addMember(rootLayout); |
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
|
189 if (artifact == null) { |
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
|
190 Canvas moduleSelection = renderNew(); |
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
|
191 moduleSelection.setLayoutAlign(VerticalAlignment.TOP); |
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
|
192 currentItems.addMember(moduleSelection); |
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
|
193 } |
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
|
194 |
256
5e1c1b7d6516
Added table and service for calculation output to UI.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
233
diff
changeset
|
195 setPane(topLayout); |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
196 } |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
197 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
198 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
199 protected void setArtifact(Artifact artifact) { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
200 Artifact tmp = this.artifact; |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
201 this.artifact = artifact; |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
202 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
203 fireParameterChangeEvent(tmp, this.artifact); |
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 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
206 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
207 /** |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
208 * 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
|
209 * |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
210 * @param handler The new ParameterChangeHandler. |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
211 */ |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
212 public void addParameterChangeHandler(ParameterChangeHandler handler) { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
213 if (handler != null) { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
214 parameterHandlers.add(handler); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
215 } |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
216 } |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
217 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
218 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
219 /** |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
220 * 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
|
221 * registered ParameterChangeHandler. |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
222 */ |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
223 protected void fireParameterChangeEvent(Artifact old, Artifact newArt) { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
224 for (ParameterChangeHandler handler: parameterHandlers) { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
225 handler.onParameterChange(new ParameterChangeEvent(old, newArt)); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
226 } |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
227 } |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
228 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
229 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
230 /** |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
231 * 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
|
232 * 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
|
233 * |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
234 * @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
|
235 */ |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
236 protected Canvas renderNew() { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
237 River[] rivers = flys.getRivers(); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
238 DataItem[] items = new DataItem[rivers.length]; |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
239 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
240 int i = 0; |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
241 for (River river: rivers) { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
242 String name = river.getName(); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
243 items[i++] = new DefaultDataItem(name, null, name); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
244 } |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
245 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
246 Data data = new DefaultData( |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
247 "river", |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
248 MSG.river_selection(), |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
249 null, |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
250 items); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
251 |
282
e92f7ef455d6
Show rivers as links instead of a combobox.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
275
diff
changeset
|
252 LinkSelection widget = new LinkSelection(); |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
253 HasStepForwardHandlers handler = (HasStepForwardHandlers) widget; |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
254 |
83
4784ca718476
Improved the positioning of helper widgets and some layout specific stuff.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
255 widget.setContainer(helperPanel); |
4784ca718476
Improved the positioning of helper widgets and some layout specific stuff.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
256 |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
257 handler.addStepForwardHandler(new StepForwardHandler() { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
258 public void onStepForward(StepForwardEvent event) { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
259 Data[] data = event.getData(); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
260 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
261 DataItem[] moduleItems = data[0].getItems(); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
262 DataItem[] riversItems = data[1].getItems(); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
263 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
264 String module = moduleItems[0].getStringValue(); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
265 String river = riversItems[0].getStringValue(); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
266 |
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
|
267 if (module == null) { |
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
|
268 // TODO throw / show error! |
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
|
269 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
|
270 } |
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
|
271 |
102
33e24b33fc38
Improved the way how to i18n strings in our application.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
90
diff
changeset
|
272 String newTitle = MSG.getString(module); |
33e24b33fc38
Improved the way how to i18n strings in our application.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
90
diff
changeset
|
273 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
|
274 |
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
|
275 Config config = Config.getInstance(); |
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
|
276 final String url = config.getServerUrl(); |
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
|
277 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
|
278 |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
279 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
|
280 |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
281 artifactService.create( |
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
|
282 url, locale, module.toLowerCase(), |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
283 new AsyncCallback<Artifact>() { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
284 public void onFailure(Throwable caught) { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
285 GWT.log("Could not create the new artifact."); |
215
e02f50a3ad59
Improved the exception handling of artifact / collection specific operations. Warning dialog are displayed after such an exception.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
211
diff
changeset
|
286 SC.warn(MSG.getString(caught.getMessage())); |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
287 } |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
288 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
289 public void onSuccess(Artifact artifact) { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
290 GWT.log("Successfully created a new artifact."); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
291 |
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
|
292 forwardService.go(url, locale, artifact, feedData, |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
293 new AsyncCallback<Artifact>() { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
294 public void onFailure(Throwable caught) { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
295 GWT.log("Could not feed the artifact."); |
215
e02f50a3ad59
Improved the exception handling of artifact / collection specific operations. Warning dialog are displayed after such an exception.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
211
diff
changeset
|
296 SC.warn(caught.getMessage()); |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
297 } |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
298 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
299 public void onSuccess(Artifact artifact) { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
300 GWT.log("Successfully feed the artifact."); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
301 setArtifact(artifact); |
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 }); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
306 } |
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 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
309 DataList list = new DataList(); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
310 list.add(data); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
311 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
312 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
|
313 } |
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
|
314 |
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
|
315 |
38
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
316 protected void clearOldData() { |
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
317 old.clear(); |
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
318 } |
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
319 |
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
320 |
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
|
321 public void addOldData(DataList old) { |
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
|
322 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
|
323 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
|
324 } |
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
|
325 |
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
|
326 refreshOld(); |
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
|
327 } |
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
|
328 |
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
|
329 |
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
|
330 public void addOldDatas(DataList[] old) { |
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
|
331 if (old != null && old.length > 0) { |
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
|
332 for (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
|
333 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
|
334 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
|
335 } |
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
|
336 |
38
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
337 if (!exists(o)) { |
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
338 GWT.log("Data '" + o.getLabel() + "' is new."); |
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
339 addOldData(o); |
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
340 } |
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
|
341 } |
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
|
342 |
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
|
343 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
|
344 } |
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
|
345 |
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
|
346 addOldData(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
|
347 } |
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
|
348 |
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
|
349 |
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
|
350 public boolean exists(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
|
351 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
|
352 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
|
353 } |
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
|
354 |
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
|
355 String stateName = data.getState(); |
38
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
356 |
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
|
357 for (DataList o: old) { |
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
|
358 if (stateName.equals(o.getState())) { |
38
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
359 return true; |
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
360 } |
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
361 } |
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
362 |
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
363 return false; |
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
364 } |
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
365 |
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
366 |
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
|
367 public void setCurrentData(DataList current, UIProvider uiProvider) { |
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
|
368 this.current = current; |
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
|
369 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
|
370 |
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
|
371 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
|
372 } |
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
|
373 |
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
|
374 |
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
|
375 public void refreshOld() { |
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
|
376 // XXX maybe we should not remove all items but just add the newest item |
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
|
377 // to the list. |
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
|
378 oldItems.removeMembers(oldItems.getMembers()); |
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
|
379 |
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
|
380 for (DataList dataList: old) { |
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
|
381 HLayout h = new HLayout(); |
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
|
382 h.setAlign(VerticalAlignment.TOP); |
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
|
383 h.setHeight(20); |
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
|
384 |
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
|
385 String provider = dataList.getUIProvider(); |
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
|
386 UIProvider uiprovider = UIProviderFactory.getProvider(provider); |
60
f793d35bfb08
Implemented a mechanism to step back to previous states.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
57
diff
changeset
|
387 ((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
|
388 |
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
|
389 oldItems.addMember(uiprovider.createOld(dataList)); |
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
|
390 } |
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
|
391 |
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
|
392 int minHeight = oldItems.getMinHeight(); |
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 if (minHeight <= 20) { |
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 oldItems.setHeight(20); |
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
|
395 } |
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
|
396 else { |
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
|
397 oldItems.setHeight(minHeight); |
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
|
398 } |
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
|
399 } |
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
|
400 |
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
|
401 |
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
|
402 /** |
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
|
403 * This method refreshes the part displaying the data of the current state. |
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 * 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
|
405 */ |
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 public void refreshCurrent() { |
40
1458bc0a20e2
Clear the panel that displays the current input widget before adding a new item to this panel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
38
diff
changeset
|
407 currentItems.removeMembers(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
|
408 |
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
|
409 if (current != null && uiProvider != null) { |
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
|
410 Canvas c = uiProvider.create(current); |
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
|
411 currentItems.addMember(c); |
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
|
412 } |
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
|
413 else if (uiProvider != 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
|
414 Canvas c = 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
|
415 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
|
416 |
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
|
417 currentItems.addMember(c); |
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
|
418 } |
275
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
419 else { |
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
420 currentItems.setHeight(1); |
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
421 } |
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
|
422 } |
60
f793d35bfb08
Implemented a mechanism to step back to previous states.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
57
diff
changeset
|
423 |
f793d35bfb08
Implemented a mechanism to step back to previous states.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
57
diff
changeset
|
424 |
f793d35bfb08
Implemented a mechanism to step back to previous states.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
57
diff
changeset
|
425 /** |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
426 * 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
|
427 * to the next state. |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
428 * |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
429 * @param event The StepForwardEvent. |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
430 */ |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
431 public void onStepForward(StepForwardEvent event) { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
432 GWT.log("CollectionView - onStepForward()"); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
433 |
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
|
434 Config config = Config.getInstance(); |
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
|
435 String serverUrl = config.getServerUrl(); |
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
|
436 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
|
437 |
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
|
438 forwardService.go(serverUrl, locale, artifact, event.getData(), |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
439 new AsyncCallback<Artifact>() { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
440 public void onFailure(Throwable caught) { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
441 GWT.log("Could not feed the artifact."); |
215
e02f50a3ad59
Improved the exception handling of artifact / collection specific operations. Warning dialog are displayed after such an exception.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
211
diff
changeset
|
442 SC.warn(MSG.getString(caught.getMessage())); |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
443 } |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
444 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
445 public void onSuccess(Artifact artifact) { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
446 GWT.log("Successfully feed the artifact."); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
447 setArtifact(artifact); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
448 } |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
449 }); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
450 } |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
451 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
452 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
453 /** |
60
f793d35bfb08
Implemented a mechanism to step back to previous states.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
57
diff
changeset
|
454 * 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
|
455 * 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
|
456 * |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
457 * @param e 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
|
458 */ |
f793d35bfb08
Implemented a mechanism to step back to previous states.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
57
diff
changeset
|
459 public void onStepBack(StepBackEvent e) { |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
460 final String target = e.getTarget(); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
461 |
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
|
462 Config config = Config.getInstance(); |
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
|
463 final String serverUrl = config.getServerUrl(); |
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
|
464 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
|
465 |
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
|
466 advanceService.advance(serverUrl, locale, artifact, target, |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
467 new AsyncCallback<Artifact>() { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
468 public void onFailure(Throwable caught) { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
469 GWT.log("Could not go back to '" + target + "'"); |
215
e02f50a3ad59
Improved the exception handling of artifact / collection specific operations. Warning dialog are displayed after such an exception.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
211
diff
changeset
|
470 SC.warn(MSG.getString(caught.getMessage())); |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
471 } |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
472 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
473 public void onSuccess(Artifact artifact) { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
474 GWT.log("Successfully step back to '" + target + "'"); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
475 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
476 old.clear(); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
477 oldItems.removeMembers(oldItems.getMembers()); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
478 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
479 setArtifact(artifact); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
480 } |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
481 } |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
482 ); |
60
f793d35bfb08
Implemented a mechanism to step back to previous states.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
57
diff
changeset
|
483 } |
72
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
484 |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
485 |
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
|
486 public void onAdvance(final String target) { |
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
|
487 Config config = Config.getInstance(); |
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
|
488 final String serverUrl = config.getServerUrl(); |
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
|
489 final String locale = config.getLocale(); |
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
|
490 |
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
|
491 advanceService.advance(serverUrl, locale, artifact, target, |
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
|
492 new AsyncCallback<Artifact>() { |
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
|
493 public void onFailure(Throwable caught) { |
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
|
494 GWT.log("Could not go to '" + target + "'"); |
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
|
495 SC.warn(MSG.getString(caught.getMessage())); |
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
|
496 } |
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
|
497 |
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
|
498 public void onSuccess(Artifact artifact) { |
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
|
499 GWT.log("Successfully advanced to '" + target + "'"); |
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
|
500 |
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
|
501 old.clear(); |
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
|
502 oldItems.removeMembers(oldItems.getMembers()); |
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
|
503 |
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
|
504 setArtifact(artifact); |
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
|
505 } |
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
|
506 } |
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
|
507 ); |
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
|
508 } |
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
|
509 |
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
|
510 |
72
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
511 /** |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
512 * 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
|
513 * parameterization has changed. |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
514 * |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
515 * @param event The ParameterChangeEvent. |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
516 */ |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
517 public void onParameterChange(ParameterChangeEvent event) { |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
518 GWT.log("ParameterList.onParameterChange"); |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
519 |
83
4784ca718476
Improved the positioning of helper widgets and some layout specific stuff.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
520 for (Canvas c: helperPanel.getChildren()) { |
4784ca718476
Improved the positioning of helper widgets and some layout specific stuff.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
521 helperPanel.removeChild(c); |
4784ca718476
Improved the positioning of helper widgets and some layout specific stuff.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
522 } |
4784ca718476
Improved the positioning of helper widgets and some layout specific stuff.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
523 |
72
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
524 Artifact art = event.getNewValue(); |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
525 ArtifactDescription desc = art.getArtifactDescription(); |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
526 |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
527 DataList currentData = desc.getCurrentData(); |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
528 if (currentData != null) { |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
529 // the user has to enter some attributes |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
530 String uiProvider = currentData.getUIProvider(); |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
531 UIProvider provider = UIProviderFactory.getProvider(uiProvider); |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
532 |
83
4784ca718476
Improved the positioning of helper widgets and some layout specific stuff.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
533 provider.setContainer(helperPanel); |
233
137daff2c732
Prepared UI elements for the location and distance input tables.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
229
diff
changeset
|
534 provider.setArtifact(art); |
83
4784ca718476
Improved the positioning of helper widgets and some layout specific stuff.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
535 |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
536 ((HasStepForwardHandlers) provider).addStepForwardHandler(this); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
537 ((HasStepBackHandlers) provider).addStepBackHandler(this); |
72
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
538 |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
539 setCurrentData(currentData, provider); |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
540 } |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
541 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
|
542 String[] reachable = desc.getReachableStates(); |
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
|
543 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
|
544 // 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
|
545 // 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
|
546 // data is required. |
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
|
547 UIProvider ui = UIProviderFactory.getProvider("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
|
548 ui.setArtifact(art); |
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
|
549 |
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
|
550 ((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
|
551 |
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
|
552 setCurrentData(null, ui); |
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
|
553 } |
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
|
554 else { |
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
|
555 // 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
|
556 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
|
557 } |
72
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
558 } |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
559 |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
560 addOldDatas(desc.getOldData()); |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
561 } |
256
5e1c1b7d6516
Added table and service for calculation output to UI.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
233
diff
changeset
|
562 |
275
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
563 |
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
564 public void onCollectionChange(CollectionChangeEvent 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
|
565 Collection c = event.getNewValue(); |
275
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
566 Map<String, OutputMode> outs = c.getOutputModes(); |
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
567 Set<String> keys = outs.keySet(); |
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
568 |
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
|
569 OutputMode[] outputs = new OutputMode[outs.size()]; |
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
|
570 |
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
|
571 int idx = 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
|
572 for (String outname: keys) { |
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
|
573 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
|
574 } |
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
|
575 |
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
|
576 updateExportModes(c, getExportModes(outputs)); |
589
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
577 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
|
578 } |
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
|
579 |
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
|
580 |
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
|
581 public void onOutputModesChange(OutputModesChangeEvent event) { |
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
|
582 |
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
|
583 Collection c = cView.getCollection(); |
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
|
584 |
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
|
585 if (c != null) { |
589
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
586 OutputMode [] outs = event.getOutputModes(); |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
587 updateExportModes(c, getExportModes(outs)); |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
588 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
|
589 } |
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
|
590 } |
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
|
591 |
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
|
592 |
589
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
593 protected List<ReportMode> getReportModes(OutputMode [] outs) { |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
594 |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
595 List<ReportMode> reports = new ArrayList<ReportMode>(); |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
596 |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
597 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
|
598 return reports; |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
599 } |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
600 |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
601 for (OutputMode out: outs) { |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
602 if (out instanceof ReportMode) { |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
603 reports.add((ReportMode)out); |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
604 } |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
605 } |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
606 |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
607 return reports; |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
608 } |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
609 |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
610 |
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
|
611 protected List<ExportMode> getExportModes(OutputMode[] outs) { |
275
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
612 List<ExportMode> exports = new ArrayList<ExportMode>(); |
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
613 |
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
|
614 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
|
615 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
|
616 } |
275
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
617 |
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
|
618 for (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
|
619 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
|
620 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
|
621 } |
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
622 } |
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
623 |
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
|
624 return exports; |
275
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
625 } |
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
626 |
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
627 |
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
628 protected void updateExportModes(Collection c, List<ExportMode> exports) { |
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
629 int num = exports != null ? exports.size() : 0; |
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
630 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
|
631 |
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
632 exportModes.removeMembers(exportModes.getMembers()); |
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
633 |
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
634 if (exports.size() > 0) { |
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
635 exportModes.addMember(new ExportPanel(c, exports)); |
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
636 } |
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
637 } |
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
638 |
589
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
639 protected void updateReportModes(Collection c, List<ReportMode> reports) { |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
640 int num = reports != null ? reports.size() : 0; |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
641 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
|
642 |
604
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
643 if (num == 0) { |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
644 reportPanel.setContents(""); |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
645 return; |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
646 } |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
647 |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
648 Config config = Config.getInstance(); |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
649 String url = config.getServerUrl(); |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
650 String locale = config.getLocale(); |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
651 |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
652 String cid = c.identifier(); |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
653 |
589
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
654 for (ReportMode report: reports) { |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
655 GWT.log("report '" + report.toString() + "'"); |
604
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
656 |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
657 reportService.report(cid, url, locale, report.getName(), |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
658 new AsyncCallback<String>() { |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
659 public void onFailure(Throwable caught) { |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
660 SC.warn(caught.getMessage()); |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
661 } |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
662 |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
663 public void onSuccess(String msg) { |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
664 setReportMessage(msg); |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
665 } |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
666 }); |
589
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
667 } |
604
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
668 } |
589
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
669 |
604
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
670 protected void setReportMessage(String msg) { |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
671 GWT.log("returned from service: " + msg); |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
672 if (msg == null) { |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
673 msg = ""; |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
674 } |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
675 reportPanel.setContents(msg); |
589
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
676 } |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
677 |
275
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
678 |
256
5e1c1b7d6516
Added table and service for calculation output to UI.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
233
diff
changeset
|
679 /** |
5e1c1b7d6516
Added table and service for calculation output to UI.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
233
diff
changeset
|
680 * 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
|
681 * |
5e1c1b7d6516
Added table and service for calculation output to UI.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
233
diff
changeset
|
682 * @param table The table data panel. |
5e1c1b7d6516
Added table and service for calculation output to UI.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
233
diff
changeset
|
683 */ |
5e1c1b7d6516
Added table and service for calculation output to UI.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
233
diff
changeset
|
684 public void setPanel (TableDataPanel table) { |
260
dd1dad2ff94e
Remove the data table on step back.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
256
diff
changeset
|
685 tablePanel = table.create(); |
271
65735765643d
Set the computation result panel width and height to 100%.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
269
diff
changeset
|
686 tablePanel.setHeight100(); |
65735765643d
Set the computation result panel width and height to 100%.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
269
diff
changeset
|
687 tablePanel.setWidth100(); |
269
eb3c16df59db
ISSUE-41 Moved the panel that shows the computation results right beside the parameterization - NOTE: issue is still open.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
260
diff
changeset
|
688 helperPanel.addChild(tablePanel); |
260
dd1dad2ff94e
Remove the data table on step back.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
256
diff
changeset
|
689 } |
dd1dad2ff94e
Remove the data table on step back.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
256
diff
changeset
|
690 |
dd1dad2ff94e
Remove the data table on step back.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
256
diff
changeset
|
691 |
dd1dad2ff94e
Remove the data table on step back.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
256
diff
changeset
|
692 /** |
dd1dad2ff94e
Remove the data table on step back.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
256
diff
changeset
|
693 * 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
|
694 */ |
dd1dad2ff94e
Remove the data table on step back.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
256
diff
changeset
|
695 public void removePanel() { |
dd1dad2ff94e
Remove the data table on step back.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
256
diff
changeset
|
696 topLayout.removeMember(tablePanel); |
dd1dad2ff94e
Remove the data table on step back.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
256
diff
changeset
|
697 } |
dd1dad2ff94e
Remove the data table on step back.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
256
diff
changeset
|
698 |
dd1dad2ff94e
Remove the data table on step back.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
256
diff
changeset
|
699 |
dd1dad2ff94e
Remove the data table on step back.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
256
diff
changeset
|
700 public boolean hasPanel() { |
dd1dad2ff94e
Remove the data table on step back.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
256
diff
changeset
|
701 return topLayout.hasMember(tablePanel); |
256
5e1c1b7d6516
Added table and service for calculation output to UI.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
233
diff
changeset
|
702 } |
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
|
703 } |
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
|
704 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |