From fae53c40a3153f38e296fab9a0bc8d167577c363 Mon Sep 17 00:00:00 2001 From: fr_shine Date: Wed, 6 Sep 2017 09:55:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=9B=E5=BA=A6=E6=9D=A1=E6=95=B4=E6=95=B0%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/plugin/chart/DownloadOnlineSourcesHelper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer_chart/src/com/fr/plugin/chart/DownloadOnlineSourcesHelper.java b/designer_chart/src/com/fr/plugin/chart/DownloadOnlineSourcesHelper.java index 1f8d05737..19218d480 100644 --- a/designer_chart/src/com/fr/plugin/chart/DownloadOnlineSourcesHelper.java +++ b/designer_chart/src/com/fr/plugin/chart/DownloadOnlineSourcesHelper.java @@ -26,7 +26,7 @@ import java.util.List; /** * Created by shine on 2017/8/21. */ -public class DownloadOnlineSourcesHelper implements DownloadSourcesEvent{ +public class DownloadOnlineSourcesHelper implements DownloadSourcesEvent { // 定义加载窗口大小 private static final int LOAD_WIDTH = 455; private static final int INCIDENT_HEIGHT = 15; @@ -190,7 +190,7 @@ public class DownloadOnlineSourcesHelper implements DownloadSourcesEvent{ private void setProgress(double current) { progressbar.setValue((int) current); - progressbar.setString(current / totalBytes * PERCENT + "%"); + progressbar.setString((int) (current / totalBytes * PERCENT) + "%"); progressbar.paintImmediately(new Rectangle(0, 0, LOAD_WIDTH, INCIDENT_HEIGHT * 2)); }