diff flys-client/src/main/java/de/intevation/flys/client/client/ui/MainMenu.java @ 2983:725470fc57d2

Add "Manage themes" button to ChartToolbar and MapToolbar. flys-client/trunk@4991 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Christian Lins <christian.lins@intevation.de>
date Fri, 13 Jul 2012 11:31:25 +0000
parents 0ba7c43e7b62
children c179cd02177d
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/MainMenu.java	Fri Jul 13 10:09:20 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/MainMenu.java	Fri Jul 13 11:31:25 2012 +0000
@@ -3,7 +3,6 @@
 import com.google.gwt.core.client.GWT;
 import com.google.gwt.i18n.client.LocaleInfo;
 import com.google.gwt.user.client.Window;
-
 import com.smartgwt.client.types.Alignment;
 import com.smartgwt.client.util.BooleanCallback;
 import com.smartgwt.client.util.SC;
@@ -24,7 +23,7 @@
 public class MainMenu extends HLayout {
 
     /** The interface that provides i18n messages. */
-    private FLYSConstants messages = GWT.create(FLYSConstants.class);
+    private final FLYSConstants messages = GWT.create(FLYSConstants.class);
 
     /** An instance to FLYS.*/
     protected FLYS flys;
@@ -66,6 +65,7 @@
         info        = new Button(messages.info());
 
         newProject.addClickHandler(new ClickHandler() {
+            @Override
             public void onClick(ClickEvent event) {
                 GWT.log("Clicked 'New Project' button.");
                 createNewProject();
@@ -73,6 +73,7 @@
         });
 
         projectList.addClickHandler(new ClickHandler() {
+            @Override
             public void onClick(ClickEvent event) {
                 GWT.log("Clicked 'Open ProjectList' button.");
                 ProjectList list = getFlys().getProjectList();
@@ -84,6 +85,7 @@
         });
 
         logout.addClickHandler(new ClickHandler() {
+            @Override
             public void onClick(ClickEvent event) {
                 GWT.log("Clicked 'logout' button.");
                 GWT.log("IMPLEMENT the 'logout' function.");
@@ -91,6 +93,7 @@
         });
 
         language.addClickHandler(new ClickHandler() {
+            @Override
             public void onClick(ClickEvent event) {
                 LocaleInfo info            = LocaleInfo.getCurrentLocale();
                 final String currentLocale = info.getLocaleName();
@@ -100,6 +103,7 @@
 
                 SC.confirm(messages.warning(), messages.warning_language(),
                     new BooleanCallback() {
+                        @Override
                         public void execute(Boolean value) {
                             if (value) {
                                 switchLanguage(currentLocale, newLocale);
@@ -110,6 +114,7 @@
         });
 
         info.addClickHandler(new ClickHandler() {
+            @Override
             public void onClick(ClickEvent event) {
                 GWT.log("Clicked 'info' button.");
                 GWT.log("IMPLEMENT the 'open info panel' function.");
@@ -226,8 +231,6 @@
     protected void switchLanguage(String currentLocale, String newLocale) {
         String newLocation = Window.Location.getHref();
 
-        String oldLocation = newLocation;
-
         if (newLocation.endsWith("/")) {
             newLocation = newLocation.substring(0, newLocation.length()-1);
         }

http://dive4elements.wald.intevation.org