changeset 7982:b1ff606f01ee

Fixed some smartgwt 4.1 related issues.
author Raimund Renkert <rrenkert@intevation.de>
date Tue, 01 Jul 2014 13:11:43 +0200
parents cacff0246a81
children c4bf75f82ffc
files gwt-client/src/main/java/org/dive4elements/river/client/client/ui/ParameterList.java gwt-client/src/main/java/org/dive4elements/river/client/client/ui/chart/ChartPropertiesEditor.java gwt-client/src/main/java/org/dive4elements/river/client/client/widgets/KMSpinner.java
diffstat 3 files changed, 13 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/ParameterList.java	Fri Jun 27 19:28:08 2014 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/ParameterList.java	Tue Jul 01 13:11:43 2014 +0200
@@ -258,7 +258,9 @@
             public void addMember(Canvas component) {
                 super.addMember(component);
                 tableSection.setExpanded(true);
-                stack.getSection(InfoPanel.SECTION_ID).setExpanded(false);
+                if (stack.getSection(InfoPanel.SECTION_ID) != null) {
+                    stack.getSection(InfoPanel.SECTION_ID).setExpanded(false);
+                }
             }
 
             @Override
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/chart/ChartPropertiesEditor.java	Fri Jun 27 19:28:08 2014 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/chart/ChartPropertiesEditor.java	Tue Jul 01 13:11:43 2014 +0200
@@ -255,6 +255,7 @@
             FormItem fix = createBooleanProperty(fixation);
             fix.setValue(((BooleanProperty)
                 origPg.getPropertyByName("fixation")).getValue().booleanValue());
+            fix.setWidth(30);
 
             fix.addChangedHandler(new ChangedHandler() {
                 @Override
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/widgets/KMSpinner.java	Fri Jun 27 19:28:08 2014 +0200
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/widgets/KMSpinner.java	Tue Jul 01 13:11:43 2014 +0200
@@ -12,6 +12,8 @@
 import com.google.gwt.i18n.client.NumberFormat;
 
 import com.smartgwt.client.data.Record;
+import com.smartgwt.client.types.Alignment;
+import com.smartgwt.client.types.VerticalAlignment;
 import com.smartgwt.client.widgets.Button;
 import com.smartgwt.client.widgets.Label;
 import com.smartgwt.client.widgets.events.ClickEvent;
@@ -47,12 +49,13 @@
         this.value = initialValue;
 
         setWidth("99%");
-        setHeight(18);
+        setHeight(24);
 
         // minusButton shall ask service for previous available cs.
         Button minusButton = new Button("-");
         minusButton.setWidth(18);
-        minusButton.setHeight(18);
+        minusButton.setHeight(22);
+        minusButton.setValign(VerticalAlignment.CENTER);
         minusButton.addClickHandler(new com.smartgwt.client.widgets.events.ClickHandler() {
             public void onClick(ClickEvent evt) {
                 fireChangedEvent(value - 0.1d, false);
@@ -64,7 +67,7 @@
         kmField.setValue(initialValue);
         kmField.setWidth("*");
         kmField.setTitle("");
-        kmField.setHeight(16);
+        kmField.setHeight(20);
 
         FormItemValueFormatter doubleFormat = new FormItemValueFormatter() {
             public String formatValue(Object value, Record record, DynamicForm form, FormItem item) {
@@ -134,18 +137,19 @@
         form.setTitleSuffix("");
         form.setTitleWidth(0);
         form.setWidth(50);
-        form.setHeight(18);
 
         // PlusButton shall ask service for next available cs.
         Button plusButton = new Button("+");
         plusButton.setWidth(18);
-        plusButton.setHeight(18);
+        plusButton.setHeight(22);
+        plusButton.setValign(VerticalAlignment.CENTER);
         plusButton.addClickHandler(new com.smartgwt.client.widgets.events.ClickHandler() {
             public void onClick(ClickEvent evt) {
                 fireChangedEvent(value + 0.1d, true);
             }
         });
 
+        this.setMembersMargin(5);
         this.addMember(minusButton);
         this.addMember(form);
         this.addMember(plusButton);

http://dive4elements.wald.intevation.org