From a5caa2b1c81bc73d8cc63634a958f29511851ad5 Mon Sep 17 00:00:00 2001 From: Yvan Date: Fri, 11 Sep 2020 10:09:10 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-39338=20=E3=80=90=E5=9B=9E=E5=BD=92?= =?UTF-8?q?=E3=80=91=E5=86=85=E7=BD=AE=E6=9C=8D=E5=8A=A1=E5=99=A8=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E8=BF=9B=E5=BA=A6=E6=9D=A1=E4=BC=9A=E5=85=88=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E4=B8=8A=E6=AC=A1=E7=9A=84=E8=BF=9B=E5=BA=A6=E5=86=8D?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=201.=20=E6=9B=B4=E6=96=B0=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=96=B9=E6=A1=88=EF=BC=9A=E7=A1=AE=E5=AE=9A=E4=BA=86?= =?UTF-8?q?=E4=B8=80=E7=9B=B4=E7=BB=B4=E6=8A=A4=E5=90=8C=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E8=BF=9B=E5=BA=A6=E6=9D=A1dialog=E6=B2=A1=E6=9C=89=E7=89=B9?= =?UTF-8?q?=E6=AE=8A=E6=84=8F=E4=B9=89=E4=B9=8B=E5=90=8E=EF=BC=8C=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E5=9C=A8=E6=AF=8F=E4=B8=80=E6=AC=A1=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E5=99=A8=E6=88=96=E8=80=85=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=99=A8=E5=90=AF=E5=8A=A8=E5=AE=8C=E6=88=90=E5=90=8Edialog?= =?UTF-8?q?=E5=BA=9F=E5=BC=83=E6=8E=89=EF=BC=8C=E7=84=B6=E5=90=8E=E5=9C=A8?= =?UTF-8?q?=E6=AF=8F=E4=B8=80=E6=AC=A1=E9=9C=80=E8=A6=81=E6=89=93=E5=BC=80?= =?UTF-8?q?=E5=AF=B9=E8=AF=9D=E6=A1=86=E7=9A=84=E6=97=B6=E5=80=99=EF=BC=8C?= =?UTF-8?q?=E6=96=B0=E5=BB=BA=E4=B8=80=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gui/iprogressbar/ProgressDialog.java | 4 ---- .../com/fr/design/mainframe/DesignerFrame.java | 18 ++---------------- .../start/server/FineEmbedServerMonitor.java | 9 +++------ 3 files changed, 5 insertions(+), 26 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/iprogressbar/ProgressDialog.java b/designer-base/src/main/java/com/fr/design/gui/iprogressbar/ProgressDialog.java index 34407945f0..29214984c3 100644 --- a/designer-base/src/main/java/com/fr/design/gui/iprogressbar/ProgressDialog.java +++ b/designer-base/src/main/java/com/fr/design/gui/iprogressbar/ProgressDialog.java @@ -103,8 +103,4 @@ public class ProgressDialog extends UIDialog { } this.text.setText(text); } - - public void repaintProgressBar() { - progressBar.update(progressBar.getGraphics()); - } } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java index ab4d03a87f..4eda4e18b7 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java @@ -1269,20 +1269,12 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta return progressDialog; } - public void showProgressDialog() { - + public void openProgressDialog() { + progressDialog = new ProgressDialog(this); progressDialog.setVisible(true); } - /** - * 隐藏进度框 - */ - public void hideProgressDialog() { - - progressDialog.setVisible(false); - } - /** * 更新进度框进度 * @@ -1310,10 +1302,4 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta return designerOpened; } - /** - * 刷新进度框的UI部分 - */ - public void repaintProgressDialog() { - progressDialog.repaintProgressBar(); - } } diff --git a/designer-base/src/main/java/com/fr/start/server/FineEmbedServerMonitor.java b/designer-base/src/main/java/com/fr/start/server/FineEmbedServerMonitor.java index da8400c17a..2c77330589 100644 --- a/designer-base/src/main/java/com/fr/start/server/FineEmbedServerMonitor.java +++ b/designer-base/src/main/java/com/fr/start/server/FineEmbedServerMonitor.java @@ -47,7 +47,7 @@ public class FineEmbedServerMonitor { @Override public void on(Event event, Null aNull) { getInstance().reset(); - DesignerContext.getDesignerFrame().hideProgressDialog(); + DesignerContext.getDesignerFrame().disposeProgressDialog(); } }); } @@ -92,14 +92,11 @@ public class FineEmbedServerMonitor { public void run() { if (isComplete()) { scheduler.shutdown(); - // 在进度条满了之后,将进度条置0并清空进度,不然下一次打开进度条会先显示上一次的进度 - DesignerContext.getDesignerFrame().updateProgress(0); - DesignerContext.getDesignerFrame().repaintProgressDialog(); - DesignerContext.getDesignerFrame().hideProgressDialog(); + DesignerContext.getDesignerFrame().disposeProgressDialog(); return; } if (!DesignerContext.getDesignerFrame().getProgressDialog().isVisible()) { - DesignerContext.getDesignerFrame().showProgressDialog(); + DesignerContext.getDesignerFrame().openProgressDialog(); //如果为韩文则改变字体 LocaleCenter.buildAction(new LocaleAction() { @Override