Re-arranged the client controller perspective.
[platform/upstream/iotivity.git] / service / simulator / java / eclipse-plugin / ClientControllerPlugin / src / oic / simulator / clientcontroller / manager / ResourceManager.java
index 0425477..a2735c4 100644 (file)
@@ -16,6 +16,7 @@
 
 package oic.simulator.clientcontroller.manager;
 
+import java.text.NumberFormat;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Comparator;
@@ -1194,13 +1195,16 @@ public class ResourceManager {
 
     public List<String> getAllValues(DoubleProperty dblProperty,
             AttributeProperty.Type type) {
+        NumberFormat formatter = NumberFormat.getInstance();
         List<String> values = new ArrayList<String>();
 
         if (dblProperty.hasRange()) {
             double min = (double) dblProperty.min();
             double max = (double) dblProperty.max();
-            for (double iVal = min; iVal <= max; iVal = iVal + 1) {
-                values.add(String.valueOf(iVal));
+            for (double val = min; val <= max; val += 0.1) {
+                formatter.setMaximumFractionDigits(1);
+                formatter.setMinimumFractionDigits(1);
+                values.add(formatter.format(val));
             }
         } else if (dblProperty.hasValues()) {
             for (Double val : dblProperty.getValues()) {