Mercurial > dive4elements > river
diff flys-client/src/main/java/de/intevation/flys/client/client/ui/wq/QDTable.java @ 5774:496c8c9d4913
issue1260, issue1259: Improve multi-gauge w/q input.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Fri, 19 Apr 2013 12:44:55 +0200 |
parents | b296d435fc69 |
children |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/wq/QDTable.java Fri Apr 19 11:47:27 2013 +0200 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/wq/QDTable.java Fri Apr 19 12:44:55 2013 +0200 @@ -109,5 +109,18 @@ public boolean isLocked() { return lockClick; } + + /** + * Search all records for one with attribute name equals to given name. + * @return null if none found. + * */ + public Double findRecordValue(String name) { + for (ListGridRecord record : getRecords()) { + if (record.getAttribute("name").equals(name)) { + return record.getAttributeAsDouble("value"); + } + } + return null; + } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :