Mercurial > dive4elements > river
annotate flys-client/src/main/java/de/intevation/flys/client/client/ui/ParameterList.java @ 1343:0d3d3860beb5
Added a ImgLink class which creates an html link with an image.
flys-client/trunk@2997 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 17 Oct 2011 17:28:24 +0000 |
parents | 89a47098bcbd |
children | 4b177fd52f06 |
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; |
790
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
7 import java.util.TreeMap; |
23
dc086030e6a3
The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
8 |
38
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
9 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
|
10 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
|
11 |
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
|
12 import com.smartgwt.client.types.VerticalAlignment; |
788
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
13 import com.smartgwt.client.types.VisibilityMode; |
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
|
14 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
|
15 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
|
16 import com.smartgwt.client.widgets.layout.HLayout; |
788
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
17 import com.smartgwt.client.widgets.layout.SectionStack; |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
18 import com.smartgwt.client.widgets.layout.SectionStackSection; |
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
|
19 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
|
20 import com.smartgwt.client.widgets.tab.Tab; |
915
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
909
diff
changeset
|
21 import com.smartgwt.client.widgets.tab.events.TabSelectedHandler; |
23
dc086030e6a3
The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
22 |
72
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
23 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
|
24 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
|
25 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
|
26 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
|
27 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
|
28 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
|
29 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
|
30 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
|
31 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
|
32 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
|
33 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
|
34 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
|
35 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
|
36 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
|
37 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
|
38 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
|
39 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
|
40 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
|
41 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
|
42 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
|
43 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
|
44 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
|
45 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
|
46 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
|
47 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
|
48 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
|
49 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
|
50 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
|
51 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
|
52 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
|
53 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
|
54 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
|
55 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
|
56 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
|
57 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
|
58 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
|
59 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
|
60 |
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
|
61 |
60
f793d35bfb08
Implemented a mechanism to step back to previous states.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
57
diff
changeset
|
62 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
|
63 extends Tab |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
64 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
|
65 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
|
66 OutputModesChangeHandler, AdvanceHandler |
60
f793d35bfb08
Implemented a mechanism to step back to previous states.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
57
diff
changeset
|
67 { |
789
e8be9a188e64
Layout improvements related to the height of components in the current parameterlist.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
788
diff
changeset
|
68 public static final String STYLENAME_OLD_PARAMETERS = "oldParameters"; |
e8be9a188e64
Layout improvements related to the height of components in the current parameterlist.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
788
diff
changeset
|
69 |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
70 /** 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
|
71 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
|
72 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
73 /** 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
|
74 protected ArtifactServiceAsync artifactService = |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
75 GWT.create(ArtifactService.class); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
76 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
77 /** 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
|
78 protected StepForwardServiceAsync forwardService = |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
79 GWT.create(StepForwardService.class); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
80 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
81 /** 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
|
82 protected AdvanceServiceAsync advanceService = |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
83 GWT.create(AdvanceService.class); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
84 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
85 |
604
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
86 protected ReportServiceAsync reportService = |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
87 GWT.create(ReportService.class); |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
88 |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
89 |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
90 /** The list of ParameterizationChangeHandler.*/ |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
91 protected List<ParameterChangeHandler> parameterHandlers; |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
92 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
93 protected FLYS flys; |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
94 |
60
f793d35bfb08
Implemented a mechanism to step back to previous states.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
57
diff
changeset
|
95 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
|
96 |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
97 protected Artifact artifact; |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
98 |
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
|
99 protected List<DataList> old; |
790
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
100 protected Map<String, Canvas> oldStorage; |
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
|
101 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
|
102 |
dc086030e6a3
The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
103 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
|
104 |
256
5e1c1b7d6516
Added table and service for calculation output to UI.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
233
diff
changeset
|
105 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
|
106 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
|
107 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
|
108 protected VLayout exportModes; |
582
78907f0fb939
Added dummy report panel.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
572
diff
changeset
|
109 protected VLayout report; |
788
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
110 protected VLayout helperPanel; |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
111 protected VLayout tablePanel; |
582
78907f0fb939
Added dummy report panel.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
572
diff
changeset
|
112 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
|
113 |
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
|
114 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
|
115 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
|
116 |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
117 this.cView = cView; |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
118 this.flys = flys; |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
119 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
120 parameterHandlers = new ArrayList<ParameterChangeHandler>(); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
121 old = new ArrayList<DataList>(); |
790
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
122 oldStorage = new TreeMap<String, Canvas>(); |
256
5e1c1b7d6516
Added table and service for calculation output to UI.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
233
diff
changeset
|
123 topLayout = new VLayout(); |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
124 oldItems = new VLayout(); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
125 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
|
126 exportModes = new VLayout(); |
582
78907f0fb939
Added dummy report panel.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
572
diff
changeset
|
127 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
|
128 |
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
|
129 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
|
130 |
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
|
131 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
|
132 } |
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
|
133 |
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
|
134 |
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
|
135 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
|
136 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
|
137 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
|
138 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
|
139 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
|
140 { |
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 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
|
142 |
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
|
143 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
|
144 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
|
145 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
|
146 |
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 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
|
148 old = new ArrayList<DataList>(); |
790
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
149 oldStorage = new TreeMap<String, Canvas>(); |
256
5e1c1b7d6516
Added table and service for calculation output to UI.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
233
diff
changeset
|
150 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
|
151 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
|
152 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
|
153 exportModes = new VLayout(); |
582
78907f0fb939
Added dummy report panel.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
572
diff
changeset
|
154 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
|
155 |
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
|
156 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
|
157 |
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
|
158 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
|
159 |
790
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
160 setArtifact(artifact, false); |
224
a4a68b4ee2a3
Improved the CollectionView and the ParameterList - both can be initialized with an existing artifact (parameterization).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
215
diff
changeset
|
161 } |
a4a68b4ee2a3
Improved the CollectionView and the ParameterList - both can be initialized with an existing artifact (parameterization).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
215
diff
changeset
|
162 |
a4a68b4ee2a3
Improved the CollectionView and the ParameterList - both can be initialized with an existing artifact (parameterization).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
215
diff
changeset
|
163 |
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
|
164 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
|
165 HLayout rootLayout = new HLayout(); |
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
|
166 rootLayout.setMembersMargin(20); |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
167 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
168 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
|
169 |
83
4784ca718476
Improved the positioning of helper widgets and some layout specific stuff.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
170 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
|
171 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
|
172 } |
4784ca718476
Improved the positioning of helper widgets and some layout specific stuff.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
173 |
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
|
174 oldItems.setMembersMargin(10); |
789
e8be9a188e64
Layout improvements related to the height of components in the current parameterlist.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
788
diff
changeset
|
175 oldItems.setStyleName(STYLENAME_OLD_PARAMETERS); |
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
|
176 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
|
177 |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
178 left.setMembersMargin(20); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
179 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
|
180 |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
181 left.addMember(oldItems); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
182 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
|
183 left.addMember(exportModes); |
582
78907f0fb939
Added dummy report panel.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
572
diff
changeset
|
184 left.addMember(report); |
78907f0fb939
Added dummy report panel.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
572
diff
changeset
|
185 |
78907f0fb939
Added dummy report panel.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
572
diff
changeset
|
186 reportPanel = new Canvas(); |
78907f0fb939
Added dummy report panel.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
572
diff
changeset
|
187 reportPanel.setHeight("*"); |
78907f0fb939
Added dummy report panel.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
572
diff
changeset
|
188 report.addMember(reportPanel); |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
189 |
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
|
190 rootLayout.addMember(left); |
788
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
191 rootLayout.addMember(createSectionStack()); |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
192 |
256
5e1c1b7d6516
Added table and service for calculation output to UI.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
233
diff
changeset
|
193 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
|
194 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
|
195 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
|
196 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
|
197 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
|
198 } |
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
|
199 |
256
5e1c1b7d6516
Added table and service for calculation output to UI.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
233
diff
changeset
|
200 setPane(topLayout); |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
201 } |
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 |
788
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
204 protected SectionStack createSectionStack() { |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
205 SectionStack stack = new SectionStack(); |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
206 stack.setHeight100(); |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
207 stack.setCanResizeSections(true); |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
208 stack.setVisibilityMode(VisibilityMode.MULTIPLE); |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
209 |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
210 // This canvas is used to render helper widgets |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
211 final SectionStackSection helperSection = new SectionStackSection(); |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
212 helperSection.setExpanded(false); |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
213 helperSection.setTitle(MSG.helperPanelTitle()); |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
214 helperPanel = new VLayout() { |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
215 public void addMember(Canvas component) { |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
216 super.addMember(component); |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
217 helperSection.setExpanded(true); |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
218 } |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
219 |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
220 public void removeMembers(Canvas[] components) { |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
221 super.removeMembers(components); |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
222 helperSection.setExpanded(false); |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
223 } |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
224 }; |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
225 helperPanel.setWidth100(); |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
226 helperPanel.setHeight100(); |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
227 helperSection.setItems(helperPanel); |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
228 |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
229 // This canvas is used to render calculation results |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
230 final SectionStackSection tableSection = new SectionStackSection(); |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
231 tableSection.setExpanded(false); |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
232 tableSection.setTitle(MSG.calcTableTitle()); |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
233 tablePanel = new VLayout() { |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
234 public void addMember(Canvas component) { |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
235 super.addMember(component); |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
236 tableSection.setExpanded(true); |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
237 } |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
238 |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
239 public void removeMembers(Canvas[] components) { |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
240 super.removeMembers(components); |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
241 tableSection.setExpanded(false); |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
242 } |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
243 }; |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
244 tablePanel.setHeight100(); |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
245 tablePanel.setWidth100(); |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
246 tableSection.setItems(tablePanel); |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
247 |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
248 stack.setSections(helperSection, tableSection); |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
249 |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
250 return stack; |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
251 } |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
252 |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
253 |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
254 protected void setArtifact(Artifact artifact) { |
790
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
255 setArtifact(artifact, true); |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
256 } |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
257 |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
258 |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
259 protected void setArtifact(Artifact artifact, boolean forward) { |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
260 Artifact tmp = this.artifact; |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
261 this.artifact = artifact; |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
262 |
790
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
263 if (forward) { |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
264 fireParameterChangeEvent( |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
265 tmp, this.artifact, ParameterChangeEvent.Type.FORWARD); |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
266 } |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
267 else { |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
268 fireParameterChangeEvent( |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
269 tmp, this.artifact, ParameterChangeEvent.Type.BACK); |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
270 } |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
271 } |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
272 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
273 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
274 /** |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
275 * 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
|
276 * |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
277 * @param handler The new ParameterChangeHandler. |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
278 */ |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
279 public void addParameterChangeHandler(ParameterChangeHandler handler) { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
280 if (handler != null) { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
281 parameterHandlers.add(handler); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
282 } |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
283 } |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
284 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
285 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
286 /** |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
287 * 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
|
288 * registered ParameterChangeHandler. |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
289 */ |
790
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
290 protected void fireParameterChangeEvent( |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
291 Artifact old, |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
292 Artifact newArt, |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
293 ParameterChangeEvent.Type type) |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
294 { |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
295 ParameterChangeEvent e = new ParameterChangeEvent(old, newArt, type); |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
296 |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
297 for (ParameterChangeHandler handler: parameterHandlers) { |
790
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
298 handler.onParameterChange(e); |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
299 } |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
300 } |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
301 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
302 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
303 /** |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
304 * 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
|
305 * 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
|
306 * |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
307 * @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
|
308 */ |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
309 protected Canvas renderNew() { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
310 River[] rivers = flys.getRivers(); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
311 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
|
312 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
313 int i = 0; |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
314 for (River river: rivers) { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
315 String name = river.getName(); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
316 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
|
317 } |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
318 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
319 Data data = new DefaultData( |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
320 "river", |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
321 MSG.river_selection(), |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
322 null, |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
323 items); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
324 |
282
e92f7ef455d6
Show rivers as links instead of a combobox.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
275
diff
changeset
|
325 LinkSelection widget = new LinkSelection(); |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
326 HasStepForwardHandlers handler = (HasStepForwardHandlers) widget; |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
327 |
83
4784ca718476
Improved the positioning of helper widgets and some layout specific stuff.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
328 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
|
329 |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
330 handler.addStepForwardHandler(new StepForwardHandler() { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
331 public void onStepForward(StepForwardEvent event) { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
332 Data[] data = event.getData(); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
333 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
334 DataItem[] moduleItems = data[0].getItems(); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
335 DataItem[] riversItems = data[1].getItems(); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
336 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
337 String module = moduleItems[0].getStringValue(); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
338 String river = riversItems[0].getStringValue(); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
339 |
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
|
340 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
|
341 // 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
|
342 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
|
343 } |
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
|
344 |
102
33e24b33fc38
Improved the way how to i18n strings in our application.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
90
diff
changeset
|
345 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
|
346 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
|
347 |
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
|
348 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
|
349 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
|
350 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
|
351 |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
352 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
|
353 |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
354 artifactService.create( |
845
4db672cdacb2
Added outs/facet filters when creation new artifacts.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
807
diff
changeset
|
355 url, locale, module.toLowerCase(), null, |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
356 new AsyncCallback<Artifact>() { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
357 public void onFailure(Throwable caught) { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
358 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
|
359 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
|
360 } |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
361 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
362 public void onSuccess(Artifact artifact) { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
363 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
|
364 |
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
|
365 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
|
366 new AsyncCallback<Artifact>() { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
367 public void onFailure(Throwable caught) { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
368 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
|
369 SC.warn(caught.getMessage()); |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
370 } |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
371 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
372 public void onSuccess(Artifact artifact) { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
373 GWT.log("Successfully feed the artifact."); |
790
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
374 old.clear(); |
909
794d1af42987
Clone Artifacts and add them to the current Collection in the WspDatacagePanel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
867
diff
changeset
|
375 cView.addArtifactToCollection(artifact); |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
376 setArtifact(artifact); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
377 } |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
378 }); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
379 } |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
380 }); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
381 } |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
382 }); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
383 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
384 DataList list = new DataList(); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
385 list.add(data); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
386 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
387 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
|
388 } |
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
|
389 |
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 |
38
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
391 protected void clearOldData() { |
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
392 old.clear(); |
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
393 } |
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
394 |
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
395 |
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
|
396 public void addOldData(DataList old) { |
790
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
397 addOldData(old, true); |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
398 } |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
399 |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
400 |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
401 public void addOldData(DataList old, boolean redraw) { |
23
dc086030e6a3
The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
402 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
|
403 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
|
404 } |
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 |
790
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
406 refreshOld(redraw); |
23
dc086030e6a3
The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
407 } |
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
|
408 |
dc086030e6a3
The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
409 |
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
|
410 public void addOldDatas(DataList[] old) { |
790
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
411 addOldDatas(old, true); |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
412 } |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
413 |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
414 |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
415 public void addOldDatas(DataList[] old, boolean redraw) { |
23
dc086030e6a3
The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
416 if (old != null && old.length > 0) { |
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
|
417 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
|
418 if (o == null) { |
3ae0facd4cab
Added a panel that lets users step to a next state without feeding the current artifact with new data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
604
diff
changeset
|
419 continue; |
3ae0facd4cab
Added a panel that lets users step to a next state without feeding the current artifact with new data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
604
diff
changeset
|
420 } |
3ae0facd4cab
Added a panel that lets users step to a next state without feeding the current artifact with new data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
604
diff
changeset
|
421 |
38
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
422 if (!exists(o)) { |
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
423 GWT.log("Data '" + o.getLabel() + "' is new."); |
790
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
424 addOldData(o, false); |
38
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
425 } |
23
dc086030e6a3
The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
426 } |
dc086030e6a3
The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
427 |
790
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
428 if (redraw) { |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
429 addOldData(null, true); |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
430 } |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
431 |
23
dc086030e6a3
The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
432 return; |
dc086030e6a3
The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
433 } |
dc086030e6a3
The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
434 |
790
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
435 addOldData(null, true); |
23
dc086030e6a3
The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
436 } |
dc086030e6a3
The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
437 |
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
|
438 |
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
|
439 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
|
440 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
|
441 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
|
442 } |
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
|
443 |
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
|
444 String stateName = data.getState(); |
38
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
445 |
51
a2923d63f530
Introduced a data structure DataList to manage to list of Data objects of a single state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
50
diff
changeset
|
446 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
|
447 if (stateName.equals(o.getState())) { |
38
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
448 return true; |
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
449 } |
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
450 } |
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
451 |
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
452 return false; |
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
453 } |
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
454 |
7142386e86c2
Some improvements for displaying old parameters.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
455 |
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
|
456 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
|
457 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
|
458 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
|
459 |
dc086030e6a3
The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
460 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
|
461 } |
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
|
462 |
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
|
463 |
790
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
464 public void refreshOld(boolean redrawAll) { |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
465 if (redrawAll) { |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
466 refreshAllOld(); |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
467 } |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
468 else { |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
469 DataList dataList = old.get(old.size()-1); |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
470 String state = dataList.getState(); |
23
dc086030e6a3
The CollectionView is able to create new instances of a WINFO artifact and to display the artifact's state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
471 |
790
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
472 if (oldStorage.get(state) == null) { |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
473 String provider = dataList.getUIProvider(); |
909
794d1af42987
Clone Artifacts and add them to the current Collection in the WspDatacagePanel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
867
diff
changeset
|
474 UIProvider uiprovider = UIProviderFactory.getProvider( |
794d1af42987
Clone Artifacts and add them to the current Collection in the WspDatacagePanel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
867
diff
changeset
|
475 provider, |
794d1af42987
Clone Artifacts and add them to the current Collection in the WspDatacagePanel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
867
diff
changeset
|
476 flys.getCurrentUser()); |
790
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
477 ((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
|
478 |
790
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
479 Canvas c = uiprovider.createOld(dataList); |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
480 if (c != null) { |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
481 oldStorage.put(dataList.getState(), c); |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
482 oldItems.addMember(c); |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
483 } |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
484 } |
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
|
485 } |
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
|
486 |
790
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
487 updateOldHeight(); |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
488 } |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
489 |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
490 |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
491 protected void refreshAllOld() { |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
492 List<String> not = new ArrayList<String>(); |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
493 |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
494 for (DataList data: old) { |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
495 String state = data.getState(); |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
496 |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
497 Canvas c = oldStorage.get(state); |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
498 |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
499 if (c != null) { |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
500 not.add(state); |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
501 } |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
502 } |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
503 |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
504 Map<String, Canvas> newOld = new TreeMap<String, Canvas>(); |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
505 |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
506 Set<Map.Entry<String, Canvas>> entries = oldStorage.entrySet(); |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
507 for (Map.Entry<String, Canvas> entry: entries) { |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
508 String state = entry.getKey(); |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
509 Canvas value = entry.getValue(); |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
510 |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
511 if (not.indexOf(state) < 0) { |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
512 oldItems.removeMember(value); |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
513 } |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
514 else { |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
515 newOld.put(state, value); |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
516 } |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
517 } |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
518 |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
519 oldStorage = newOld; |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
520 } |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
521 |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
522 |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
523 protected void updateOldHeight() { |
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
|
524 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
|
525 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
|
526 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
|
527 } |
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
|
528 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
|
529 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
|
530 } |
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
|
531 } |
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
|
532 |
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
|
533 |
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
|
534 /** |
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
|
535 * 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
|
536 * 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
|
537 */ |
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
|
538 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
|
539 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
|
540 |
54
0db278371632
Remove the dynamic parameter panel if a state is reached that doesn't need any user input.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
53
diff
changeset
|
541 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
|
542 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
|
543 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
|
544 } |
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 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
|
546 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
|
547 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
|
548 |
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
|
549 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
|
550 } |
275
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
551 else { |
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
552 currentItems.setHeight(1); |
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
553 } |
789
e8be9a188e64
Layout improvements related to the height of components in the current parameterlist.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
788
diff
changeset
|
554 |
e8be9a188e64
Layout improvements related to the height of components in the current parameterlist.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
788
diff
changeset
|
555 Canvas[] members = currentItems.getMembers(); |
e8be9a188e64
Layout improvements related to the height of components in the current parameterlist.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
788
diff
changeset
|
556 if (members == null || members.length == 0) { |
e8be9a188e64
Layout improvements related to the height of components in the current parameterlist.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
788
diff
changeset
|
557 currentItems.setHeight(1); |
e8be9a188e64
Layout improvements related to the height of components in the current parameterlist.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
788
diff
changeset
|
558 } |
e8be9a188e64
Layout improvements related to the height of components in the current parameterlist.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
788
diff
changeset
|
559 else { |
e8be9a188e64
Layout improvements related to the height of components in the current parameterlist.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
788
diff
changeset
|
560 int height = 0; |
e8be9a188e64
Layout improvements related to the height of components in the current parameterlist.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
788
diff
changeset
|
561 |
e8be9a188e64
Layout improvements related to the height of components in the current parameterlist.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
788
diff
changeset
|
562 for (Canvas member: members) { |
e8be9a188e64
Layout improvements related to the height of components in the current parameterlist.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
788
diff
changeset
|
563 height += member.getHeight(); |
e8be9a188e64
Layout improvements related to the height of components in the current parameterlist.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
788
diff
changeset
|
564 } |
e8be9a188e64
Layout improvements related to the height of components in the current parameterlist.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
788
diff
changeset
|
565 |
e8be9a188e64
Layout improvements related to the height of components in the current parameterlist.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
788
diff
changeset
|
566 currentItems.setHeight(height); |
e8be9a188e64
Layout improvements related to the height of components in the current parameterlist.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
788
diff
changeset
|
567 } |
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
|
568 } |
60
f793d35bfb08
Implemented a mechanism to step back to previous states.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
57
diff
changeset
|
569 |
f793d35bfb08
Implemented a mechanism to step back to previous states.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
57
diff
changeset
|
570 |
f793d35bfb08
Implemented a mechanism to step back to previous states.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
57
diff
changeset
|
571 /** |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
572 * 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
|
573 * to the next state. |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
574 * |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
575 * @param event The StepForwardEvent. |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
576 */ |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
577 public void onStepForward(StepForwardEvent event) { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
578 GWT.log("CollectionView - onStepForward()"); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
579 |
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
|
580 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
|
581 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
|
582 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
|
583 |
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
|
584 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
|
585 new AsyncCallback<Artifact>() { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
586 public void onFailure(Throwable caught) { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
587 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
|
588 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
|
589 } |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
590 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
591 public void onSuccess(Artifact artifact) { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
592 GWT.log("Successfully feed the artifact."); |
790
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
593 old.clear(); |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
594 |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
595 setArtifact(artifact, true); |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
596 } |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
597 }); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
598 } |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
599 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
600 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
601 /** |
60
f793d35bfb08
Implemented a mechanism to step back to previous states.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
57
diff
changeset
|
602 * 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
|
603 * 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
|
604 * |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
605 * @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
|
606 */ |
f793d35bfb08
Implemented a mechanism to step back to previous states.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
57
diff
changeset
|
607 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
|
608 final String target = e.getTarget(); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
609 |
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
|
610 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
|
611 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
|
612 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
|
613 |
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
|
614 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
|
615 new AsyncCallback<Artifact>() { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
616 public void onFailure(Throwable caught) { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
617 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
|
618 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
|
619 } |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
620 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
621 public void onSuccess(Artifact artifact) { |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
622 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
|
623 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
624 old.clear(); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
625 |
790
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
626 setArtifact(artifact, false); |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
627 } |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
628 } |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
629 ); |
60
f793d35bfb08
Implemented a mechanism to step back to previous states.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
57
diff
changeset
|
630 } |
72
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
631 |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
632 |
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
|
633 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
|
634 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
|
635 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
|
636 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
|
637 |
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
|
638 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
|
639 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
|
640 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
|
641 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
|
642 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
|
643 } |
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
|
644 |
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
|
645 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
|
646 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
|
647 |
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
|
648 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
|
649 |
790
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
650 setArtifact(artifact, true); |
785
3ae0facd4cab
Added a panel that lets users step to a next state without feeding the current artifact with new data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
604
diff
changeset
|
651 } |
3ae0facd4cab
Added a panel that lets users step to a next state without feeding the current artifact with new data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
604
diff
changeset
|
652 } |
3ae0facd4cab
Added a panel that lets users step to a next state without feeding the current artifact with new data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
604
diff
changeset
|
653 ); |
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
|
654 } |
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
|
655 |
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
|
656 |
72
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
657 /** |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
658 * 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
|
659 * parameterization has changed. |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
660 * |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
661 * @param event The ParameterChangeEvent. |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
662 */ |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
663 public void onParameterChange(ParameterChangeEvent event) { |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
664 GWT.log("ParameterList.onParameterChange"); |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
665 |
788
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
666 Canvas[] c = helperPanel.getMembers(); |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
667 if (c != null && c.length > 0) { |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
668 helperPanel.removeMembers(c); |
83
4784ca718476
Improved the positioning of helper widgets and some layout specific stuff.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
669 } |
4784ca718476
Improved the positioning of helper widgets and some layout specific stuff.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
670 |
72
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
671 Artifact art = event.getNewValue(); |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
672 ArtifactDescription desc = art.getArtifactDescription(); |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
673 |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
674 DataList currentData = desc.getCurrentData(); |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
675 if (currentData != null) { |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
676 // 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
|
677 String uiProvider = currentData.getUIProvider(); |
909
794d1af42987
Clone Artifacts and add them to the current Collection in the WspDatacagePanel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
867
diff
changeset
|
678 UIProvider provider = UIProviderFactory.getProvider( |
794d1af42987
Clone Artifacts and add them to the current Collection in the WspDatacagePanel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
867
diff
changeset
|
679 uiProvider, |
794d1af42987
Clone Artifacts and add them to the current Collection in the WspDatacagePanel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
867
diff
changeset
|
680 flys.getCurrentUser()); |
72
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
681 |
83
4784ca718476
Improved the positioning of helper widgets and some layout specific stuff.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
682 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
|
683 provider.setArtifact(art); |
909
794d1af42987
Clone Artifacts and add them to the current Collection in the WspDatacagePanel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
867
diff
changeset
|
684 provider.setCollection(cView.getCollection()); |
915
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
909
diff
changeset
|
685 provider.setParameterList(this); |
83
4784ca718476
Improved the positioning of helper widgets and some layout specific stuff.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
686 |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
687 ((HasStepForwardHandlers) provider).addStepForwardHandler(this); |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
688 ((HasStepBackHandlers) provider).addStepBackHandler(this); |
72
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
689 |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
690 setCurrentData(currentData, provider); |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
691 } |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
692 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
|
693 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
|
694 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
|
695 // 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
|
696 // 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
|
697 // data is required. |
867
6a2ed979dfcf
Added new UIProvider "DatacageTwinPanel", pass user via UIProviderFactory.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
845
diff
changeset
|
698 UIProvider ui = UIProviderFactory.getProvider("continue", null); |
785
3ae0facd4cab
Added a panel that lets users step to a next state without feeding the current artifact with new data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
604
diff
changeset
|
699 ui.setArtifact(art); |
909
794d1af42987
Clone Artifacts and add them to the current Collection in the WspDatacagePanel.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
867
diff
changeset
|
700 ui.setCollection(cView.getCollection()); |
915
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
909
diff
changeset
|
701 ui.setParameterList(this); |
785
3ae0facd4cab
Added a panel that lets users step to a next state without feeding the current artifact with new data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
604
diff
changeset
|
702 |
3ae0facd4cab
Added a panel that lets users step to a next state without feeding the current artifact with new data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
604
diff
changeset
|
703 ((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
|
704 |
3ae0facd4cab
Added a panel that lets users step to a next state without feeding the current artifact with new data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
604
diff
changeset
|
705 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
|
706 } |
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
|
707 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
|
708 // 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
|
709 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
|
710 } |
72
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
711 } |
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
712 |
790
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
713 addOldDatas( |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
714 desc.getOldData(), |
3fa8583434b2
Made stepping forward/backword much smoother in the parameter list.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
789
diff
changeset
|
715 event.getType() == ParameterChangeEvent.Type.BACK); |
72
9b726350ab07
Moved ParameterList specific code into the ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
716 } |
256
5e1c1b7d6516
Added table and service for calculation output to UI.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
233
diff
changeset
|
717 |
275
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
718 |
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
719 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
|
720 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
|
721 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
|
722 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
|
723 |
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
|
724 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
|
725 |
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
|
726 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
|
727 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
|
728 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
|
729 } |
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
|
730 |
e090fbd5a535
Added a mechanism to listen to changes relating to output modes of collections and artifacts. Solves a part of ISSUE-62.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
282
diff
changeset
|
731 updateExportModes(c, getExportModes(outputs)); |
589
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
732 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
|
733 } |
e090fbd5a535
Added a mechanism to listen to changes relating to output modes of collections and artifacts. Solves a part of ISSUE-62.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
282
diff
changeset
|
734 |
e090fbd5a535
Added a mechanism to listen to changes relating to output modes of collections and artifacts. Solves a part of ISSUE-62.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
282
diff
changeset
|
735 |
e090fbd5a535
Added a mechanism to listen to changes relating to output modes of collections and artifacts. Solves a part of ISSUE-62.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
282
diff
changeset
|
736 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
|
737 |
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
|
738 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
|
739 |
e090fbd5a535
Added a mechanism to listen to changes relating to output modes of collections and artifacts. Solves a part of ISSUE-62.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
282
diff
changeset
|
740 if (c != null) { |
589
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
741 OutputMode [] outs = event.getOutputModes(); |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
742 updateExportModes(c, getExportModes(outs)); |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
743 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
|
744 } |
e090fbd5a535
Added a mechanism to listen to changes relating to output modes of collections and artifacts. Solves a part of ISSUE-62.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
282
diff
changeset
|
745 } |
e090fbd5a535
Added a mechanism to listen to changes relating to output modes of collections and artifacts. Solves a part of ISSUE-62.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
282
diff
changeset
|
746 |
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
|
747 |
589
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
748 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
|
749 |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
750 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
|
751 |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
752 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
|
753 return reports; |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
754 } |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
755 |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
756 for (OutputMode out: outs) { |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
757 if (out instanceof ReportMode) { |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
758 reports.add((ReportMode)out); |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
759 } |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
760 } |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
761 |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
762 return reports; |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
763 } |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
764 |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
765 |
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
|
766 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
|
767 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
|
768 |
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
|
769 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
|
770 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
|
771 } |
275
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
772 |
513
e090fbd5a535
Added a mechanism to listen to changes relating to output modes of collections and artifacts. Solves a part of ISSUE-62.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
282
diff
changeset
|
773 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
|
774 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
|
775 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
|
776 } |
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
777 } |
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
778 |
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
|
779 return exports; |
275
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
780 } |
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
781 |
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
782 |
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
783 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
|
784 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
|
785 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
|
786 |
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
787 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
|
788 |
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
789 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
|
790 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
|
791 } |
789
e8be9a188e64
Layout improvements related to the height of components in the current parameterlist.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
788
diff
changeset
|
792 else { |
e8be9a188e64
Layout improvements related to the height of components in the current parameterlist.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
788
diff
changeset
|
793 exportModes.setHeight(1); |
e8be9a188e64
Layout improvements related to the height of components in the current parameterlist.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
788
diff
changeset
|
794 } |
275
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
795 } |
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
796 |
589
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
797 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
|
798 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
|
799 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
|
800 |
604
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
801 if (num == 0) { |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
802 reportPanel.setContents(""); |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
803 return; |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
804 } |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
805 |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
806 Config config = Config.getInstance(); |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
807 String url = config.getServerUrl(); |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
808 String locale = config.getLocale(); |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
809 |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
810 String cid = c.identifier(); |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
811 |
589
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
812 for (ReportMode report: reports) { |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
813 GWT.log("report '" + report.toString() + "'"); |
604
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
814 |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
815 reportService.report(cid, url, locale, report.getName(), |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
816 new AsyncCallback<String>() { |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
817 public void onFailure(Throwable caught) { |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
818 SC.warn(caught.getMessage()); |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
819 } |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
820 |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
821 public void onSuccess(String msg) { |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
822 setReportMessage(msg); |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
823 } |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
824 }); |
589
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
825 } |
604
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
826 } |
589
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
827 |
604
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
828 protected void setReportMessage(String msg) { |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
829 GWT.log("returned from service: " + msg); |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
830 if (msg == null) { |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
831 msg = ""; |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
832 } |
84d3c5fde5bb
First version of error reports.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
589
diff
changeset
|
833 reportPanel.setContents(msg); |
589
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
834 } |
942bd0e7e332
Filter reports and dispatch them to updateReports().
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
582
diff
changeset
|
835 |
275
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
271
diff
changeset
|
836 |
256
5e1c1b7d6516
Added table and service for calculation output to UI.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
233
diff
changeset
|
837 /** |
5e1c1b7d6516
Added table and service for calculation output to UI.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
233
diff
changeset
|
838 * 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
|
839 * |
5e1c1b7d6516
Added table and service for calculation output to UI.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
233
diff
changeset
|
840 * @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
|
841 */ |
788
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
842 public void setTable(TableDataPanel table) { |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
843 removeTable(); |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
844 |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
845 Canvas c = table.create(); |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
846 c.setHeight100(); |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
847 c.setWidth100(); |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
848 |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
849 tablePanel.addMember(c); |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
850 } |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
851 |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
852 |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
853 public boolean hasTable() { |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
854 Canvas[] members = tablePanel.getMembers(); |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
855 |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
856 return members != null && members.length > 0; |
260
dd1dad2ff94e
Remove the data table on step back.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
256
diff
changeset
|
857 } |
dd1dad2ff94e
Remove the data table on step back.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
256
diff
changeset
|
858 |
dd1dad2ff94e
Remove the data table on step back.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
256
diff
changeset
|
859 |
dd1dad2ff94e
Remove the data table on step back.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
256
diff
changeset
|
860 /** |
dd1dad2ff94e
Remove the data table on step back.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
256
diff
changeset
|
861 * 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
|
862 */ |
788
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
863 public void removeTable() { |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
864 Canvas[] members = tablePanel.getMembers(); |
260
dd1dad2ff94e
Remove the data table on step back.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
256
diff
changeset
|
865 |
788
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
866 if (members != null && members.length > 0) { |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
867 tablePanel.removeMembers(members); |
dfbc6693247e
Integrated a stacked panel on the right side of the ParameterList that enables users to see calculation results and the helper panel at the same time.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
785
diff
changeset
|
868 } |
256
5e1c1b7d6516
Added table and service for calculation output to UI.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
233
diff
changeset
|
869 } |
915
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
909
diff
changeset
|
870 |
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
909
diff
changeset
|
871 |
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
909
diff
changeset
|
872 public void registerCollectionViewTabHandler (TabSelectedHandler tsh) { |
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
909
diff
changeset
|
873 this.cView.registerTabHandler (tsh); |
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
909
diff
changeset
|
874 } |
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
|
875 } |
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
|
876 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |