Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/DoubleArrayPanel.java @ 238:234c78a91c15
Added new UI provider for single location selection.
flys-client/trunk@1806 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Tue, 03 May 2011 13:52:14 +0000 |
parents | 137daff2c732 |
children | ccba1a0b743e |
comparison
equal
deleted
inserted
replaced
237:cf25f235b7b6 | 238:234c78a91c15 |
---|---|
84 public void setValues(double[] values) { | 84 public void setValues(double[] values) { |
85 NumberFormat f = NumberFormat.getDecimalFormat(); | 85 NumberFormat f = NumberFormat.getDecimalFormat(); |
86 | 86 |
87 StringBuilder text = new StringBuilder(); | 87 StringBuilder text = new StringBuilder(); |
88 boolean firstItem = true; | 88 boolean firstItem = true; |
89 if (values != null) { | |
90 for (double val: values) { | |
91 if (!firstItem) { | |
92 text.append(" "); | |
93 } | |
89 | 94 |
90 for (double val: values) { | 95 text.append(f.format(val)); |
91 if (!firstItem) { | 96 |
92 text.append(" "); | 97 firstItem = false; |
93 } | 98 } |
94 | |
95 text.append(f.format(val)); | |
96 | |
97 firstItem = false; | |
98 } | 99 } |
99 | 100 |
100 ti.clearValue(); | 101 ti.clearValue(); |
101 ti.setValue(text.toString()); | 102 ti.setValue(text.toString()); |
102 } | 103 } |