[PATCH 2 of 2] Fixed some smartgwt 4.1 related issues
Wald Commits
scm-commit at wald.intevation.org
Tue Jul 1 13:11:56 CEST 2014
# HG changeset patch
# User Raimund Renkert <rrenkert at intevation.de>
# Date 1404213103 -7200
# Node ID b1ff606f01eec2896e5d372d1d9da81a629dceea
# Parent cacff0246a81473c3dc13e2d1d319e73ce6847b9
Fixed some smartgwt 4.1 related issues.
diff -r cacff0246a81 -r b1ff606f01ee gwt-client/src/main/java/org/dive4elements/river/client/client/ui/ParameterList.java
--- 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
diff -r cacff0246a81 -r b1ff606f01ee gwt-client/src/main/java/org/dive4elements/river/client/client/ui/chart/ChartPropertiesEditor.java
--- 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
diff -r cacff0246a81 -r b1ff606f01ee gwt-client/src/main/java/org/dive4elements/river/client/client/widgets/KMSpinner.java
--- 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);
More information about the Dive4Elements-commits
mailing list