Mercurial > dive4elements > river
comparison gwt-client/src/main/java/org/dive4elements/river/client/client/ui/stationinfo/InfoListGrid.java @ 6272:24be0cc1c67c
Replaced the 'old school' wiki link buttons with default links.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Tue, 11 Jun 2013 12:57:51 +0200 |
parents | ea9eef426962 |
children | 7106f9b75004 |
comparison
equal
deleted
inserted
replaced
6271:9b7f1288e6c4 | 6272:24be0cc1c67c |
---|---|
14 import com.smartgwt.client.widgets.grid.ListGridRecord; | 14 import com.smartgwt.client.widgets.grid.ListGridRecord; |
15 import com.smartgwt.client.widgets.layout.VLayout; | 15 import com.smartgwt.client.widgets.layout.VLayout; |
16 | 16 |
17 import org.dive4elements.river.client.client.FLYS; | 17 import org.dive4elements.river.client.client.FLYS; |
18 import org.dive4elements.river.client.client.FLYSConstants; | 18 import org.dive4elements.river.client.client.FLYSConstants; |
19 import org.dive4elements.river.client.client.ui.WikiLinks; | |
19 import org.dive4elements.river.client.shared.model.Data; | 20 import org.dive4elements.river.client.shared.model.Data; |
20 import org.dive4elements.river.client.shared.model.DataList; | 21 import org.dive4elements.river.client.shared.model.DataList; |
21 import org.dive4elements.river.client.shared.model.RiverInfo; | 22 import org.dive4elements.river.client.shared.model.RiverInfo; |
22 | 23 |
23 /** | 24 /** |
34 public InfoListGrid(FLYS flys) { | 35 public InfoListGrid(FLYS flys) { |
35 super(); | 36 super(); |
36 this.flys = flys; | 37 this.flys = flys; |
37 this.setCanExpandRecords(true); | 38 this.setCanExpandRecords(true); |
38 this.setCanExpandMultipleRecords(true); | 39 this.setCanExpandMultipleRecords(true); |
40 } | |
41 | |
42 @Override | |
43 protected Canvas createRecordComponent( | |
44 final ListGridRecord record, | |
45 Integer colNum | |
46 ) { | |
47 String name = this.getFieldName(colNum); | |
48 if (name.equals("infolink")) { | |
49 return WikiLinks.linkHTML( | |
50 flys, | |
51 record.getAttribute("link"), | |
52 record.getLinkText()); | |
53 } | |
54 else { | |
55 return null; | |
56 } | |
39 } | 57 } |
40 | 58 |
41 public void openAll() { | 59 public void openAll() { |
42 GWT.log("InfoListGrid - openAll"); | 60 GWT.log("InfoListGrid - openAll"); |
43 for (ListGridRecord record: this.getRecords()) { | 61 for (ListGridRecord record: this.getRecords()) { |