Mercurial > dive4elements > river
changeset 9346:d89976700474
validationLabelHeight
author | gernotbelger |
---|---|
date | Tue, 31 Jul 2018 15:48:35 +0200 |
parents | a8d1784ad8e8 |
children | 08f46ccd37ba |
files | gwt-client/src/main/java/org/dive4elements/river/client/client/ui/PanelHelper.java gwt-client/src/main/java/org/dive4elements/river/client/client/ui/uinfo/AbstractVegZonesTablePanel.java gwt-client/src/main/java/org/dive4elements/river/client/client/ui/uinfo/SupraRegionalTablePanel.java |
diffstat | 3 files changed, 10 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/PanelHelper.java Tue Jul 31 13:59:25 2018 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/PanelHelper.java Tue Jul 31 15:48:35 2018 +0200 @@ -9,6 +9,7 @@ */ package org.dive4elements.river.client.client.ui; +import com.google.gwt.user.client.ui.Label; import com.smartgwt.client.types.Alignment; import com.smartgwt.client.types.ListGridFieldType; import com.smartgwt.client.widgets.form.fields.IntegerItem; @@ -115,4 +116,11 @@ return intField; } + public static final Label getValidationLabel() { + final Label label = new Label(); + label.setHeight("15px"); + label.getElement().getStyle().setColor("red"); + return label; + } + }
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/uinfo/AbstractVegZonesTablePanel.java Tue Jul 31 13:59:25 2018 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/uinfo/AbstractVegZonesTablePanel.java Tue Jul 31 15:48:35 2018 +0200 @@ -52,7 +52,7 @@ private static final String datakey = "vegzones"; final protected List<ListGridRecord> records = new ArrayList<ListGridRecord>(); - private final Label validationLabel = new Label(); + private final Label validationLabel = PanelHelper.getValidationLabel(); private final ListGrid elements = new ListGrid() { @Override @@ -202,8 +202,6 @@ } this.elements.sort("from", SortDirection.ASCENDING); - this.validationLabel.setHeight("10px"); - this.validationLabel.getElement().getStyle().setColor("red"); addDataInit(data); root.setWidth(width); root.addMember(title);
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/uinfo/SupraRegionalTablePanel.java Tue Jul 31 13:59:25 2018 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/uinfo/SupraRegionalTablePanel.java Tue Jul 31 15:48:35 2018 +0200 @@ -53,7 +53,7 @@ // private String tableData = ""; private ListGrid table; private final String datakey = "supraregional_table"; - final Label validationLabel = new Label(); + private final Label validationLabel = PanelHelper.getValidationLabel(); private final NumberFormat format = NumberFormat.getDecimalFormat(); @@ -248,8 +248,6 @@ final Label title = new Label(data.get(0).getDescription()); title.setHeight("35px"); - this.validationLabel.setHeight("10px"); - this.validationLabel.getElement().getStyle().setColor("red"); final ListGrid elements = new ListGrid(); elements.setWidth(320); elements.setHeight(300);