Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/DoubleArrayPanel.java @ 590:81d7939a5d9e
DoubleArrayPanel takes care on empty array fields when adding new double values. This avoids displaying 'null' values.
flys-client/trunk@2185 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 21 Jun 2011 16:54:17 +0000 |
parents | 42512fce9b1b |
children | 1627a28c4504 |
comparison
equal
deleted
inserted
replaced
589:942bd0e7e332 | 590:81d7939a5d9e |
---|---|
127 public void addValue(double value) { | 127 public void addValue(double value) { |
128 NumberFormat f = NumberFormat.getDecimalFormat(); | 128 NumberFormat f = NumberFormat.getDecimalFormat(); |
129 | 129 |
130 String current = ti.getValueAsString(); | 130 String current = ti.getValueAsString(); |
131 | 131 |
132 current += " " + f.format(value); | 132 if (current == null || current.length() == 0) { |
133 current = f.format(value); | |
134 } | |
135 else { | |
136 current += " " + f.format(value); | |
137 } | |
133 | 138 |
134 ti.setValue(current); | 139 ti.setValue(current); |
135 } | 140 } |
136 | 141 |
137 | 142 |