diff gwt-client/src/main/java/org/dive4elements/river/client/client/ui/PanelHelper.java @ 9066:b5d7a9d79837

uinfo.inundation_duration ui
author gernotbelger
date Fri, 11 May 2018 17:04:35 +0200
parents
children aafae1ab25f0
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/PanelHelper.java	Fri May 11 17:04:35 2018 +0200
@@ -0,0 +1,39 @@
+/** Copyright (C) 2017 by Bundesanstalt für Gewässerkunde
+ * Software engineering by
+ *  Björnsen Beratende Ingenieure GmbH
+ *  Dr. Schumacher Ingenieurbüro für Wasser und Umwelt
+ *
+ * This file is Free Software under the GNU AGPL (>=v3)
+ * and comes with ABSOLUTELY NO WARRANTY! Check out the
+ * documentation coming with Dive4Elements River for details.
+ */
+package org.dive4elements.river.client.client.ui;
+
+import com.smartgwt.client.widgets.form.fields.TextItem;
+import com.smartgwt.client.widgets.form.validator.Validator;
+import com.smartgwt.client.widgets.layout.VLayout;
+
+/**
+ * @author Domenico Nardi Tironi
+ *
+ */
+public class PanelHelper {
+
+    public PanelHelper() {
+
+    }
+
+    public static final TextItem createItem(final String identifier, final String title, final int width, final Validator... validator) {
+        final TextItem item = new TextItem(identifier, title);
+        item.setWidth(width);
+        item.setWrapTitle(false);
+        item.setValidators(validator);
+        return item;
+    }
+
+    public static VLayout getSpacer(final int height) {
+        final VLayout spacer = new VLayout();
+        spacer.setHeight(height);
+        return spacer;
+    }
+}

http://dive4elements.wald.intevation.org