annotate flys-client/src/main/java/de/intevation/flys/client/client/ui/OutputTab.java @ 4254:33b15ac17fd1

Only create and add GaugePanel when necessary The GaugePanel isn't created always and only show if WINFO and a river is selected now. It is only created on demand. Therefore all access to the GaugePanel is abstraced via methods that check if the GaugePanel is null before accessing it's methods.
author Björn Ricks <bjoern.ricks@intevation.de>
date Thu, 25 Oct 2012 13:58:53 +0200
parents 6a8f83c538e3
children
rev   line source
74
c5586446f3c0 Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
1 package de.intevation.flys.client.client.ui;
c5586446f3c0 Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
2
c5586446f3c0 Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
3 import com.smartgwt.client.widgets.Label;
c5586446f3c0 Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
4 import com.smartgwt.client.widgets.tab.Tab;
c5586446f3c0 Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
5
1364
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 883
diff changeset
6 import de.intevation.flys.client.shared.model.Artifact;
74
c5586446f3c0 Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
7 import de.intevation.flys.client.shared.model.Collection;
c5586446f3c0 Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
8 import de.intevation.flys.client.shared.model.OutputMode;
c5586446f3c0 Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
9
c5586446f3c0 Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10
c5586446f3c0 Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
11 public class OutputTab extends Tab {
c5586446f3c0 Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
12
c5586446f3c0 Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
13 /** The OutputMode that should be displayed in this tab.*/
c5586446f3c0 Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
14 protected OutputMode mode;
c5586446f3c0 Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
15
c5586446f3c0 Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
16 /** The Collection that should be displayed in this tab.*/
c5586446f3c0 Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
17 protected Collection collection;
c5586446f3c0 Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
18
3549
6a8f83c538e3 Merged revisions 5384 via svnmerge from
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1568
diff changeset
19 /** The CollectionView containing this tab. */
1364
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 883
diff changeset
20 protected CollectionView collectionView;
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 883
diff changeset
21
74
c5586446f3c0 Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
22
c5586446f3c0 Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
23 /**
c5586446f3c0 Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
24 * The default constructor that creates a new Tab for displaying a specific
c5586446f3c0 Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
25 * OutputMode of a Collection.
c5586446f3c0 Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
26 *
c5586446f3c0 Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
27 * @param title The title of the tab.
c5586446f3c0 Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
28 * @param collection The collection that need to be displayed.
c5586446f3c0 Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
29 * @param outputmode The OutputMode that need to be displayed.
c5586446f3c0 Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
30 */
1364
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 883
diff changeset
31 public OutputTab(
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 883
diff changeset
32 String title,
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 883
diff changeset
33 Collection collection,
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 883
diff changeset
34 CollectionView collectionView,
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 883
diff changeset
35 OutputMode mode
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 883
diff changeset
36 ) {
74
c5586446f3c0 Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
37 super(title);
c5586446f3c0 Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
38
1364
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 883
diff changeset
39 this.collection = collection;
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 883
diff changeset
40 this.mode = mode;
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 883
diff changeset
41 this.collectionView = collectionView;
74
c5586446f3c0 Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
42
c5586446f3c0 Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
43 setPane(new Label("Implement concrete subclasses to vary the output."));
c5586446f3c0 Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
44 }
883
cd286de8f2ad Datacage window in Output tabs fetches information for the current output now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 76
diff changeset
45
cd286de8f2ad Datacage window in Output tabs fetches information for the current output now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 76
diff changeset
46
1364
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 883
diff changeset
47 public CollectionView getCollectionView() {
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 883
diff changeset
48 return collectionView;
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 883
diff changeset
49 }
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 883
diff changeset
50
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 883
diff changeset
51
883
cd286de8f2ad Datacage window in Output tabs fetches information for the current output now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 76
diff changeset
52 public String getOutputName() {
cd286de8f2ad Datacage window in Output tabs fetches information for the current output now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 76
diff changeset
53 return mode.getName();
cd286de8f2ad Datacage window in Output tabs fetches information for the current output now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 76
diff changeset
54 }
1364
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 883
diff changeset
55
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 883
diff changeset
56
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 883
diff changeset
57 public Artifact getArtifact() {
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 883
diff changeset
58 return getCollectionView().getArtifact();
9981ba2ee13a Display the datacage button in the map toolbar.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 883
diff changeset
59 }
1400
96708d81eaf6 Added an initial GetFeatureInfo tool to get information about points in the map.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1364
diff changeset
60
96708d81eaf6 Added an initial GetFeatureInfo tool to get information about points in the map.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1364
diff changeset
61
96708d81eaf6 Added an initial GetFeatureInfo tool to get information about points in the map.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1364
diff changeset
62 public Collection getCollection() {
96708d81eaf6 Added an initial GetFeatureInfo tool to get information about points in the map.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1364
diff changeset
63 return collection;
96708d81eaf6 Added an initial GetFeatureInfo tool to get information about points in the map.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1364
diff changeset
64 }
1568
2432973ccced Handle manual points on a per-chart(type) basis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1400
diff changeset
65
2432973ccced Handle manual points on a per-chart(type) basis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1400
diff changeset
66
2432973ccced Handle manual points on a per-chart(type) basis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1400
diff changeset
67 public OutputMode getMode() {
2432973ccced Handle manual points on a per-chart(type) basis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1400
diff changeset
68 return mode;
2432973ccced Handle manual points on a per-chart(type) basis.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1400
diff changeset
69 }
74
c5586446f3c0 Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
70 }
c5586446f3c0 Available output modes are displayed in the tab bar of the collection view.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
71 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org