Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/ParameterMatrixPanel.java @ 2528:33e2a1e23ae8
Implemented ParameterMatrixPanel.createOld() and added a real 'description' to Data instances in DataFactory.
flys-client/trunk@4421 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 16 May 2012 10:45:57 +0000 |
parents | da1d897ed66d |
children | 261347ea60b8 |
comparison
equal
deleted
inserted
replaced
2527:c8413741339f | 2528:33e2a1e23ae8 |
---|---|
7 import com.google.gwt.core.client.GWT; | 7 import com.google.gwt.core.client.GWT; |
8 | 8 |
9 import com.smartgwt.client.types.FieldType; | 9 import com.smartgwt.client.types.FieldType; |
10 import com.smartgwt.client.widgets.Canvas; | 10 import com.smartgwt.client.widgets.Canvas; |
11 import com.smartgwt.client.widgets.Label; | 11 import com.smartgwt.client.widgets.Label; |
12 import com.smartgwt.client.widgets.layout.HLayout; | |
12 import com.smartgwt.client.widgets.layout.VLayout; | 13 import com.smartgwt.client.widgets.layout.VLayout; |
13 | 14 |
14 import de.intevation.flys.client.shared.model.Data; | 15 import de.intevation.flys.client.shared.model.Data; |
15 import de.intevation.flys.client.shared.model.DataItem; | 16 import de.intevation.flys.client.shared.model.DataItem; |
16 import de.intevation.flys.client.shared.model.DataList; | 17 import de.intevation.flys.client.shared.model.DataList; |
69 } | 70 } |
70 | 71 |
71 | 72 |
72 @Override | 73 @Override |
73 public Canvas createOld(DataList dataList) { | 74 public Canvas createOld(DataList dataList) { |
74 GWT.log("TODO: IMPLEMENT RadioPanel.createOld()"); | 75 HLayout layout = new HLayout(); |
75 return new Label("TODO: DISPLAY INSERTED VALUES"); | 76 VLayout vLayout = new VLayout(); |
77 | |
78 layout.setWidth(300); | |
79 vLayout.setWidth(280); | |
80 | |
81 for (int i = 0, n = dataList.size(); i < n; i++) { | |
82 HLayout row = new HLayout(); | |
83 VLayout cols = new VLayout(); | |
84 | |
85 row.setWidth(300); | |
86 cols.setWidth(100); | |
87 | |
88 Data data = dataList.get(i); | |
89 DataItem[] items = data.getItems(); | |
90 | |
91 Label parameter = new Label(data.getDescription()); | |
92 parameter.setWidth(200); | |
93 | |
94 for (int j = 0, m = dataList.size(); j < m; j++) { | |
95 DataItem item = items[j]; | |
96 Label value = new Label(item.getLabel()); | |
97 | |
98 value.setValign(com.smartgwt.client.types.VerticalAlignment.TOP); | |
99 value.setWidth(130); | |
100 value.setHeight(20); | |
101 | |
102 cols.addMember(value); | |
103 } | |
104 | |
105 row.addMember(parameter); | |
106 row.addMember(cols); | |
107 | |
108 vLayout.addMember(row); | |
109 } | |
110 | |
111 Canvas back = getBackButton(dataList.getState()); | |
112 | |
113 layout.addMember(vLayout); | |
114 layout.addMember(back); | |
115 | |
116 return layout; | |
76 } | 117 } |
77 | 118 |
78 @Override | 119 @Override |
79 public Canvas create(DataList dataList) { | 120 public Canvas create(DataList dataList) { |
80 VLayout v = new VLayout(); | 121 VLayout v = new VLayout(); |