Mercurial > dive4elements > river
diff gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/GaugeInfoPanel.java @ 7933:900299ab8e6e
Replaced plain gwt with smartgwt components in info panels.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Tue, 17 Jun 2014 09:45:48 +0200 |
parents | 11bc2d6a2059 |
children |
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/GaugeInfoPanel.java Fri Jun 13 16:34:29 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/GaugeInfoPanel.java Tue Jun 17 09:45:48 2014 +0200 @@ -9,10 +9,11 @@ package org.dive4elements.river.client.client.ui.stationinfo; import com.google.gwt.core.client.GWT; -import com.google.gwt.event.dom.client.ClickEvent; -import com.google.gwt.event.dom.client.ClickHandler; +import com.smartgwt.client.widgets.form.DynamicForm; +import com.smartgwt.client.widgets.form.fields.events.ClickEvent; +import com.smartgwt.client.widgets.form.fields.events.ClickHandler; +import com.smartgwt.client.widgets.form.fields.LinkItem; import com.google.gwt.i18n.client.NumberFormat; -import com.google.gwt.user.client.ui.Anchor; import com.smartgwt.client.widgets.layout.HLayout; import com.smartgwt.client.widgets.layout.VLayout; import com.smartgwt.client.widgets.Label; @@ -83,7 +84,9 @@ } HLayout line5 = new HLayout(); - line5.addMember(new GaugeMainValueAnchor(flys, gauge)); + DynamicForm line5Form = new DynamicForm(); + line5Form.setItems(new GaugeMainValueAnchor(flys, gauge)); + line5.addMember(line5Form); if (minw != null && maxw != null) { grid.addMember(line1); @@ -105,16 +108,17 @@ * Clickable anchor that asks application to show window with * main values for gauge. */ - class GaugeMainValueAnchor extends Anchor implements ClickHandler { + class GaugeMainValueAnchor extends LinkItem implements ClickHandler { private FLYS flys; private GaugeInfo gauge; public GaugeMainValueAnchor(FLYS flys, GaugeInfo gauge) { - super(MSG.show_mainvalues()); + super(); + this.setLinkTitle(MSG.show_mainvalues()); + this.setShowTitle(false); this.flys = flys; this.gauge = gauge; - this.setHeight("5"); addClickHandler(this); }