OSDN Git Service

ダウンロード時のパーセント数値有効桁を修正
authoryukihane <yukihane.feather@gmail.com>
Sun, 14 Aug 2011 18:31:27 +0000 (03:31 +0900)
committeryukihane <yukihane.feather@gmail.com>
Sun, 14 Aug 2011 18:31:27 +0000 (03:31 +0900)
frontend/nbproject/project.properties
frontend/src/yukihane/inqubus/saccubus_adapter/NicoBrowserAdapter.java

index be21f64..3779299 100644 (file)
@@ -38,7 +38,6 @@ javac.classpath=\
     ${libs.Commons-Exec.classpath}:\\r
     ${libs.Commons-Collections.classpath}:\\r
     ${libs.toplink.classpath}:\\r
-    ${libs.HttpClient4.0.classpath}:\\r
     ${libs.H2_DB.classpath}:\\r
     ${libs.Commons-CLI.classpath}\r
 # Space-separated list of extra javac options\r
index d901ecf..16cc1ef 100644 (file)
@@ -96,7 +96,7 @@ public class NicoBrowserAdapter implements NicoClient {
                 @Override
                 public void progress(long fileSize, long downloadSize) {
                     final double p = ((double) downloadSize / fileSize) * 100.0;
-                    final String msg = "動画ダウンロード:" + p + "パーセント完了";
+                    final String msg = String.format("動画ダウンロード:%.2fパーセント完了", p);
                     listener.setText(msg);
                 }