comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/SingleLocationPanel.java @ 568:1d20533a4ae3

Bring Oberkante and Unterkante into UI. flys-client/trunk@2116 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 14 Jun 2011 15:46:31 +0000
parents 469528551b78
children dfbc6693247e
comparison
equal deleted inserted replaced
567:d9fc58e30a53 568:1d20533a4ae3
121 121
122 /** 122 /**
123 * This method creates a table that contains the location values. 123 * This method creates a table that contains the location values.
124 */ 124 */
125 protected void createLocationTable() { 125 protected void createLocationTable() {
126 GWT.log("---------- I WAS HERE ---------");
126 locationTable.setWidth100(); 127 locationTable.setWidth100();
127 locationTable.setShowRecordComponents(true); 128 locationTable.setShowRecordComponents(true);
128 locationTable.setShowRecordComponentsByCell(true); 129 locationTable.setShowRecordComponentsByCell(true);
129 locationTable.setHeight100(); 130 locationTable.setHeight100();
130 locationTable.setEmptyMessage(MESSAGES.empty_table()); 131 locationTable.setEmptyMessage(MESSAGES.empty_table());
131 132
132 ListGridField addLocation = new ListGridField ("", ""); 133 ListGridField addLocation = new ListGridField ("", "");
133 addLocation.setType (ListGridFieldType.ICON); 134 addLocation.setType (ListGridFieldType.ICON);
134 addLocation.setWidth ("30"); 135 addLocation.setWidth (20);
135 addLocation.addRecordClickHandler (new RecordClickHandler () { 136 addLocation.addRecordClickHandler (new RecordClickHandler () {
136 public void onRecordClick (RecordClickEvent e) { 137 public void onRecordClick (RecordClickEvent e) {
137 ListGridRecord[] records = locationTable.getSelection(); 138 ListGridRecord[] records = locationTable.getSelection();
138 double[] selected = new double[1]; 139 double[] selected = new double[1];
139 selected[0] = records[0].getAttributeAsDouble("from"); 140 selected[0] = records[0].getAttributeAsDouble("from");
147 ldescr.setType(ListGridFieldType.TEXT); 148 ldescr.setType(ListGridFieldType.TEXT);
148 ldescr.setWidth("*"); 149 ldescr.setWidth("*");
149 ListGridField lside = new ListGridField("riverside", 150 ListGridField lside = new ListGridField("riverside",
150 MESSAGES.riverside()); 151 MESSAGES.riverside());
151 lside.setType(ListGridFieldType.TEXT); 152 lside.setType(ListGridFieldType.TEXT);
152 lside.setWidth(60); 153 lside.setWidth(40);
154
153 ListGridField loc = new ListGridField("from", MESSAGES.location()); 155 ListGridField loc = new ListGridField("from", MESSAGES.location());
154 loc.setType(ListGridFieldType.TEXT); 156 loc.setType(ListGridFieldType.TEXT);
155 loc.setWidth(80); 157 loc.setWidth(40);
156 locationTable.setFields(addLocation, ldescr, loc, lside); 158
159 ListGridField bottom =
160 new ListGridField("bottom", MESSAGES.bottom_edge());
161 bottom.setType(ListGridFieldType.TEXT);
162 bottom.setWidth(30);
163
164 ListGridField top =
165 new ListGridField("top", MESSAGES.top_edge());
166 top.setType(ListGridFieldType.TEXT);
167 top.setWidth(30);
168
169 locationTable.setFields(
170 addLocation, ldescr, loc, lside, bottom, top);
157 } 171 }
158 172
159 173
160 public Canvas createOld(DataList dataList) { 174 public Canvas createOld(DataList dataList) {
161 List<Data> items = dataList.getAll(); 175 List<Data> items = dataList.getAll();

http://dive4elements.wald.intevation.org