Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/stationinfo/GaugeListGrid.java @ 4961:27b4d5d20dc8
Render text in Abflusstafel/-kurve cell like a "normal" html link
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Mon, 04 Feb 2013 13:49:15 +0100 |
parents | a3a59055ed5e |
children | 6f6461e07854 |
comparison
equal
deleted
inserted
replaced
4960:a3a59055ed5e | 4961:27b4d5d20dc8 |
---|---|
31 /** | 31 /** |
32 * @author <a href="mailto:bjoern.ricks@intevation.de">Björn Ricks</a> | 32 * @author <a href="mailto:bjoern.ricks@intevation.de">Björn Ricks</a> |
33 */ | 33 */ |
34 public class GaugeListGrid extends InfoListGrid implements RecordClickHandler { | 34 public class GaugeListGrid extends InfoListGrid implements RecordClickHandler { |
35 | 35 |
36 private static final int ABFLUSSTAFEL_COLUMN = 6; | |
37 | |
36 public GaugeListGrid(FLYS flys) { | 38 public GaugeListGrid(FLYS flys) { |
37 super(flys); | 39 super(flys); |
38 ListGridField nfield = new ListGridField("name", "Pegel"); | 40 ListGridField nfield = new ListGridField("name", "Pegel"); |
39 ListGridField sfield = new ListGridField("kmstart", "Start [km]", 60); | 41 ListGridField sfield = new ListGridField("kmstart", "Start [km]", 60); |
40 ListGridField efield = new ListGridField("kmend", "Ende [km]", 60); | 42 ListGridField efield = new ListGridField("kmend", "Ende [km]", 60); |
433 public void onRecordClick(RecordClickEvent event) { | 435 public void onRecordClick(RecordClickEvent event) { |
434 GaugeRecord gauge = (GaugeRecord)event.getRecord(); | 436 GaugeRecord gauge = (GaugeRecord)event.getRecord(); |
435 flys.newGaugeDischargeCurve(gauge.getRiverName(), | 437 flys.newGaugeDischargeCurve(gauge.getRiverName(), |
436 gauge.getOfficialNumber()); | 438 gauge.getOfficialNumber()); |
437 } | 439 } |
440 | |
441 @Override | |
442 public String getCellCSSText(ListGridRecord record, int rowNum, | |
443 int colNum) { | |
444 if (colNum == ABFLUSSTAFEL_COLUMN) { | |
445 // display the ablfusstafel cell like a link | |
446 return "text-decoration: underline; color: #0000EE; cursor: pointer;"; | |
447 } | |
448 else { | |
449 return super.getCellCSSText(record, rowNum, colNum); | |
450 } | |
451 } | |
438 } | 452 } |