[Title] Fixing bug in timeline renderer
authorkamuru <kamuru@kamuru-Samsung-Desktop-System.(none)>
Fri, 27 Dec 2013 08:49:35 +0000 (17:49 +0900)
committerkamuru <kamuru@kamuru-Samsung-Desktop-System.(none)>
Fri, 27 Dec 2013 08:49:35 +0000 (17:49 +0900)
[Desc.] Fixing bug in timeline renderer when draw time string
[Issue]

org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/timeline/DATimelineTinyTimeRenderer.java

index 0a4b071..2a1659c 100644 (file)
@@ -44,7 +44,9 @@ public class DATimelineTinyTimeRenderer extends DATimelineTimeRenderer {
                        if (firstTime - (int) firstTime == 0) {
                                timeString = Formatter.toTimelineFormat((int) firstTime);
                        } else {
-                               String minorityString = Double.toString(firstTime).substring(1);
+                               String firstTimeString = Double.toString(firstTime);
+                               String minorityString = firstTimeString
+                                               .substring(firstTimeString.indexOf('.'));
                                int timeIntervalMinorityStringLength = Double.toString(
                                                timeInterval.doubleValue()).length() - 1;
                                if (minorityString.length() > timeIntervalMinorityStringLength) {