comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/FLYSWorkspace.java @ 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. flys-client/trunk@1614 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 30 Mar 2011 07:40:53 +0000
parents e2b3966b40ca
children 905daf30221a
comparison
equal deleted inserted replaced
99:5c3d685546a6 100:95b30a5d6350
1 package de.intevation.flys.client.client.ui; 1 package de.intevation.flys.client.client.ui;
2 2
3 import com.smartgwt.client.widgets.Canvas; 3 import com.smartgwt.client.widgets.Canvas;
4 4
5 import java.util.HashMap; 5 import java.util.ArrayList;
6 import java.util.Map; 6 import java.util.List;
7 7
8 8
9 /** 9 /**
10 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> 10 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
11 */ 11 */
12 public class FLYSWorkspace extends Canvas { 12 public class FLYSWorkspace extends Canvas {
13 13
14 /** A map that contains the open CollectionViews. */ 14 /** A map that contains the open CollectionViews. */
15 protected Map<String, CollectionView> views; 15 protected List<CollectionView> views;
16 16
17 17
18 /** 18 /**
19 * The default constructor creates an empty FLYSWorkspace with no 19 * The default constructor creates an empty FLYSWorkspace with no
20 * CollectionViews opened. 20 * CollectionViews opened.
21 */ 21 */
22 public FLYSWorkspace() { 22 public FLYSWorkspace() {
23 views = new HashMap<String, CollectionView>(); 23 views = new ArrayList<CollectionView>();
24 } 24 }
25 25
26 26
27 /** 27 /**
28 * This method adds a new CollectionView to this workspace and stores a 28 * This method adds a new CollectionView to this workspace and stores a
29 * reference in {@link views}. 29 * reference in {@link views}.
30 * 30 *
31 * @param collectionView A new CollectionView. 31 * @param collectionView A new CollectionView.
32 */ 32 */
33 public void addView(String uuid, CollectionView collectionView) { 33 public void addView(CollectionView collectionView) {
34 views.put(uuid, collectionView); 34 views.add(collectionView);
35
36 addChild(collectionView); 35 addChild(collectionView);
37 } 36 }
38 } 37 }
39 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 38 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org