comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/OutputTab.java @ 1364:9981ba2ee13a

Display the datacage button in the map toolbar. flys-client/trunk@3063 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Mon, 24 Oct 2011 13:35:30 +0000
parents cd286de8f2ad
children 96708d81eaf6
comparison
equal deleted inserted replaced
1363:9da7fdfbb80e 1364:9981ba2ee13a
1 package de.intevation.flys.client.client.ui; 1 package de.intevation.flys.client.client.ui;
2 2
3 import com.smartgwt.client.widgets.Label; 3 import com.smartgwt.client.widgets.Label;
4 import com.smartgwt.client.widgets.tab.Tab; 4 import com.smartgwt.client.widgets.tab.Tab;
5 5
6 import de.intevation.flys.client.shared.model.Artifact;
6 import de.intevation.flys.client.shared.model.Collection; 7 import de.intevation.flys.client.shared.model.Collection;
7 import de.intevation.flys.client.shared.model.OutputMode; 8 import de.intevation.flys.client.shared.model.OutputMode;
8 9
9 10
10 public class OutputTab extends Tab { 11 public class OutputTab extends Tab {
13 protected OutputMode mode; 14 protected OutputMode mode;
14 15
15 /** The Collection that should be displayed in this tab.*/ 16 /** The Collection that should be displayed in this tab.*/
16 protected Collection collection; 17 protected Collection collection;
17 18
19 /** The CollectionView. */
20 protected CollectionView collectionView;
21
18 22
19 /** 23 /**
20 * The default constructor that creates a new Tab for displaying a specific 24 * The default constructor that creates a new Tab for displaying a specific
21 * OutputMode of a Collection. 25 * OutputMode of a Collection.
22 * 26 *
23 * @param title The title of the tab. 27 * @param title The title of the tab.
24 * @param collection The collection that need to be displayed. 28 * @param collection The collection that need to be displayed.
25 * @param outputmode The OutputMode that need to be displayed. 29 * @param outputmode The OutputMode that need to be displayed.
26 */ 30 */
27 public OutputTab(String title, Collection collection, OutputMode mode) { 31 public OutputTab(
32 String title,
33 Collection collection,
34 CollectionView collectionView,
35 OutputMode mode
36 ) {
28 super(title); 37 super(title);
29 38
30 this.collection = collection; 39 this.collection = collection;
31 this.mode = mode; 40 this.mode = mode;
41 this.collectionView = collectionView;
32 42
33 setPane(new Label("Implement concrete subclasses to vary the output.")); 43 setPane(new Label("Implement concrete subclasses to vary the output."));
44 }
45
46
47 public CollectionView getCollectionView() {
48 return collectionView;
34 } 49 }
35 50
36 51
37 public String getOutputName() { 52 public String getOutputName() {
38 return mode.getName(); 53 return mode.getName();
39 } 54 }
55
56
57 public Artifact getArtifact() {
58 return getCollectionView().getArtifact();
59 }
40 } 60 }
41 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 61 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org