Mercurial > dive4elements > river
diff flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/CrossSectionChartThemePanel.java @ 4568:bbd82bd8e541
flys-client: Cosmetics and warnings.
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Mon, 19 Nov 2012 00:07:53 +0100 |
parents | 3b4cef59836a |
children |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/CrossSectionChartThemePanel.java Sun Nov 18 01:19:07 2012 +0100 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/CrossSectionChartThemePanel.java Mon Nov 19 00:07:53 2012 +0100 @@ -2,6 +2,7 @@ import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.rpc.AsyncCallback; + import com.smartgwt.client.types.ListGridFieldType; import com.smartgwt.client.util.SC; import com.smartgwt.client.widgets.Canvas; @@ -125,12 +126,14 @@ artifactReference(artifact), feedData, new AsyncCallback<Artifact>() { + @Override public void onFailure(Throwable caught) { GWT.log("Could not feed artifact (" + artifact + ") with master marker: " + caught.getMessage()); SC.warn(MSG.getString(caught.getMessage())); enable(); } + @Override public void onSuccess(Artifact artifact) { GWT.log("Successfully injected master mark to " + artifact); setCurrentCSMaster(artifact.getUuid()); @@ -148,7 +151,7 @@ ThemeList themeList = getThemeList(); int count = getThemeList().getThemeCount(); String firstCSUuid = null; - Theme firstCS = null; + for (int i = 1; i <= count; i++) { Theme theme = themeList.getThemeAt(i); String value = dataOf(theme, CS_IS_MASTER); @@ -156,7 +159,6 @@ if (value != null) { if (firstCSUuid == null) { firstCSUuid = theme.getArtifact(); - firstCS = theme; } if (!value.equals("0")) { setCurrentCSMaster(theme.getArtifact()); @@ -203,6 +205,7 @@ // Add Change Handler to first unset the old master and then set the // new master. masterCb.addChangeHandler(new ChangeHandler() { + @Override public void onChange(ChangeEvent event) { String selectedItem = (String) event.getValue(); final String artifact = selectedItem; @@ -218,6 +221,7 @@ artifactReference(getCurrentCSMaster()), feedData, new AsyncCallback<Artifact>() { + @Override public void onFailure(Throwable caught) { GWT.log("Could not un-master artifact (" + getCurrentCSMaster() + "): " + @@ -225,6 +229,7 @@ SC.warn(MSG.getString(caught.getMessage())); enable(); } + @Override public void onSuccess(Artifact oldMaster) { GWT.log("Successfully un-mastered artifact."); feedTellMaster(artifact); @@ -396,6 +401,7 @@ * two values in \param in are in the same distance to * \param to. */ + @Override public void spinnerValueEntered(KMSpinner spinner, final double enteredKm, final FacetRecord facetRecord, final boolean up) { disable(); Config config = Config.getInstance(); @@ -610,6 +616,7 @@ if (synchronCrossSectionThemes.contains(themeHash)) { synchronNavigationMenuItem.setTitle(MSG.chart_themepanel_asynchron()); synchronNavigationMenuItem.addClickHandler(new ClickHandler() { + @Override public void onClick(MenuItemClickEvent evt) { synchronCrossSectionThemes.remove (themeHash); } @@ -618,6 +625,7 @@ else { synchronNavigationMenuItem.setTitle(MSG.chart_themepanel_synchron()); synchronNavigationMenuItem.addClickHandler(new ClickHandler() { + @Override public void onClick(MenuItemClickEvent evt) { synchronCrossSectionThemes.add (themeHash); }