changeset 1474:0ba23e6fef0c

Refactored, set collectionview in Themepanels constructors. flys-client/trunk@3519 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 22 Dec 2011 08:58:33 +0000
parents 71ba43bd0e3f
children fb2fefe0325f
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/ThemePanel.java flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartOutputTab.java flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartThemePanel.java flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapThemePanel.java
diffstat 5 files changed, 29 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Thu Dec 22 08:53:15 2011 +0000
+++ b/flys-client/ChangeLog	Thu Dec 22 08:58:33 2011 +0000
@@ -1,3 +1,11 @@
+2011-12-22	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/client/ui/map/MapThemePanel.java,
+	  src/main/java/de/intevation/flys/client/client/ui/ThemePanel.java,
+	  src/main/java/de/intevation/flys/client/client/ui/chart/ChartOutputTab.java,
+	  src/main/java/de/intevation/flys/client/client/ui/chart/ChartThemePanel.java:
+	  Set CollectionView in constructor.
+
 2011-12-22	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/shared/model/ThemeList.java:
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/ThemePanel.java	Thu Dec 22 08:53:15 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/ThemePanel.java	Thu Dec 22 08:58:33 2011 +0000
@@ -43,6 +43,8 @@
 import de.intevation.flys.client.client.services.CollectionItemAttributeService;
 import de.intevation.flys.client.client.services.CollectionItemAttributeServiceAsync;
 
+import de.intevation.flys.client.client.ui.ThemePanel;
+
 /**
  * ThemePanel on the left in CollectionView.
  * Contains control widgets for "themes", which are plotted in a diagram (chart).
@@ -86,10 +88,15 @@
      * Setup Grid, navigation bar.
      * @param collection Collection for which to show themes.
      */
-    public ThemePanel(Collection collection, OutputMode mode) {
-        this.collection  = collection;
-        this.mode        = mode;
-        this.list        = createGrid();
+    public ThemePanel(
+        Collection collection,
+        OutputMode mode,
+        CollectionView view
+    ) {
+        this.collection = collection;
+        this.mode       = mode;
+        this.list       = createGrid();
+        this.view       = view;
         list.addRowContextClickHandler(new RowContextClickHandler() {
             public void onRowContextClick(RowContextClickEvent event) {
                 ListGridRecord[] records = list.getSelection();
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartOutputTab.java	Thu Dec 22 08:53:15 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartOutputTab.java	Thu Dec 22 08:58:33 2011 +0000
@@ -134,12 +134,11 @@
         // Output "cross_section" needs slightly modified ThemePanel
         // (with action buttons).
         if (mode.getName().equals("cross_section")) {
-            ctp = new CrossSectionChartThemePanel(collection, mode);
+            ctp = new CrossSectionChartThemePanel(collection, mode, this.view);
         }
         else {
-            ctp = new ChartThemePanel(collection, mode);
+            ctp = new ChartThemePanel(collection, mode, this.view);
         }
-        ctp.setCollectionView(this.view);
 
         ctp.addRedrawRequestHandler(this);
         ctp.addOutputParameterChangeHandler(this);
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartThemePanel.java	Thu Dec 22 08:53:15 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartThemePanel.java	Thu Dec 22 08:58:33 2011 +0000
@@ -30,6 +30,7 @@
 
 import de.intevation.flys.client.client.Config;
 import de.intevation.flys.client.client.FLYSConstants;
+import de.intevation.flys.client.client.ui.CollectionView;
 import de.intevation.flys.client.client.ui.ThemePanel;
 
 import de.intevation.flys.client.client.services.FeedService;
@@ -64,8 +65,12 @@
         de.intevation.flys.client.client.services.FeedService.class);
 
 
-    public ChartThemePanel(Collection collection, OutputMode mode) {
-        super(collection, mode);
+    public ChartThemePanel(
+        Collection collection,
+        OutputMode mode,
+        CollectionView view
+    ) {
+        super(collection, mode, view);
         this.collection = collection;
 
         initGrid();
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapThemePanel.java	Thu Dec 22 08:53:15 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapThemePanel.java	Thu Dec 22 08:58:33 2011 +0000
@@ -90,7 +90,7 @@
         ThemeMovedCallback themeMovedCallback,
         LayerZoomCallback  layerZoomCallback
     ) {
-        super(collection, mode);
+        super(collection, mode, null);
 
         this.mapOut             = mapOut;
         this.activateCallback   = activateCallback;

http://dive4elements.wald.intevation.org