# HG changeset patch # User Bjoern Ricks # Date 1348237265 0 # Node ID 7a096ec985966ea46569cca88460237701c8eb6e # Parent 8e169e4e1b570f1f3e24a15125c9494caed8597e Open gauge tree fold for historicalq reference too flys-client/trunk@5561 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 8e169e4e1b57 -r 7a096ec98596 flys-client/ChangeLog --- a/flys-client/ChangeLog Fri Sep 21 14:12:41 2012 +0000 +++ b/flys-client/ChangeLog Fri Sep 21 14:21:05 2012 +0000 @@ -1,3 +1,8 @@ +2012-09-21 Björn Ricks + + * src/main/java/de/intevation/flys/client/client/ui/GaugeTree.java: + Open fold for historicalq reference. + 2012-09-21 Björn Ricks * src/main/java/de/intevation/flys/client/server/GaugeOverviewInfoServiceImpl.java, diff -r 8e169e4e1b57 -r 7a096ec98596 flys-client/src/main/java/de/intevation/flys/client/client/ui/GaugeTree.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/GaugeTree.java Fri Sep 21 14:12:41 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/GaugeTree.java Fri Sep 21 14:21:05 2012 +0000 @@ -174,9 +174,10 @@ if (label.equals("reference_gauge")) { String tmp = d.getStringValue(); if (tmp != null) { - Integer gaugereference = Integer.valueOf(tmp); + Long gaugereference = Long.valueOf(tmp); if (gaugereference != null) { - //TODO + openOnReference(gaugereference); + return; } } } @@ -236,6 +237,22 @@ return null; } + public void openOnReference(Long number) { + GWT.log("GaugeTree - openOnReference " + number); + for (Iterator it = tree.treeItemIterator(); it.hasNext();) { + TreeItem item = it.next(); + if (item instanceof GaugeInfoItem) { + GaugeInfoItem gitem = (GaugeInfoItem)item; + if (gitem.getReference().equals(number)) { + item.setState(true); + } + else { + item.setState(false); + } + } + } + } + public void openOnDistance(Double start, Double end) { GWT.log("GaugeTree - openOnDistance " + start + " " + end + " " + tree.getItemCount()); @@ -313,6 +330,10 @@ public Double getEnd() { return gauge.getKmEnd(); } + + public Long getReference() { + return gauge.getOfficialNumber(); + } } class GaugeInfoHead extends HLayout {