comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/GaugePanel.java @ 3839:509ef6ec93af

Add html links for the additinal river and gauge info pages flys-client/trunk@5554 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Bjoern Ricks <bjoern.ricks@intevation.de>
date Fri, 21 Sep 2012 11:08:34 +0000
parents 6b2ae2ec5b01
children cf64f54aa39c
comparison
equal deleted inserted replaced
3838:70976b711b7e 3839:509ef6ec93af
5 import java.util.List; 5 import java.util.List;
6 6
7 import com.google.gwt.core.client.GWT; 7 import com.google.gwt.core.client.GWT;
8 import com.google.gwt.i18n.client.NumberFormat; 8 import com.google.gwt.i18n.client.NumberFormat;
9 import com.google.gwt.user.client.rpc.AsyncCallback; 9 import com.google.gwt.user.client.rpc.AsyncCallback;
10 import com.google.gwt.user.client.ui.Anchor;
10 import com.google.gwt.user.client.ui.DecoratorPanel; 11 import com.google.gwt.user.client.ui.DecoratorPanel;
11 import com.google.gwt.user.client.ui.Grid; 12 import com.google.gwt.user.client.ui.Grid;
12 import com.google.gwt.user.client.ui.HorizontalPanel; 13 import com.google.gwt.user.client.ui.HorizontalPanel;
13 import com.google.gwt.user.client.ui.Label; 14 import com.google.gwt.user.client.ui.Label;
14 import com.google.gwt.user.client.ui.ScrollPanel; 15 import com.google.gwt.user.client.ui.ScrollPanel;
312 } 313 }
313 } 314 }
314 } 315 }
315 } 316 }
316 } 317 }
318 else if (state.equals("state.winfo.historicalq.reference_gauge")) {
319 for (int j = dl.size()-1; j >= 0; --j) {
320 Data d = dl.get(j);
321 String label = d.getLabel();
322 if (label.equals("reference_gauge")) {
323 String tmp = d.getStringValue();
324 if (tmp != null) {
325 Integer gaugereference = Integer.valueOf(tmp);
326 if (gaugereference != null) {
327 }
328 }
329 }
330 }
331 }
317 } 332 }
318 } 333 }
319 if (!curvelocations.isEmpty()) { 334 if (!curvelocations.isEmpty()) {
320 openOnLocations(curvelocations); 335 openOnLocations(curvelocations);
321 } 336 }
429 qtext += nf.format(qmax); 444 qtext += nf.format(qmax);
430 qtext += " " + MSG.gauge_q_unit(); 445 qtext += " " + MSG.gauge_q_unit();
431 } 446 }
432 447
433 addLabel(qtext, false); 448 addLabel(qtext, false);
449
450 Anchor anchor = new Anchor(MSG.gauge_river_info_link(), riverinfo.getInfoURL());
451 add(anchor);
434 } 452 }
435 453
436 private void addLabel(String text, boolean wordwrap) { 454 private void addLabel(String text, boolean wordwrap) {
437 Label label = new Label(text, wordwrap); 455 Label label = new Label(text, wordwrap);
438 add(label); 456 add(label);
506 String stext = nf.format(station); 524 String stext = nf.format(station);
507 stext += " km"; 525 stext += " km";
508 label = new Label(stext); 526 label = new Label(stext);
509 addMember(label); 527 addMember(label);
510 } 528 }
529
530 addMember(new Anchor(MSG.gauge_info_link(), gauge.getInfoURL()));
511 } 531 }
512 } 532 }
513 533
514 class GaugeInfoPanel extends DecoratorPanel { 534 class GaugeInfoPanel extends DecoratorPanel {
515 535

http://dive4elements.wald.intevation.org