diff flys-client/src/main/java/de/intevation/flys/client/client/ui/LocationPanel.java @ 1615:07c38d054f91

Translate data item in locationpanel label. flys-client/trunk@3984 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 09 Feb 2012 08:51:00 +0000
parents 66671b69c7ea
children f13a7c126f24
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/LocationPanel.java	Thu Feb 09 08:47:39 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/LocationPanel.java	Thu Feb 09 08:51:00 2012 +0000
@@ -71,7 +71,8 @@
         VLayout layout = new VLayout();
         layout.setMembersMargin(10);
 
-        Label label   = new Label(MSG.location ());
+        // Subclass uses translated data items name as label.
+        Label label   = new Label(MSG.location());
         Canvas widget = createWidget(data);
         Canvas submit = getNextButton();
 
@@ -88,11 +89,13 @@
     }
 
 
+    /** Store label of first data item in list. */
     public void findDataItemName(DataList list) {
         this.dataItemName = list.getAll().get(0).getLabel();
     }
 
 
+    /** Get label of first data item that this uiprovider has seen. */
     public String getDataItemName() {
         return this.dataItemName;
     }
@@ -117,6 +120,7 @@
 
         Canvas back = getBackButton(dataList.getState());
 
+        // TODO evaluate: isn't this what findDataItemName is doing?
         Label selected = new Label(loc[0].getLabel());
         selected.setWidth("130px");
 
@@ -209,7 +213,7 @@
 
     protected Canvas createWidget(DataList data) {
         VLayout layout = new VLayout();
-        inputLayout      = new HLayout();
+        inputLayout    = new HLayout();
 
         // The initial view will display the location input mode.
         locationPanel = new DoubleArrayPanel(
@@ -227,14 +231,12 @@
 
         inputLayout.setMembersMargin(30);
 
+        /*
         //picker.prepareFilter();
-
-        /*
         helperContainer.addMember(picker.getLocationTable());
         helperContainer.addMember(picker.getFilterLayout());
         helperContainer.addMember(picker.getResultCountForm());
         */
-        //createInputPanel();
         return layout;
     }
 

http://dive4elements.wald.intevation.org