comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/DistancePanel.java @ 793:4497d19c22fd

Finished the panel to enter waterlevel/ground information (from, to, diff). flys-client/trunk@2301 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 07 Jul 2011 14:12:21 +0000
parents dfbc6693247e
children 9bb8b7a751ec
comparison
equal deleted inserted replaced
792:696e3404e991 793:4497d19c22fd
59 this("right"); 59 this("right");
60 } 60 }
61 61
62 62
63 public DistancePanel(String labelOrientation) { 63 public DistancePanel(String labelOrientation) {
64 distancesTable = new RangeTable();
65 locationsTable = new LocationsTable();
66 distancePanel = new DoubleRangePanel( 64 distancePanel = new DoubleRangePanel(
67 getLabelFrom(), getLabelTo(), getLabelStep(), 65 labelFrom(), labelTo(), labelStep(),
68 0d, 0d, 0d, 250, this, labelOrientation); 66 0d, 0d, 0d, 250, this, labelOrientation);
69 } 67 }
70 68
71 69
72 @Override 70 @Override
128 DataItem[] to = dTo.getItems(); 126 DataItem[] to = dTo.getItems();
129 DataItem[] step = dStep.getItems(); 127 DataItem[] step = dStep.getItems();
130 128
131 StringBuilder sb = new StringBuilder(); 129 StringBuilder sb = new StringBuilder();
132 sb.append(from[0].getLabel()); 130 sb.append(from[0].getLabel());
133 sb.append(" " + getLabelFrom() + " "); 131 sb.append(" " + getUnitFrom() + " - ");
134 sb.append(to[0].getLabel()); 132 sb.append(to[0].getLabel());
135 sb.append(" " + getLabelTo() + " "); 133 sb.append(" " + getUnitTo() + " - ");
136 sb.append(step[0].getLabel()); 134 sb.append(step[0].getLabel());
137 sb.append(" " + getLabelStep()); 135 sb.append(" " + getUnitStep());
138 136
139 return sb.toString(); 137 return sb.toString();
140 } 138 }
141 139
142 140
141 protected String labelFrom() {
142 return getLabelFrom() + " [" + getUnitFrom() + "]";
143 }
144
145
143 protected String getLabelFrom() { 146 protected String getLabelFrom() {
144 return MSG.unitFrom(); 147 return MSG.dpLabelFrom();
148 }
149
150
151 protected String getUnitFrom() {
152 return MSG.dpUnitFrom();
153 }
154
155
156 protected String labelTo() {
157 return getLabelTo() + " [" + getUnitTo() + "]";
145 } 158 }
146 159
147 160
148 protected String getLabelTo() { 161 protected String getLabelTo() {
149 return MSG.unitTo(); 162 return MSG.dpLabelTo();
163 }
164
165
166 protected String getUnitTo() {
167 return MSG.dpUnitTo();
168 }
169
170
171 protected String labelStep() {
172 return getLabelStep() + " [" + getUnitStep() + "]";
150 } 173 }
151 174
152 175
153 protected String getLabelStep() { 176 protected String getLabelStep() {
154 return MSG.unitWidth(); 177 return MSG.dpLabelStep();
178 }
179
180
181 protected String getUnitStep() {
182 return MSG.dpUnitStep();
155 } 183 }
156 184
157 185
158 protected String getLowerField() { 186 protected String getLowerField() {
159 return FIELD_LOWER; 187 return FIELD_LOWER;
364 return Double.valueOf(defValue); 392 return Double.valueOf(defValue);
365 } 393 }
366 394
367 395
368 protected void initHelperPanel() { 396 protected void initHelperPanel() {
397 distancesTable = new RangeTable();
398 locationsTable = new LocationsTable();
399
369 Config config = Config.getInstance(); 400 Config config = Config.getInstance();
370 String url = config.getServerUrl(); 401 String url = config.getServerUrl();
371 String river = getRiverName(); 402 String river = getRiverName();
372 403
373 distancesTable.setAutoFetchData(true); 404 distancesTable.setAutoFetchData(true);

http://dive4elements.wald.intevation.org