From 9475d65d278a7397d00cbc1cee67deee5882180c Mon Sep 17 00:00:00 2001 From: Hades Date: Mon, 24 Dec 2018 14:08:43 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-13303=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E6=A0=B9=E7=9B=AE=E5=BD=95=E6=9C=89=E5=BE=88?= =?UTF-8?q?=E5=A4=9A=E9=9D=A2=E6=9D=BF,=20=E4=BC=9A=E5=8D=A1=E5=9C=A8?= =?UTF-8?q?=E7=99=BD=E5=B1=8F=E5=BE=88=E4=B9=85,=20=E4=B8=8D=E5=90=88?= =?UTF-8?q?=E7=90=86.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/DesignerFrame.java | 30 ++++++++++++------- 1 file changed, 19 insertions(+), 11 deletions(-) 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 5c262da9de..a2c21ccabd 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 @@ -100,6 +100,8 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Set; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; public class DesignerFrame extends JFrame implements JTemplateActionListener, TargetModifiedListener { @@ -247,6 +249,9 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta private ProgressDialog progressDialog; + private ExecutorService fixedThreadPool = Executors.newFixedThreadPool(1); + + public DesignerFrame(ToolBarMenuDock ad) { setName(DESIGNER_FRAME_NAME); @@ -809,18 +814,21 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta * 报表运行环境改变时,需要刷新某些面板 */ public void refreshEnv() { - this.setTitle(); - DesignerFrameFileDealerPane.getInstance().refreshDockingView(); - TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()); - TemplateTreePane.getInstance().refreshDockingView(); - DesignTableDataManager.clearGlobalDs(); - EastRegionContainerPane.getInstance().refreshDownPane(); - - JTemplate template = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); - if (template != null) { - template.refreshToolArea(); - } + fixedThreadPool.execute(new Runnable() { + @Override + public void run() { + DesignerFrameFileDealerPane.getInstance().refreshDockingView(); + TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()); + TemplateTreePane.getInstance().refreshDockingView(); + DesignTableDataManager.clearGlobalDs(); + EastRegionContainerPane.getInstance().refreshDownPane(); + JTemplate template = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); + if (template != null) { + template.refreshToolArea(); + } + } + }); } /**