Mercurial > dive4elements > river
view flys-client/src/main/java/de/intevation/flys/client/client/ui/stationinfo/GaugeRecord.java @ 5349:d43ef9f709cd
Add HWSLines and HWSPoints to datacage for the map
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Wed, 20 Mar 2013 16:37:02 +0100 |
parents | 8c527ea4603b |
children |
line wrap: on
line source
package de.intevation.flys.client.client.ui.stationinfo; import com.google.gwt.core.client.GWT; import com.smartgwt.client.widgets.grid.ListGridRecord; import de.intevation.flys.client.client.FLYSConstants; import de.intevation.flys.client.shared.model.GaugeInfo; /** * @author <a href="mailto:bjoern.ricks@intevation.de">Björn Ricks</a> */ public class GaugeRecord extends ListGridRecord implements GaugeInfo { /** The message class that provides i18n strings.*/ private FLYSConstants MSG = GWT.create(FLYSConstants.class); public GaugeRecord(GaugeInfo gauge) { setCanExpand(true); Long number = gauge.getOfficialNumber(); String url = number != null ? MSG.gauge_url() + number : MSG.gauge_url(); setLink(url); setLinkText(MSG.gauge_info_link()); setName(gauge.getName()); setKmStart(gauge.getKmStart()); setKmEnd(gauge.getKmEnd()); setMinQ(gauge.getMinQ()); setMaxQ(gauge.getMaxQ()); setMinW(gauge.getMinW()); setMaxW(gauge.getMaxW()); setAeo(gauge.getAeo()); setDatum(gauge.getDatum()); setKmUp(gauge.isKmUp()); setOfficialNumber(gauge.getOfficialNumber()); setRiverName(gauge.getRiverName()); setStation(gauge.getStation()); setWstUnit(gauge.getWstUnit()); setCurveLink(MSG.gauge_curve_link()); } private void setCurveLink(String value) { this.setAttribute("curvelink", value); } private void setLink(String url) { this.setAttribute("link", url); } public String getLink() { return this.getAttributeAsString("link"); } public String getName() { return this.getAttributeAsString("name"); } private void setName(String value) { this.setAttribute("name", value); } public Double getKmStart() { return this.getAttributeAsDouble("kmstart"); } private void setKmStart(Double value) { this.setAttribute("kmstart", value); } public Double getKmEnd() { return this.getAttributeAsDouble("kmend"); } private void setKmEnd(Double value) { this.setAttribute("kmend", value); } public Double getMinQ() { return this.getAttributeAsDouble("minq"); } private void setMinQ(Double value) { this.setAttribute("minq", value); } public Double getMaxQ() { return this.getAttributeAsDouble("maxq"); } private void setMaxQ(Double value) { this.setAttribute("maxq", value); } public Double getMinW() { return this.getAttributeAsDouble("minw"); } private void setMinW(Double value) { this.setAttribute("minw", value); } public Double getMaxW() { return this.getAttributeAsDouble("maxw"); } private void setMaxW(Double value) { this.setAttribute("maxw", value); } public Double getDatum() { return this.getAttributeAsDouble("datum"); } private void setDatum(Double value) { this.setAttribute("datum", value); } public Double getAeo() { return this.getAttributeAsDouble("aeo"); } private void setAeo(Double value) { this.setAttribute("aeo", value); } public boolean isKmUp() { return this.getAttributeAsBoolean("kmup"); } private void setKmUp(boolean value) { this.setAttribute("kmup", value); } public Double getStation() { return this.getAttributeAsDouble("station"); } private void setStation(Double value) { this.setAttribute("station", value); } public String getWstUnit() { return this.getAttributeAsString("wstunit"); } private void setWstUnit(String value) { this.setAttribute("wstunit", value); } public Long getOfficialNumber() { return this.getAttributeAsLong("officialnumber"); } private void setOfficialNumber(Long number) { this.setAttribute("officialnumber", number); } public String getRiverName() { return this.getAttributeAsString("rivername"); } private void setRiverName(String rivername) { this.setAttribute("rivername", rivername); } }