# HG changeset patch # User Felix Wolfsteller # Date 1324544313 0 # Node ID 0ba23e6fef0c557411b7ea27672dcadbb67c7bc7 # Parent 71ba43bd0e3fc1884c8cd7e16bf416aab4696315 Refactored, set collectionview in Themepanels constructors. flys-client/trunk@3519 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 71ba43bd0e3f -r 0ba23e6fef0c flys-client/ChangeLog --- 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 + + * 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 * src/main/java/de/intevation/flys/client/shared/model/ThemeList.java: diff -r 71ba43bd0e3f -r 0ba23e6fef0c flys-client/src/main/java/de/intevation/flys/client/client/ui/ThemePanel.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(); diff -r 71ba43bd0e3f -r 0ba23e6fef0c flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartOutputTab.java --- 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); diff -r 71ba43bd0e3f -r 0ba23e6fef0c flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/ChartThemePanel.java --- 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(); diff -r 71ba43bd0e3f -r 0ba23e6fef0c flys-client/src/main/java/de/intevation/flys/client/client/ui/map/MapThemePanel.java --- 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;