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