Mercurial > dive4elements > river
annotate flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java @ 1578:df11c4c8c578
Avoid certain npes.
flys-client/trunk@3847 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 01 Feb 2012 08:51:30 +0000 |
parents | 964e90c5b4c1 |
children | f8c03d3af300 |
rev | line source |
---|---|
6
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.client.client.ui; |
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
19
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
3 import java.util.ArrayList; |
74
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
4 import java.util.HashMap; |
19
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
5 import java.util.List; |
74
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
6 import java.util.Map; |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
7 import java.util.Set; |
809
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
8 import java.util.Stack; |
19
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
9 |
6
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 import com.google.gwt.core.client.GWT; |
13
8d9075c07667
Enhanced the CollectionView: there are radio buttons for each module and a button to select one of those.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
7
diff
changeset
|
11 import com.google.gwt.user.client.rpc.AsyncCallback; |
6
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 |
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
|
13 import com.smartgwt.client.util.SC; |
6
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
14 import com.smartgwt.client.widgets.Window; |
557
92c200887b20
#21 There might be just a single window for each project now. Users can't open a project twice.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
537
diff
changeset
|
15 import com.smartgwt.client.widgets.events.CloseClientEvent; |
92c200887b20
#21 There might be just a single window for each project now. Users can't open a project twice.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
537
diff
changeset
|
16 import com.smartgwt.client.widgets.events.CloseClickHandler; |
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:
19
diff
changeset
|
17 import com.smartgwt.client.widgets.layout.Layout; |
7
a65793e08245
Radio buttons for each plugin are displayed if a new CollectionView is created.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
6
diff
changeset
|
18 import com.smartgwt.client.widgets.layout.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:
19
diff
changeset
|
19 import com.smartgwt.client.widgets.tab.TabSet; |
915
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
908
diff
changeset
|
20 import com.smartgwt.client.widgets.tab.events.TabSelectedHandler; |
6
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
21 |
13
8d9075c07667
Enhanced the CollectionView: there are radio buttons for each module and a button to select one of those.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
7
diff
changeset
|
22 import de.intevation.flys.client.shared.model.Artifact; |
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:
19
diff
changeset
|
23 import de.intevation.flys.client.shared.model.ArtifactDescription; |
6
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 import de.intevation.flys.client.shared.model.Collection; |
270
d01b0d81b92a
Parse the facets of a Collection and distinguish between an ordinary OutputMode and an ExportMode (new).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
260
diff
changeset
|
25 import de.intevation.flys.client.shared.model.ExportMode; |
71
987567f31200
Adjusted the return type of the CreateCollectionService and added code to react on Collection changes (like output modes).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
26 import de.intevation.flys.client.shared.model.OutputMode; |
807
6f65e70fa11d
Repaired broken recommendation parsing from Artifact's DESCRIBE document (which structure has changed).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
803
diff
changeset
|
27 import de.intevation.flys.client.shared.model.Recommendation; |
593
c0477626ae6a
#156 Do not display report modes as tabs in the project view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
582
diff
changeset
|
28 import de.intevation.flys.client.shared.model.ReportMode; |
71
987567f31200
Adjusted the return type of the CreateCollectionService and added code to react on Collection changes (like output modes).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
29 import de.intevation.flys.client.shared.model.User; |
6
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
30 |
14
fe2f4d1dd784
Integrated the httpclient for the communication between client and server. It is now possible to create a new WINFO artifact.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
13
diff
changeset
|
31 import de.intevation.flys.client.client.Config; |
13
8d9075c07667
Enhanced the CollectionView: there are radio buttons for each module and a button to select one of those.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
7
diff
changeset
|
32 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:
102
diff
changeset
|
33 import de.intevation.flys.client.client.FLYSConstants; |
19
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
34 import de.intevation.flys.client.client.event.HasCollectionChangeHandlers; |
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:
437
diff
changeset
|
35 import de.intevation.flys.client.client.event.HasOutputModesChangeHandlers; |
19
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
36 import de.intevation.flys.client.client.event.CollectionChangeEvent; |
36
3cacc9d2dd01
CollectionView implements HasParameterChangeHandler and ParameterChangeHandler interfaces.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
32
diff
changeset
|
37 import de.intevation.flys.client.client.event.CollectionChangeHandler; |
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:
437
diff
changeset
|
38 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:
437
diff
changeset
|
39 import de.intevation.flys.client.client.event.OutputModesChangeHandler; |
36
3cacc9d2dd01
CollectionView implements HasParameterChangeHandler and ParameterChangeHandler interfaces.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
32
diff
changeset
|
40 import de.intevation.flys.client.client.event.ParameterChangeEvent; |
3cacc9d2dd01
CollectionView implements HasParameterChangeHandler and ParameterChangeHandler interfaces.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
32
diff
changeset
|
41 import de.intevation.flys.client.client.event.ParameterChangeHandler; |
803
653ae84533e7
Read/create recommended Artifacts and add them to the current Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
796
diff
changeset
|
42 import de.intevation.flys.client.client.services.ArtifactService; |
653ae84533e7
Read/create recommended Artifacts and add them to the current Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
796
diff
changeset
|
43 import de.intevation.flys.client.client.services.ArtifactServiceAsync; |
71
987567f31200
Adjusted the return type of the CreateCollectionService and added code to react on Collection changes (like output modes).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
44 import de.intevation.flys.client.client.services.AddArtifactService; |
987567f31200
Adjusted the return type of the CreateCollectionService and added code to react on Collection changes (like output modes).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
45 import de.intevation.flys.client.client.services.AddArtifactServiceAsync; |
809
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
46 import de.intevation.flys.client.client.services.CollectionAttributeService; |
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
47 import de.intevation.flys.client.client.services.CollectionAttributeServiceAsync; |
26
c19985f75118
Implemented a service that triggers the artifact-collection creation in the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
48 import de.intevation.flys.client.client.services.CreateCollectionService; |
c19985f75118
Implemented a service that triggers the artifact-collection creation in the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
49 import de.intevation.flys.client.client.services.CreateCollectionServiceAsync; |
100
95b30a5d6350
Bugfix: A collection view just creates a single time a new collection - even if we step back to a previous state and go forward afterwards.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
92
diff
changeset
|
50 import de.intevation.flys.client.client.services.DescribeCollectionService; |
95b30a5d6350
Bugfix: A collection view just creates a single time a new collection - even if we step back to a previous state and go forward afterwards.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
92
diff
changeset
|
51 import de.intevation.flys.client.client.services.DescribeCollectionServiceAsync; |
1515 | 52 import de.intevation.flys.client.client.services.LoadArtifactService; |
53 import de.intevation.flys.client.client.services.LoadArtifactServiceAsync; | |
6
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
54 |
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
55 |
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
56 /** |
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
57 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
58 */ |
19
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
59 public class CollectionView |
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
60 extends Window |
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:
19
diff
changeset
|
61 implements CollectionChangeHandler, HasCollectionChangeHandlers, |
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:
437
diff
changeset
|
62 OutputModesChangeHandler, HasOutputModesChangeHandlers, |
557
92c200887b20
#21 There might be just a single window for each project now. Users can't open a project twice.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
537
diff
changeset
|
63 ParameterChangeHandler, CloseClickHandler |
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:
19
diff
changeset
|
64 { |
13
8d9075c07667
Enhanced the CollectionView: there are radio buttons for each module and a button to select one of those.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
7
diff
changeset
|
65 /** The ArtifactService used to communicate with the Artifact server. */ |
26
c19985f75118
Implemented a service that triggers the artifact-collection creation in the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
66 protected CreateCollectionServiceAsync createCollectionService = |
c19985f75118
Implemented a service that triggers the artifact-collection creation in the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
67 GWT.create(CreateCollectionService.class); |
c19985f75118
Implemented a service that triggers the artifact-collection creation in the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
68 |
803
653ae84533e7
Read/create recommended Artifacts and add them to the current Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
796
diff
changeset
|
69 /** The ArtifactService used to communicate with the Artifact server. */ |
653ae84533e7
Read/create recommended Artifacts and add them to the current Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
796
diff
changeset
|
70 protected ArtifactServiceAsync createArtifactService = |
653ae84533e7
Read/create recommended Artifacts and add them to the current Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
796
diff
changeset
|
71 GWT.create(ArtifactService.class); |
653ae84533e7
Read/create recommended Artifacts and add them to the current Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
796
diff
changeset
|
72 |
71
987567f31200
Adjusted the return type of the CreateCollectionService and added code to react on Collection changes (like output modes).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
73 /** The AddArtifactService used to add an artifact to a collection. */ |
987567f31200
Adjusted the return type of the CreateCollectionService and added code to react on Collection changes (like output modes).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
74 protected AddArtifactServiceAsync addArtifactService = |
987567f31200
Adjusted the return type of the CreateCollectionService and added code to react on Collection changes (like output modes).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
75 GWT.create(AddArtifactService.class); |
987567f31200
Adjusted the return type of the CreateCollectionService and added code to react on Collection changes (like output modes).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
76 |
100
95b30a5d6350
Bugfix: A collection view just creates a single time a new collection - even if we step back to a previous state and go forward afterwards.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
92
diff
changeset
|
77 /** The DescribeCollectionService used to update the existing collection. */ |
95b30a5d6350
Bugfix: A collection view just creates a single time a new collection - even if we step back to a previous state and go forward afterwards.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
92
diff
changeset
|
78 protected DescribeCollectionServiceAsync describeCollectionService = |
95b30a5d6350
Bugfix: A collection view just creates a single time a new collection - even if we step back to a previous state and go forward afterwards.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
92
diff
changeset
|
79 GWT.create(DescribeCollectionService.class); |
95b30a5d6350
Bugfix: A collection view just creates a single time a new collection - even if we step back to a previous state and go forward afterwards.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
92
diff
changeset
|
80 |
809
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
81 protected CollectionAttributeServiceAsync updater = |
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
82 GWT.create(CollectionAttributeService.class); |
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
83 |
1515 | 84 /** The LoadArtifactService used to load recommendations*/ |
85 protected LoadArtifactServiceAsync loadArtifactService = | |
86 GWT.create(LoadArtifactService.class); | |
87 | |
864
c0e13cf826d7
Cosmetics, doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
862
diff
changeset
|
88 /** 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:
102
diff
changeset
|
89 protected FLYSConstants messages = GWT.create(FLYSConstants.class); |
6
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
90 |
864
c0e13cf826d7
Cosmetics, doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
862
diff
changeset
|
91 /** The FLYS instance used to call services. */ |
13
8d9075c07667
Enhanced the CollectionView: there are radio buttons for each module and a button to select one of those.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
7
diff
changeset
|
92 protected FLYS flys; |
8d9075c07667
Enhanced the CollectionView: there are radio buttons for each module and a button to select one of those.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
7
diff
changeset
|
93 |
864
c0e13cf826d7
Cosmetics, doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
862
diff
changeset
|
94 /** The ParameterList. */ |
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:
19
diff
changeset
|
95 protected ParameterList parameterList; |
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:
19
diff
changeset
|
96 |
864
c0e13cf826d7
Cosmetics, doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
862
diff
changeset
|
97 /** The list of CollectionChangeHandlers. */ |
19
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
98 protected List<CollectionChangeHandler> handlers; |
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
99 |
864
c0e13cf826d7
Cosmetics, doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
862
diff
changeset
|
100 /** The list of OutputModesChangeHandlers. */ |
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:
437
diff
changeset
|
101 protected List<OutputModesChangeHandler> outHandlers; |
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:
437
diff
changeset
|
102 |
864
c0e13cf826d7
Cosmetics, doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
862
diff
changeset
|
103 /** The collection to be displayed. */ |
6
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
104 protected Collection collection; |
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
105 |
864
c0e13cf826d7
Cosmetics, doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
862
diff
changeset
|
106 /** The artifact that handles the parameterization. */ |
30
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
26
diff
changeset
|
107 protected Artifact artifact; |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
26
diff
changeset
|
108 |
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:
19
diff
changeset
|
109 protected TabSet tabs; |
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:
19
diff
changeset
|
110 |
864
c0e13cf826d7
Cosmetics, doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
862
diff
changeset
|
111 /** The output tab. */ |
74
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
112 protected Map<String, OutputTab> outputTabs; |
7
a65793e08245
Radio buttons for each plugin are displayed if a new CollectionView is created.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
6
diff
changeset
|
113 |
864
c0e13cf826d7
Cosmetics, doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
862
diff
changeset
|
114 /** The layout. */ |
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:
19
diff
changeset
|
115 protected Layout layout; |
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:
19
diff
changeset
|
116 |
809
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
117 protected int artifactsQueue; |
1512 | 118 protected int recommendationQueue; |
809
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
119 protected Stack<Recommendation> newRecommendations; |
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
120 |
6
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
121 |
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
122 /** |
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
123 * This constructor creates a new CollectionView that is used to display the |
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
124 * <i>collection</i>. |
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
125 */ |
100
95b30a5d6350
Bugfix: A collection view just creates a single time a new collection - even if we step back to a previous state and go forward afterwards.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
92
diff
changeset
|
126 public CollectionView(FLYS flys) { |
908
a680ccec5dd6
Create new collections initially when starting a new project.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
864
diff
changeset
|
127 // do this first because it takes longer than the other stuff in here. |
a680ccec5dd6
Create new collections initially when starting a new project.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
864
diff
changeset
|
128 User user = flys.getCurrentUser(); |
a680ccec5dd6
Create new collections initially when starting a new project.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
864
diff
changeset
|
129 createNewCollection(user.identifier()); |
a680ccec5dd6
Create new collections initially when starting a new project.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
864
diff
changeset
|
130 |
100
95b30a5d6350
Bugfix: A collection view just creates a single time a new collection - even if we step back to a previous state and go forward afterwards.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
92
diff
changeset
|
131 this.flys = flys; |
95b30a5d6350
Bugfix: A collection view just creates a single time a new collection - even if we step back to a previous state and go forward afterwards.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
92
diff
changeset
|
132 this.tabs = new TabSet(); |
95b30a5d6350
Bugfix: A collection view just creates a single time a new collection - even if we step back to a previous state and go forward afterwards.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
92
diff
changeset
|
133 this.outputTabs = new HashMap<String, OutputTab>(); |
95b30a5d6350
Bugfix: A collection view just creates a single time a new collection - even if we step back to a previous state and go forward afterwards.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
92
diff
changeset
|
134 this.handlers = new ArrayList<CollectionChangeHandler>(); |
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:
437
diff
changeset
|
135 this.outHandlers = new ArrayList<OutputModesChangeHandler>(); |
100
95b30a5d6350
Bugfix: A collection view just creates a single time a new collection - even if we step back to a previous state and go forward afterwards.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
92
diff
changeset
|
136 this.layout = new VLayout(); |
95b30a5d6350
Bugfix: A collection view just creates a single time a new collection - even if we step back to a previous state and go forward afterwards.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
92
diff
changeset
|
137 this.parameterList = new ParameterList( |
92
fa3d9f79dff5
Changed some german strings.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
91
diff
changeset
|
138 flys, this, messages.new_project()); |
809
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
139 this.artifactsQueue = 0; |
1512 | 140 this.recommendationQueue = 0; |
809
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
141 this.newRecommendations = new Stack<Recommendation>(); |
19
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
142 |
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
143 addCollectionChangeHandler(this); |
275
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
270
diff
changeset
|
144 addCollectionChangeHandler(parameterList); |
611
854312c0528c
#21 Newly created projects cannot be opened twice.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
601
diff
changeset
|
145 addCollectionChangeHandler(flys); |
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:
437
diff
changeset
|
146 addOutputModesChangeHandler(this); |
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:
437
diff
changeset
|
147 addOutputModesChangeHandler(parameterList); |
557
92c200887b20
#21 There might be just a single window for each project now. Users can't open a project twice.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
537
diff
changeset
|
148 addCloseClickHandler(this); |
73
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
149 |
39210a74db07
Moved parameterization specific code from CollectionView to ParameterList.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
72
diff
changeset
|
150 parameterList.addParameterChangeHandler(this); |
19
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
151 |
6
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
152 init(); |
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
153 } |
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
154 |
1557
964e90c5b4c1
Invested 2 seconds after losing 3.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1539
diff
changeset
|
155 /** |
964e90c5b4c1
Invested 2 seconds after losing 3.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1539
diff
changeset
|
156 * @param collection The collection to be displayed. |
964e90c5b4c1
Invested 2 seconds after losing 3.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1539
diff
changeset
|
157 */ |
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
|
158 public CollectionView(FLYS flys, Collection collection, 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
|
159 this.flys = flys; |
825
1b9b7e9ab219
Save and reload user defined geometries (barriers) in the map.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
820
diff
changeset
|
160 this.artifact = artifact; |
1b9b7e9ab219
Save and reload user defined geometries (barriers) in the map.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
820
diff
changeset
|
161 this.collection = collection; |
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
|
162 this.tabs = new TabSet(); |
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 this.outputTabs = new HashMap<String, OutputTab>(); |
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
|
164 this.handlers = new ArrayList<CollectionChangeHandler>(); |
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:
437
diff
changeset
|
165 this.outHandlers = new ArrayList<OutputModesChangeHandler>(); |
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
|
166 this.layout = new VLayout(); |
1294
94d4f040da3a
Bugfix: #326 Made the process of opening existing project more robust if the collection has no artifact set.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1270
diff
changeset
|
167 |
94d4f040da3a
Bugfix: #326 Made the process of opening existing project more robust if the collection has no artifact set.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1270
diff
changeset
|
168 if (artifact != null) { |
94d4f040da3a
Bugfix: #326 Made the process of opening existing project more robust if the collection has no artifact set.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1270
diff
changeset
|
169 this.parameterList = new ParameterList( |
94d4f040da3a
Bugfix: #326 Made the process of opening existing project more robust if the collection has no artifact set.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1270
diff
changeset
|
170 flys, |
94d4f040da3a
Bugfix: #326 Made the process of opening existing project more robust if the collection has no artifact set.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1270
diff
changeset
|
171 this, |
94d4f040da3a
Bugfix: #326 Made the process of opening existing project more robust if the collection has no artifact set.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1270
diff
changeset
|
172 messages.getString(artifact.getName()), |
94d4f040da3a
Bugfix: #326 Made the process of opening existing project more robust if the collection has no artifact set.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1270
diff
changeset
|
173 artifact); |
94d4f040da3a
Bugfix: #326 Made the process of opening existing project more robust if the collection has no artifact set.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1270
diff
changeset
|
174 } |
94d4f040da3a
Bugfix: #326 Made the process of opening existing project more robust if the collection has no artifact set.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1270
diff
changeset
|
175 else { |
94d4f040da3a
Bugfix: #326 Made the process of opening existing project more robust if the collection has no artifact set.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1270
diff
changeset
|
176 this.parameterList = new ParameterList( |
94d4f040da3a
Bugfix: #326 Made the process of opening existing project more robust if the collection has no artifact set.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1270
diff
changeset
|
177 flys, this, messages.new_project()); |
94d4f040da3a
Bugfix: #326 Made the process of opening existing project more robust if the collection has no artifact set.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1270
diff
changeset
|
178 } |
94d4f040da3a
Bugfix: #326 Made the process of opening existing project more robust if the collection has no artifact set.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1270
diff
changeset
|
179 |
809
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
180 this.artifactsQueue = 0; |
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
181 this.newRecommendations = new Stack<Recommendation>(); |
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
|
182 |
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
|
183 addCollectionChangeHandler(this); |
275
8264b02091ef
ISSUE-56 Display download buttons to export the computed data.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
270
diff
changeset
|
184 addCollectionChangeHandler(parameterList); |
611
854312c0528c
#21 Newly created projects cannot be opened twice.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
601
diff
changeset
|
185 addCollectionChangeHandler(flys); |
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:
437
diff
changeset
|
186 addOutputModesChangeHandler(this); |
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:
437
diff
changeset
|
187 addOutputModesChangeHandler(parameterList); |
557
92c200887b20
#21 There might be just a single window for each project now. Users can't open a project twice.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
537
diff
changeset
|
188 addCloseClickHandler(this); |
224
a4a68b4ee2a3
Improved the CollectionView and the ParameterList - both can be initialized with an existing artifact (parameterization).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
215
diff
changeset
|
189 |
a4a68b4ee2a3
Improved the CollectionView and the ParameterList - both can be initialized with an existing artifact (parameterization).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
215
diff
changeset
|
190 parameterList.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
|
191 |
a4a68b4ee2a3
Improved the CollectionView and the ParameterList - both can be initialized with an existing artifact (parameterization).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
215
diff
changeset
|
192 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
|
193 |
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 setCollection(collection); |
1294
94d4f040da3a
Bugfix: #326 Made the process of opening existing project more robust if the collection has no artifact set.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1270
diff
changeset
|
195 |
94d4f040da3a
Bugfix: #326 Made the process of opening existing project more robust if the collection has no artifact set.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1270
diff
changeset
|
196 if (artifact != null) { |
94d4f040da3a
Bugfix: #326 Made the process of opening existing project more robust if the collection has no artifact set.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1270
diff
changeset
|
197 setArtifact(artifact); |
94d4f040da3a
Bugfix: #326 Made the process of opening existing project more robust if the collection has no artifact set.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1270
diff
changeset
|
198 } |
224
a4a68b4ee2a3
Improved the CollectionView and the ParameterList - both can be initialized with an existing artifact (parameterization).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
215
diff
changeset
|
199 } |
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
|
200 |
a4a68b4ee2a3
Improved the CollectionView and the ParameterList - both can be initialized with an existing artifact (parameterization).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
215
diff
changeset
|
201 |
6
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
202 /** |
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
203 * This method handles the initial layout stuff. |
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
204 */ |
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
205 protected void init() { |
91
0d8203594bb4
Resized CollectionView and set the content size to have a tabled style.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
90
diff
changeset
|
206 setWidth(750); |
39
4187a797fc3d
Implemented the step forward mechanism in the CollectionView and added the river map to the initial widget.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
37
diff
changeset
|
207 setHeight(600); |
6
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
208 |
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:
19
diff
changeset
|
209 layout.setWidth100(); |
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:
19
diff
changeset
|
210 |
77
5b5ec0403844
Limited the area for CollectionView to the size of FLYSWorkspace.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
75
diff
changeset
|
211 setCanDragReposition(true); |
6
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
212 setCanDragResize(true); |
437
7fa15845fecf
ISSUE-35 The project view has a maximize button now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
276
diff
changeset
|
213 setShowMaximizeButton(true); |
77
5b5ec0403844
Limited the area for CollectionView to the size of FLYSWorkspace.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
75
diff
changeset
|
214 setKeepInParentRect(true); |
6
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
215 |
84
b8acb6a615f2
Removed the title (date string) of CollectionViews.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
77
diff
changeset
|
216 setTitle(""); |
7
a65793e08245
Radio buttons for each plugin are displayed if a new CollectionView is created.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
6
diff
changeset
|
217 |
a65793e08245
Radio buttons for each plugin are displayed if a new CollectionView is created.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
6
diff
changeset
|
218 addItem(layout); |
a65793e08245
Radio buttons for each plugin are displayed if a new CollectionView is created.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
6
diff
changeset
|
219 |
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:
19
diff
changeset
|
220 layout.addMember(tabs); |
90
f8c240f28c2a
The title of the parameter tab will change after the module has been selectd.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
87
diff
changeset
|
221 tabs.addTab(parameterList); |
7
a65793e08245
Radio buttons for each plugin are displayed if a new CollectionView is created.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
6
diff
changeset
|
222 } |
a65793e08245
Radio buttons for each plugin are displayed if a new CollectionView is created.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
6
diff
changeset
|
223 |
a65793e08245
Radio buttons for each plugin are displayed if a new CollectionView is created.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
6
diff
changeset
|
224 |
a65793e08245
Radio buttons for each plugin are displayed if a new CollectionView is created.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
6
diff
changeset
|
225 /** |
26
c19985f75118
Implemented a service that triggers the artifact-collection creation in the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
226 * This method triggers the CreateCollectionService to create a new |
c19985f75118
Implemented a service that triggers the artifact-collection creation in the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
227 * collection in the artifact server. |
c19985f75118
Implemented a service that triggers the artifact-collection creation in the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
228 * |
c19985f75118
Implemented a service that triggers the artifact-collection creation in the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
229 * @param ownerId The uuid of the user that should own the new collection. |
c19985f75118
Implemented a service that triggers the artifact-collection creation in the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
230 */ |
c19985f75118
Implemented a service that triggers the artifact-collection creation in the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
231 protected void createNewCollection(String ownerId) { |
100
95b30a5d6350
Bugfix: A collection view just creates a single time a new collection - even if we step back to a previous state and go forward afterwards.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
92
diff
changeset
|
232 GWT.log("CollectionView.createNewCollection"); |
95b30a5d6350
Bugfix: A collection view just creates a single time a new collection - even if we step back to a previous state and go forward afterwards.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
92
diff
changeset
|
233 |
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:
228
diff
changeset
|
234 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:
228
diff
changeset
|
235 final String locale = config.getLocale(); |
26
c19985f75118
Implemented a service that triggers the artifact-collection creation in the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
236 |
c19985f75118
Implemented a service that triggers the artifact-collection creation in the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
237 createCollectionService.create( |
1425
bc06a671ef60
Removed the URL parameter from service calls. The service
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1294
diff
changeset
|
238 locale, |
bc06a671ef60
Removed the URL parameter from service calls. The service
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1294
diff
changeset
|
239 ownerId, |
71
987567f31200
Adjusted the return type of the CreateCollectionService and added code to react on Collection changes (like output modes).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
240 new AsyncCallback<Collection>() { |
26
c19985f75118
Implemented a service that triggers the artifact-collection creation in the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
241 public void onFailure(Throwable caught) { |
c19985f75118
Implemented a service that triggers the artifact-collection creation in the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
242 GWT.log("Could not create the new collection."); |
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
|
243 SC.warn(messages.getString(caught.getMessage())); |
26
c19985f75118
Implemented a service that triggers the artifact-collection creation in the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
244 } |
c19985f75118
Implemented a service that triggers the artifact-collection creation in the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
245 |
71
987567f31200
Adjusted the return type of the CreateCollectionService and added code to react on Collection changes (like output modes).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
246 public void onSuccess(Collection collection) { |
26
c19985f75118
Implemented a service that triggers the artifact-collection creation in the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
247 GWT.log("Successfully created a new collection."); |
803
653ae84533e7
Read/create recommended Artifacts and add them to the current Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
796
diff
changeset
|
248 setCollection(collection); |
26
c19985f75118
Implemented a service that triggers the artifact-collection creation in the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
249 } |
c19985f75118
Implemented a service that triggers the artifact-collection creation in the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
250 }); |
c19985f75118
Implemented a service that triggers the artifact-collection creation in the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
251 } |
c19985f75118
Implemented a service that triggers the artifact-collection creation in the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
252 |
c19985f75118
Implemented a service that triggers the artifact-collection creation in the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
253 |
c19985f75118
Implemented a service that triggers the artifact-collection creation in the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
254 protected FLYS getFlys() { |
c19985f75118
Implemented a service that triggers the artifact-collection creation in the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
255 return flys; |
c19985f75118
Implemented a service that triggers the artifact-collection creation in the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
256 } |
c19985f75118
Implemented a service that triggers the artifact-collection creation in the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
257 |
c19985f75118
Implemented a service that triggers the artifact-collection creation in the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
258 |
c19985f75118
Implemented a service that triggers the artifact-collection creation in the artifact server.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
23
diff
changeset
|
259 /** |
864
c0e13cf826d7
Cosmetics, doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
862
diff
changeset
|
260 * This method registers a new CollectionChangeHandler. |
19
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
261 * |
864
c0e13cf826d7
Cosmetics, doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
862
diff
changeset
|
262 * @param handler The new CollectionChangeHandler. |
19
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
263 */ |
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
264 public void addCollectionChangeHandler(CollectionChangeHandler handler) { |
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
265 if (handler != null) { |
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
266 handlers.add(handler); |
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
267 } |
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
268 } |
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
269 |
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
270 |
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:
437
diff
changeset
|
271 /** |
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:
437
diff
changeset
|
272 * This method registers a new OutputModesChangeHandler. |
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:
437
diff
changeset
|
273 * |
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:
437
diff
changeset
|
274 * @param handler The new OutputModesChangeHandler. |
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:
437
diff
changeset
|
275 */ |
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:
437
diff
changeset
|
276 public void addOutputModesChangeHandler(OutputModesChangeHandler handler) { |
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:
437
diff
changeset
|
277 if (handler != null) { |
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:
437
diff
changeset
|
278 outHandlers.add(handler); |
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:
437
diff
changeset
|
279 } |
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:
437
diff
changeset
|
280 } |
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:
437
diff
changeset
|
281 |
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:
437
diff
changeset
|
282 |
36
3cacc9d2dd01
CollectionView implements HasParameterChangeHandler and ParameterChangeHandler interfaces.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
32
diff
changeset
|
283 /** |
19
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
284 * This method calls the <code>onValueChange()</code> method of all |
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
285 * registered ValueChangeHanders. |
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
286 */ |
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
287 protected void fireCollectionChangeEvent( |
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
288 Collection old, Collection newCol) |
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
289 { |
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
290 for (CollectionChangeHandler handler: handlers) { |
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
291 handler.onCollectionChange(new CollectionChangeEvent(old, newCol)); |
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
292 } |
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
293 } |
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
294 |
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
295 |
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:
437
diff
changeset
|
296 protected void fireOutputModesChangeEvent(OutputMode[] outputs) { |
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:
437
diff
changeset
|
297 if (collection == null) { |
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:
437
diff
changeset
|
298 return; |
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:
437
diff
changeset
|
299 } |
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:
437
diff
changeset
|
300 |
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:
437
diff
changeset
|
301 for (OutputModesChangeHandler handler: outHandlers) { |
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:
437
diff
changeset
|
302 handler.onOutputModesChange(new OutputModesChangeEvent(outputs)); |
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:
437
diff
changeset
|
303 } |
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:
437
diff
changeset
|
304 } |
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:
437
diff
changeset
|
305 |
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:
437
diff
changeset
|
306 |
19
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
307 /** |
7
a65793e08245
Radio buttons for each plugin are displayed if a new CollectionView is created.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
6
diff
changeset
|
308 * This method returns true, if the Collection is new and no plugins has |
a65793e08245
Radio buttons for each plugin are displayed if a new CollectionView is created.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
6
diff
changeset
|
309 * been chosen. |
a65793e08245
Radio buttons for each plugin are displayed if a new CollectionView is created.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
6
diff
changeset
|
310 * |
a65793e08245
Radio buttons for each plugin are displayed if a new CollectionView is created.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
6
diff
changeset
|
311 * @return true, if the Collection is new. |
a65793e08245
Radio buttons for each plugin are displayed if a new CollectionView is created.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
6
diff
changeset
|
312 */ |
a65793e08245
Radio buttons for each plugin are displayed if a new CollectionView is created.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
6
diff
changeset
|
313 public boolean isNew() { |
582
78907f0fb939
Added dummy report panel.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
557
diff
changeset
|
314 return collection.getItemLength() == 0; |
7
a65793e08245
Radio buttons for each plugin are displayed if a new CollectionView is created.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
6
diff
changeset
|
315 } |
a65793e08245
Radio buttons for each plugin are displayed if a new CollectionView is created.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
6
diff
changeset
|
316 |
a65793e08245
Radio buttons for each plugin are displayed if a new CollectionView is created.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
6
diff
changeset
|
317 |
a65793e08245
Radio buttons for each plugin are displayed if a new CollectionView is created.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
6
diff
changeset
|
318 /** |
71
987567f31200
Adjusted the return type of the CreateCollectionService and added code to react on Collection changes (like output modes).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
319 * Returns the artifact that is used for the parameterization. |
987567f31200
Adjusted the return type of the CreateCollectionService and added code to react on Collection changes (like output modes).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
320 * |
987567f31200
Adjusted the return type of the CreateCollectionService and added code to react on Collection changes (like output modes).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
321 * @return the artifact that is used for the parameterization. |
987567f31200
Adjusted the return type of the CreateCollectionService and added code to react on Collection changes (like output modes).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
322 */ |
521
fc60822e9c89
Added a new package 'chart' that should be the place where chart relevant classes should be stored. Moved ChartOutputTab into that package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
513
diff
changeset
|
323 public Artifact getArtifact() { |
71
987567f31200
Adjusted the return type of the CreateCollectionService and added code to react on Collection changes (like output modes).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
324 return artifact; |
987567f31200
Adjusted the return type of the CreateCollectionService and added code to react on Collection changes (like output modes).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
325 } |
987567f31200
Adjusted the return type of the CreateCollectionService and added code to react on Collection changes (like output modes).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
326 |
864
c0e13cf826d7
Cosmetics, doc.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
862
diff
changeset
|
327 |
811
8fa303586f14
Pass user id to the meta data service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
809
diff
changeset
|
328 public User getUser() { |
8fa303586f14
Pass user id to the meta data service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
809
diff
changeset
|
329 return getFlys().getCurrentUser(); |
8fa303586f14
Pass user id to the meta data service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
809
diff
changeset
|
330 } |
8fa303586f14
Pass user id to the meta data service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
809
diff
changeset
|
331 |
71
987567f31200
Adjusted the return type of the CreateCollectionService and added code to react on Collection changes (like output modes).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
332 |
987567f31200
Adjusted the return type of the CreateCollectionService and added code to react on Collection changes (like output modes).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
333 /** |
30
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
26
diff
changeset
|
334 * Set the current artifact that is the master of the parameterization. |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
26
diff
changeset
|
335 * |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
26
diff
changeset
|
336 * @param artifact The new artifact. |
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
26
diff
changeset
|
337 */ |
521
fc60822e9c89
Added a new package 'chart' that should be the place where chart relevant classes should be stored. Moved ChartOutputTab into that package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
513
diff
changeset
|
338 public void setArtifact(Artifact artifact) { |
30
5709bd8f4d7c
Added a new widget that combines the module and the river selection. Users can now choose the desired plugin and river in one step.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
26
diff
changeset
|
339 this.artifact = artifact; |
862
c9549074ecd1
Parse Artifact's 'background-processing' attribute and lock the UI if this attribute is true.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
847
diff
changeset
|
340 |
c9549074ecd1
Parse Artifact's 'background-processing' attribute and lock the UI if this attribute is true.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
847
diff
changeset
|
341 onArtifactChanged(artifact); |
c9549074ecd1
Parse Artifact's 'background-processing' attribute and lock the UI if this attribute is true.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
847
diff
changeset
|
342 } |
c9549074ecd1
Parse Artifact's 'background-processing' attribute and lock the UI if this attribute is true.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
847
diff
changeset
|
343 |
c9549074ecd1
Parse Artifact's 'background-processing' attribute and lock the UI if this attribute is true.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
847
diff
changeset
|
344 |
c9549074ecd1
Parse Artifact's 'background-processing' attribute and lock the UI if this attribute is true.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
847
diff
changeset
|
345 public void onArtifactChanged(Artifact artifact) { |
1270
ea9a73782de4
Bugfix: #321 Refresh the parameter list after a calculation is finished.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1261
diff
changeset
|
346 artifactChanged(); |
ea9a73782de4
Bugfix: #321 Refresh the parameter list after a calculation is finished.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1261
diff
changeset
|
347 |
862
c9549074ecd1
Parse Artifact's 'background-processing' attribute and lock the UI if this attribute is true.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
847
diff
changeset
|
348 if (artifact.isInBackground()) { |
1432
40f4137a2c31
Added a cancel button to the LoadingPanel which stops running WSPLGEN calculations (realized by returning to the previous state).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1425
diff
changeset
|
349 LoadingPanel p = new LoadingPanel(this, artifact); |
40f4137a2c31
Added a cancel button to the LoadingPanel which stops running WSPLGEN calculations (realized by returning to the previous state).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1425
diff
changeset
|
350 p.addStepBackHandler(parameterList); |
862
c9549074ecd1
Parse Artifact's 'background-processing' attribute and lock the UI if this attribute is true.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
847
diff
changeset
|
351 } |
36
3cacc9d2dd01
CollectionView implements HasParameterChangeHandler and ParameterChangeHandler interfaces.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
32
diff
changeset
|
352 } |
3cacc9d2dd01
CollectionView implements HasParameterChangeHandler and ParameterChangeHandler interfaces.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
32
diff
changeset
|
353 |
3cacc9d2dd01
CollectionView implements HasParameterChangeHandler and ParameterChangeHandler interfaces.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
32
diff
changeset
|
354 |
3cacc9d2dd01
CollectionView implements HasParameterChangeHandler and ParameterChangeHandler interfaces.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
32
diff
changeset
|
355 /** |
3cacc9d2dd01
CollectionView implements HasParameterChangeHandler and ParameterChangeHandler interfaces.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
32
diff
changeset
|
356 * Implements the onCollectionChange() method to do update the GUI after the |
3cacc9d2dd01
CollectionView implements HasParameterChangeHandler and ParameterChangeHandler interfaces.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
32
diff
changeset
|
357 * parameterization has changed. |
3cacc9d2dd01
CollectionView implements HasParameterChangeHandler and ParameterChangeHandler interfaces.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
32
diff
changeset
|
358 * |
3cacc9d2dd01
CollectionView implements HasParameterChangeHandler and ParameterChangeHandler interfaces.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
32
diff
changeset
|
359 * @param event The ParameterChangeEvent. |
3cacc9d2dd01
CollectionView implements HasParameterChangeHandler and ParameterChangeHandler interfaces.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
32
diff
changeset
|
360 */ |
3cacc9d2dd01
CollectionView implements HasParameterChangeHandler and ParameterChangeHandler interfaces.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
32
diff
changeset
|
361 public void onParameterChange(ParameterChangeEvent event) { |
100
95b30a5d6350
Bugfix: A collection view just creates a single time a new collection - even if we step back to a previous state and go forward afterwards.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
92
diff
changeset
|
362 GWT.log("CollectionView.onParameterChange"); |
1270
ea9a73782de4
Bugfix: #321 Refresh the parameter list after a calculation is finished.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1261
diff
changeset
|
363 setArtifact(event.getNewValue()); |
ea9a73782de4
Bugfix: #321 Refresh the parameter list after a calculation is finished.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1261
diff
changeset
|
364 } |
100
95b30a5d6350
Bugfix: A collection view just creates a single time a new collection - even if we step back to a previous state and go forward afterwards.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
92
diff
changeset
|
365 |
1270
ea9a73782de4
Bugfix: #321 Refresh the parameter list after a calculation is finished.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1261
diff
changeset
|
366 |
ea9a73782de4
Bugfix: #321 Refresh the parameter list after a calculation is finished.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1261
diff
changeset
|
367 protected void artifactChanged() { |
ea9a73782de4
Bugfix: #321 Refresh the parameter list after a calculation is finished.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
1261
diff
changeset
|
368 ArtifactDescription desc = getArtifact().getArtifactDescription(); |
71
987567f31200
Adjusted the return type of the CreateCollectionService and added code to react on Collection changes (like output modes).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
369 OutputMode[] outs = desc.getOutputModes(); |
1515 | 370 final Recommendation[] recom = desc.getRecommendations(); |
803
653ae84533e7
Read/create recommended Artifacts and add them to the current Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
796
diff
changeset
|
371 |
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:
228
diff
changeset
|
372 Collection c = getCollection(); |
100
95b30a5d6350
Bugfix: A collection view just creates a single time a new collection - even if we step back to a previous state and go forward afterwards.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
92
diff
changeset
|
373 |
908
a680ccec5dd6
Create new collections initially when starting a new project.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
864
diff
changeset
|
374 if (c != null) { |
100
95b30a5d6350
Bugfix: A collection view just creates a single time a new collection - even if we step back to a previous state and go forward afterwards.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
92
diff
changeset
|
375 Config config = Config.getInstance(); |
229
924da6695800
Each service is now called with the name of the current locale to set the request object's locale manually in the HttpClient.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
228
diff
changeset
|
376 String locale = config.getLocale(); |
100
95b30a5d6350
Bugfix: A collection view just creates a single time a new collection - even if we step back to a previous state and go forward afterwards.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
92
diff
changeset
|
377 |
1425
bc06a671ef60
Removed the URL parameter from service calls. The service
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1294
diff
changeset
|
378 describeCollectionService.describe(c.identifier(), locale, |
100
95b30a5d6350
Bugfix: A collection view just creates a single time a new collection - even if we step back to a previous state and go forward afterwards.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
92
diff
changeset
|
379 new AsyncCallback<Collection>() { |
95b30a5d6350
Bugfix: A collection view just creates a single time a new collection - even if we step back to a previous state and go forward afterwards.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
92
diff
changeset
|
380 public void onFailure(Throwable caught) { |
95b30a5d6350
Bugfix: A collection view just creates a single time a new collection - even if we step back to a previous state and go forward afterwards.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
92
diff
changeset
|
381 GWT.log("Could not DESCRIBE collection."); |
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
|
382 SC.warn(messages.getString(caught.getMessage())); |
100
95b30a5d6350
Bugfix: A collection view just creates a single time a new collection - even if we step back to a previous state and go forward afterwards.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
92
diff
changeset
|
383 } |
95b30a5d6350
Bugfix: A collection view just creates a single time a new collection - even if we step back to a previous state and go forward afterwards.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
92
diff
changeset
|
384 |
95b30a5d6350
Bugfix: A collection view just creates a single time a new collection - even if we step back to a previous state and go forward afterwards.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
92
diff
changeset
|
385 |
95b30a5d6350
Bugfix: A collection view just creates a single time a new collection - even if we step back to a previous state and go forward afterwards.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
92
diff
changeset
|
386 public void onSuccess(Collection newCollection) { |
95b30a5d6350
Bugfix: A collection view just creates a single time a new collection - even if we step back to a previous state and go forward afterwards.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
92
diff
changeset
|
387 GWT.log("Successfully DESCRIBED collection."); |
1515 | 388 boolean loaded = true; |
389 for (Recommendation r: recom) { | |
390 if(!newCollection.loadedRecommendation(r)) { | |
391 loaded = false; | |
392 } | |
1512 | 393 } |
1515 | 394 if (!loaded) { |
395 loadRecommendedArtifacts(recom); | |
1512 | 396 } |
1525
27a2a065a963
Set the collection if all recommended artifacts are loaded or the
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1515
diff
changeset
|
397 else { |
27a2a065a963
Set the collection if all recommended artifacts are loaded or the
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1515
diff
changeset
|
398 setCollection(newCollection); |
27a2a065a963
Set the collection if all recommended artifacts are loaded or the
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1515
diff
changeset
|
399 } |
100
95b30a5d6350
Bugfix: A collection view just creates a single time a new collection - even if we step back to a previous state and go forward afterwards.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
92
diff
changeset
|
400 } |
95b30a5d6350
Bugfix: A collection view just creates a single time a new collection - even if we step back to a previous state and go forward afterwards.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
92
diff
changeset
|
401 } |
95b30a5d6350
Bugfix: A collection view just creates a single time a new collection - even if we step back to a previous state and go forward afterwards.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
92
diff
changeset
|
402 ); |
95b30a5d6350
Bugfix: A collection view just creates a single time a new collection - even if we step back to a previous state and go forward afterwards.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
92
diff
changeset
|
403 } |
71
987567f31200
Adjusted the return type of the CreateCollectionService and added code to react on Collection changes (like output modes).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
404 else { |
987567f31200
Adjusted the return type of the CreateCollectionService and added code to react on Collection changes (like output modes).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
405 updateView(); |
987567f31200
Adjusted the return type of the CreateCollectionService and added code to react on Collection changes (like output modes).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
60
diff
changeset
|
406 } |
6
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
407 } |
13
8d9075c07667
Enhanced the CollectionView: there are radio buttons for each module and a button to select one of those.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
7
diff
changeset
|
408 |
8d9075c07667
Enhanced the CollectionView: there are radio buttons for each module and a button to select one of those.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
7
diff
changeset
|
409 |
8d9075c07667
Enhanced the CollectionView: there are radio buttons for each module and a button to select one of those.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
7
diff
changeset
|
410 /** |
74
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
411 * Returns the collection of displayed by this view. |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
412 * |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
413 * @return the collection of this view. |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
414 */ |
537
d2c37ba78feb
The collection object in the CollectionView is now accessible via getter method.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
521
diff
changeset
|
415 public Collection getCollection() { |
74
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
416 return collection; |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
417 } |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
418 |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
419 |
908
a680ccec5dd6
Create new collections initially when starting a new project.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
864
diff
changeset
|
420 protected void setCollection(Collection collection) { |
a680ccec5dd6
Create new collections initially when starting a new project.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
864
diff
changeset
|
421 setCollection(collection, false); |
a680ccec5dd6
Create new collections initially when starting a new project.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
864
diff
changeset
|
422 } |
a680ccec5dd6
Create new collections initially when starting a new project.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
864
diff
changeset
|
423 |
a680ccec5dd6
Create new collections initially when starting a new project.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
864
diff
changeset
|
424 |
74
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
425 /** |
19
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
426 * Set the current collection. |
13
8d9075c07667
Enhanced the CollectionView: there are radio buttons for each module and a button to select one of those.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
7
diff
changeset
|
427 * |
19
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
428 * @param collection The new collection. |
1557
964e90c5b4c1
Invested 2 seconds after losing 3.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
1539
diff
changeset
|
429 * @param suppress Whether to fire a collectionchangeevent. |
13
8d9075c07667
Enhanced the CollectionView: there are radio buttons for each module and a button to select one of those.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
7
diff
changeset
|
430 */ |
908
a680ccec5dd6
Create new collections initially when starting a new project.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
864
diff
changeset
|
431 protected void setCollection(Collection collection, boolean suppress) { |
601
3cf6ee30207c
Register newly created CollectionViews at FLYSWorkspace to avoid an inconsistent view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
593
diff
changeset
|
432 if (collection != null && this.collection == null) { |
3cf6ee30207c
Register newly created CollectionViews at FLYSWorkspace to avoid an inconsistent view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
593
diff
changeset
|
433 flys.getWorkspace().addView(collection.identifier(), this); |
3cf6ee30207c
Register newly created CollectionViews at FLYSWorkspace to avoid an inconsistent view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
593
diff
changeset
|
434 } |
3cf6ee30207c
Register newly created CollectionViews at FLYSWorkspace to avoid an inconsistent view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
593
diff
changeset
|
435 |
19
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
436 Collection tmp = this.collection; |
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
437 this.collection = collection; |
13
8d9075c07667
Enhanced the CollectionView: there are radio buttons for each module and a button to select one of those.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
7
diff
changeset
|
438 |
820
912379835298
UI: Set CollectionViews ("Window") title to include UUID of Collection.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
819
diff
changeset
|
439 setTitle(collection.getName() + " (UUID: " + collection.identifier() + ")"); |
908
a680ccec5dd6
Create new collections initially when starting a new project.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
864
diff
changeset
|
440 |
a680ccec5dd6
Create new collections initially when starting a new project.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
864
diff
changeset
|
441 if (!suppress) { |
a680ccec5dd6
Create new collections initially when starting a new project.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
864
diff
changeset
|
442 fireCollectionChangeEvent(tmp, this.collection); |
a680ccec5dd6
Create new collections initially when starting a new project.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
864
diff
changeset
|
443 } |
19
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
444 } |
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
445 |
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
446 |
f48b2cb2e219
The CollectionView implements the HasCollectionChangeHandlers interface now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
14
diff
changeset
|
447 public void onCollectionChange(CollectionChangeEvent event) { |
809
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
448 if (artifactsQueue > 0) { |
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
449 GWT.log("Do not update UI because we are still loading Artifacts."); |
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
450 return; |
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
451 } |
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
452 |
74
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
453 Collection newCol = event.getNewValue(); |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
454 |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
455 Map<String, OutputMode> outs = newCol.getOutputModes(); |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
456 |
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:
437
diff
changeset
|
457 Set<String> keys = outs.keySet(); |
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:
437
diff
changeset
|
458 OutputMode[] prepared = 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:
437
diff
changeset
|
459 |
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:
437
diff
changeset
|
460 int idx = 0; |
74
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
461 for (String outname: keys) { |
513
e090fbd5a535
Added a mechanism to listen to changes relating to output modes of collections and artifacts. Solves a part of ISSUE-62.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
437
diff
changeset
|
462 prepared[idx++] = outs.get(outname); |
74
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
463 } |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
464 |
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:
437
diff
changeset
|
465 fireOutputModesChangeEvent(prepared); |
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:
437
diff
changeset
|
466 |
13
8d9075c07667
Enhanced the CollectionView: there are radio buttons for each module and a button to select one of those.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
7
diff
changeset
|
467 updateView(); |
8d9075c07667
Enhanced the CollectionView: there are radio buttons for each module and a button to select one of those.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
7
diff
changeset
|
468 } |
8d9075c07667
Enhanced the CollectionView: there are radio buttons for each module and a button to select one of those.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
7
diff
changeset
|
469 |
8d9075c07667
Enhanced the CollectionView: there are radio buttons for each module and a button to select one of those.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
7
diff
changeset
|
470 |
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:
437
diff
changeset
|
471 public void onOutputModesChange(OutputModesChangeEvent event) { |
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:
611
diff
changeset
|
472 clearOutputTabs(); |
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:
437
diff
changeset
|
473 OutputMode[] outs = event.getOutputModes(); |
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:
437
diff
changeset
|
474 |
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:
437
diff
changeset
|
475 if (outs == null) { |
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:
437
diff
changeset
|
476 return; |
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:
437
diff
changeset
|
477 } |
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:
437
diff
changeset
|
478 |
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:
611
diff
changeset
|
479 boolean hasCSV = 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:
611
diff
changeset
|
480 |
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:
437
diff
changeset
|
481 for (OutputMode out: outs) { |
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:
437
diff
changeset
|
482 addOutputTab(out.getName(), out); |
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:
611
diff
changeset
|
483 |
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:
611
diff
changeset
|
484 if (out instanceof ExportMode) { |
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:
611
diff
changeset
|
485 ExportMode export = (ExportMode) out; |
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:
611
diff
changeset
|
486 |
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:
611
diff
changeset
|
487 if (export.getFacet("csv") != null) { |
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:
611
diff
changeset
|
488 hasCSV = 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:
611
diff
changeset
|
489 } |
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:
611
diff
changeset
|
490 } |
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:
611
diff
changeset
|
491 } |
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:
611
diff
changeset
|
492 |
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:
611
diff
changeset
|
493 if (!hasCSV) { |
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:
611
diff
changeset
|
494 parameterList.removeTable(); |
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:
437
diff
changeset
|
495 } |
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:
437
diff
changeset
|
496 } |
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:
437
diff
changeset
|
497 |
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:
437
diff
changeset
|
498 |
36
3cacc9d2dd01
CollectionView implements HasParameterChangeHandler and ParameterChangeHandler interfaces.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
32
diff
changeset
|
499 /** |
74
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
500 * Adds a new tab for the OutputMode <i>out</i>. |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
501 * |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
502 * @param name The name and title of the output. |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
503 */ |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
504 protected void addOutputTab(String name, OutputMode out) { |
270
d01b0d81b92a
Parse the facets of a Collection and distinguish between an ordinary OutputMode and an ExportMode (new).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
260
diff
changeset
|
505 if (out instanceof ExportMode) { |
d01b0d81b92a
Parse the facets of a Collection and distinguish between an ordinary OutputMode and an ExportMode (new).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
260
diff
changeset
|
506 ExportMode export = (ExportMode) out; |
256
5e1c1b7d6516
Added table and service for calculation output to UI.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
239
diff
changeset
|
507 |
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:
611
diff
changeset
|
508 if (export.getFacet("csv") != null && !parameterList.hasTable()) { |
270
d01b0d81b92a
Parse the facets of a Collection and distinguish between an ordinary OutputMode and an ExportMode (new).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
260
diff
changeset
|
509 TableDataPanel p = new TableDataPanel(); |
d01b0d81b92a
Parse the facets of a Collection and distinguish between an ordinary OutputMode and an ExportMode (new).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
260
diff
changeset
|
510 p.setUuid(collection.identifier()); |
d01b0d81b92a
Parse the facets of a Collection and distinguish between an ordinary OutputMode and an ExportMode (new).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
260
diff
changeset
|
511 p.setName(out.getName()); |
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:
611
diff
changeset
|
512 parameterList.setTable(p); |
270
d01b0d81b92a
Parse the facets of a Collection and distinguish between an ordinary OutputMode and an ExportMode (new).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
260
diff
changeset
|
513 } |
d01b0d81b92a
Parse the facets of a Collection and distinguish between an ordinary OutputMode and an ExportMode (new).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
260
diff
changeset
|
514 |
239
47fe77a1bac7
Added new i18n strings for new output modes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
229
diff
changeset
|
515 return; |
47fe77a1bac7
Added new i18n strings for new output modes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
229
diff
changeset
|
516 } |
47fe77a1bac7
Added new i18n strings for new output modes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
229
diff
changeset
|
517 |
593
c0477626ae6a
#156 Do not display report modes as tabs in the project view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
582
diff
changeset
|
518 if (out instanceof ReportMode) { |
c0477626ae6a
#156 Do not display report modes as tabs in the project view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
582
diff
changeset
|
519 // we don't want to display report modes at all |
c0477626ae6a
#156 Do not display report modes as tabs in the project view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
582
diff
changeset
|
520 return; |
c0477626ae6a
#156 Do not display report modes as tabs in the project view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
582
diff
changeset
|
521 } |
c0477626ae6a
#156 Do not display report modes as tabs in the project view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
582
diff
changeset
|
522 |
74
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
523 GWT.log("Add new output tab for '" + name + "'"); |
75
571843833129
Added a panel that will be used to display chart output.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
74
diff
changeset
|
524 |
796
cd8603aaa730
Improved the process of creating OutputTabs. Added support for map output.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
788
diff
changeset
|
525 String title = messages.getString(name); |
cd8603aaa730
Improved the process of creating OutputTabs. Added support for map output.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
788
diff
changeset
|
526 OutputTab tab = out.createOutputTab(title, getCollection(), this); |
cd8603aaa730
Improved the process of creating OutputTabs. Added support for map output.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
788
diff
changeset
|
527 |
cd8603aaa730
Improved the process of creating OutputTabs. Added support for map output.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
788
diff
changeset
|
528 if (tab != null) { |
cd8603aaa730
Improved the process of creating OutputTabs. Added support for map output.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
788
diff
changeset
|
529 outputTabs.put(name, tab); |
cd8603aaa730
Improved the process of creating OutputTabs. Added support for map output.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
788
diff
changeset
|
530 } |
74
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
531 } |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
532 |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
533 |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
534 /** |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
535 * Removes all output mode tabs from tab bar. |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
536 */ |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
537 protected void clearOutputTabs() { |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
538 GWT.log("Clear OutputTabs."); |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
539 |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
540 int num = tabs.getNumTabs(); |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
541 |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
542 for (int i = num-1; i >= 1; i--) { |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
543 tabs.removeTab(i); |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
544 } |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
545 |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
546 outputTabs.clear(); |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
547 } |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
548 |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
549 |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
550 /** |
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:
19
diff
changeset
|
551 * Update the view (refresh the list of old and current data). |
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:
19
diff
changeset
|
552 */ |
13
8d9075c07667
Enhanced the CollectionView: there are radio buttons for each module and a button to select one of those.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
7
diff
changeset
|
553 protected void updateView() { |
36
3cacc9d2dd01
CollectionView implements HasParameterChangeHandler and ParameterChangeHandler interfaces.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
32
diff
changeset
|
554 GWT.log("CollectionView.updateView()"); |
74
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
555 updateOutputTabs(); |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
556 } |
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:
19
diff
changeset
|
557 |
74
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
558 |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
559 /** |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
560 * This method is used to update the tabs to show specific output modes. |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
561 */ |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
562 protected void updateOutputTabs() { |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
563 GWT.log("Update output tabs."); |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
564 if (outputTabs != null) { |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
565 Set<String> keys = outputTabs.keySet(); |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
566 |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
567 for (String key: keys) { |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
568 tabs.addTab(outputTabs.get(key)); |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
569 } |
c5586446f3c0
Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
73
diff
changeset
|
570 } |
13
8d9075c07667
Enhanced the CollectionView: there are radio buttons for each module and a button to select one of those.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
7
diff
changeset
|
571 } |
557
92c200887b20
#21 There might be just a single window for each project now. Users can't open a project twice.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
537
diff
changeset
|
572 |
92c200887b20
#21 There might be just a single window for each project now. Users can't open a project twice.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
537
diff
changeset
|
573 |
92c200887b20
#21 There might be just a single window for each project now. Users can't open a project twice.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
537
diff
changeset
|
574 public void onCloseClick(CloseClientEvent event) { |
611
854312c0528c
#21 Newly created projects cannot be opened twice.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
601
diff
changeset
|
575 if (collection != null) { |
854312c0528c
#21 Newly created projects cannot be opened twice.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
601
diff
changeset
|
576 flys.closeProject(collection.identifier()); |
854312c0528c
#21 Newly created projects cannot be opened twice.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
601
diff
changeset
|
577 } |
854312c0528c
#21 Newly created projects cannot be opened twice.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
601
diff
changeset
|
578 else { |
854312c0528c
#21 Newly created projects cannot be opened twice.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
601
diff
changeset
|
579 hide(); |
854312c0528c
#21 Newly created projects cannot be opened twice.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
601
diff
changeset
|
580 destroy(); |
854312c0528c
#21 Newly created projects cannot be opened twice.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
601
diff
changeset
|
581 } |
557
92c200887b20
#21 There might be just a single window for each project now. Users can't open a project twice.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
537
diff
changeset
|
582 } |
803
653ae84533e7
Read/create recommended Artifacts and add them to the current Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
796
diff
changeset
|
583 |
653ae84533e7
Read/create recommended Artifacts and add them to the current Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
796
diff
changeset
|
584 |
1515 | 585 public void addArtifactToCollection(Artifact artifact) { |
803
653ae84533e7
Read/create recommended Artifacts and add them to the current Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
796
diff
changeset
|
586 Config config = Config.getInstance(); |
653ae84533e7
Read/create recommended Artifacts and add them to the current Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
796
diff
changeset
|
587 final String locale = config.getLocale(); |
653ae84533e7
Read/create recommended Artifacts and add them to the current Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
796
diff
changeset
|
588 final Collection collection = getCollection(); |
653ae84533e7
Read/create recommended Artifacts and add them to the current Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
796
diff
changeset
|
589 |
653ae84533e7
Read/create recommended Artifacts and add them to the current Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
796
diff
changeset
|
590 addArtifactService.add( |
1425
bc06a671ef60
Removed the URL parameter from service calls. The service
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1294
diff
changeset
|
591 collection, artifact, locale, |
803
653ae84533e7
Read/create recommended Artifacts and add them to the current Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
796
diff
changeset
|
592 new AsyncCallback<Collection>() { |
653ae84533e7
Read/create recommended Artifacts and add them to the current Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
796
diff
changeset
|
593 public void onFailure(Throwable caught) { |
653ae84533e7
Read/create recommended Artifacts and add them to the current Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
796
diff
changeset
|
594 GWT.log("An error occured while adding artifact."); |
653ae84533e7
Read/create recommended Artifacts and add them to the current Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
796
diff
changeset
|
595 SC.warn(messages.getString(caught.getMessage())); |
653ae84533e7
Read/create recommended Artifacts and add them to the current Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
796
diff
changeset
|
596 } |
653ae84533e7
Read/create recommended Artifacts and add them to the current Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
796
diff
changeset
|
597 |
653ae84533e7
Read/create recommended Artifacts and add them to the current Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
796
diff
changeset
|
598 public void onSuccess(Collection newCollection) { |
1515 | 599 GWT.log("Successfully added artifacts."); |
1539
28e514c968d6
Suppress onCollectionChange event if an artifact is added to the collection
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1525
diff
changeset
|
600 setCollection(newCollection, true); |
809
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
601 } |
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
602 } |
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
603 ); |
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
604 } |
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
605 |
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
606 |
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
607 protected void addRecommendationsToCollection() { |
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
608 Config config = Config.getInstance(); |
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
609 final String locale = config.getLocale(); |
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
610 final Collection collection = getCollection(); |
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
611 |
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
612 collection.addRecommendations(newRecommendations); |
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
613 |
1425
bc06a671ef60
Removed the URL parameter from service calls. The service
Raimund Renkert <raimund.renkert@intevation.de>
parents:
1294
diff
changeset
|
614 updater.update(collection, locale, |
809
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
615 new AsyncCallback<Collection>() { |
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
616 public void onFailure(Throwable caught) { |
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
617 newRecommendations.removeAllElements(); |
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
618 setCollection(collection); |
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
619 |
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
620 GWT.log("An error occured while saving recommendations."); |
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
621 // TODO POPUP WARNING |
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
622 } |
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
623 |
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
624 public void onSuccess(Collection newCol) { |
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
625 GWT.log("Successfully saved recommendations."); |
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
626 newRecommendations.removeAllElements(); |
1515 | 627 setCollection(newCol); |
803
653ae84533e7
Read/create recommended Artifacts and add them to the current Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
796
diff
changeset
|
628 } |
653ae84533e7
Read/create recommended Artifacts and add them to the current Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
796
diff
changeset
|
629 } |
653ae84533e7
Read/create recommended Artifacts and add them to the current Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
796
diff
changeset
|
630 ); |
653ae84533e7
Read/create recommended Artifacts and add them to the current Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
796
diff
changeset
|
631 } |
653ae84533e7
Read/create recommended Artifacts and add them to the current Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
796
diff
changeset
|
632 |
653ae84533e7
Read/create recommended Artifacts and add them to the current Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
796
diff
changeset
|
633 |
807
6f65e70fa11d
Repaired broken recommendation parsing from Artifact's DESCRIBE document (which structure has changed).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
803
diff
changeset
|
634 protected void loadRecommendedArtifacts(Recommendation[] recommendations) { |
803
653ae84533e7
Read/create recommended Artifacts and add them to the current Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
796
diff
changeset
|
635 Config config = Config.getInstance(); |
653ae84533e7
Read/create recommended Artifacts and add them to the current Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
796
diff
changeset
|
636 final String locale = config.getLocale(); |
653ae84533e7
Read/create recommended Artifacts and add them to the current Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
796
diff
changeset
|
637 final Collection collection = getCollection(); |
653ae84533e7
Read/create recommended Artifacts and add them to the current Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
796
diff
changeset
|
638 |
847
25a4bf390757
Loading recommendations: If no reference artifact is given use current
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
845
diff
changeset
|
639 Artifact masterArtifact = getArtifact(); |
25a4bf390757
Loading recommendations: If no reference artifact is given use current
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
845
diff
changeset
|
640 |
819
11fd6557d0fc
UI: Cosmetics in log messages of CollectionView.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
811
diff
changeset
|
641 if (recommendations == null) { |
11fd6557d0fc
UI: Cosmetics in log messages of CollectionView.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
811
diff
changeset
|
642 GWT.log("WARNING: Currently no recommendations."); |
11fd6557d0fc
UI: Cosmetics in log messages of CollectionView.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
811
diff
changeset
|
643 return; |
11fd6557d0fc
UI: Cosmetics in log messages of CollectionView.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
811
diff
changeset
|
644 } |
11fd6557d0fc
UI: Cosmetics in log messages of CollectionView.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
811
diff
changeset
|
645 |
809
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
646 for (final Recommendation recommendation: recommendations) { |
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
647 if (collection.loadedRecommendation(recommendation)) { |
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
648 continue; |
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
649 } |
1515 | 650 newRecommendations.push(recommendation); |
809
e9337488bac3
The Collection now knows its already loaded recommendations - the CollectionView will not load recommendations that have already been loaded before.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
807
diff
changeset
|
651 |
847
25a4bf390757
Loading recommendations: If no reference artifact is given use current
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
845
diff
changeset
|
652 // XXX: UGLY! If no reference artifact given use uuid of |
25a4bf390757
Loading recommendations: If no reference artifact is given use current
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
845
diff
changeset
|
653 // current artifact as reference. |
25a4bf390757
Loading recommendations: If no reference artifact is given use current
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
845
diff
changeset
|
654 if (recommendation.getMasterArtifact() == null) { |
25a4bf390757
Loading recommendations: If no reference artifact is given use current
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
845
diff
changeset
|
655 recommendation.setMasterArtifact(masterArtifact.getUuid()); |
25a4bf390757
Loading recommendations: If no reference artifact is given use current
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
845
diff
changeset
|
656 } |
25a4bf390757
Loading recommendations: If no reference artifact is given use current
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
845
diff
changeset
|
657 |
1515 | 658 } |
807
6f65e70fa11d
Repaired broken recommendation parsing from Artifact's DESCRIBE document (which structure has changed).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
803
diff
changeset
|
659 |
1515 | 660 loadArtifactService.loadMany( |
661 collection, | |
662 recommendations, | |
663 null, | |
664 locale, | |
665 new AsyncCallback<Artifact[]>() { | |
666 public void onFailure(Throwable caught) { | |
667 GWT.log("Error loading recommendations: " + | |
668 caught.getMessage()); | |
669 } | |
803
653ae84533e7
Read/create recommended Artifacts and add them to the current Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
796
diff
changeset
|
670 |
1515 | 671 public void onSuccess(Artifact[] artifacts) { |
672 GWT.log("Loaded artifacts: " + artifacts.length); | |
673 addRecommendationsToCollection(); | |
674 } | |
675 }); | |
803
653ae84533e7
Read/create recommended Artifacts and add them to the current Collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
796
diff
changeset
|
676 } |
915
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
908
diff
changeset
|
677 |
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
908
diff
changeset
|
678 |
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
908
diff
changeset
|
679 public void registerTabHandler(TabSelectedHandler tse) { |
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
908
diff
changeset
|
680 tabs.addTabSelectedHandler(tse); |
89a47098bcbd
Hide geometry layer in floodmap when tab selection changes.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
908
diff
changeset
|
681 } |
6
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
682 } |
e2b3966b40ca
Added a workspace that handles the collection windows. New button to open a new collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
683 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |