Browse Source

REPORT-13303 设计器如果根目录有很多面板, 会卡在白屏很久, 不合理.

bugfix/10.0
Hades 6 years ago
parent
commit
9475d65d27
  1. 30
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java

30
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.Iterator;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public class DesignerFrame extends JFrame implements JTemplateActionListener, TargetModifiedListener { public class DesignerFrame extends JFrame implements JTemplateActionListener, TargetModifiedListener {
@ -247,6 +249,9 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
private ProgressDialog progressDialog; private ProgressDialog progressDialog;
private ExecutorService fixedThreadPool = Executors.newFixedThreadPool(1);
public DesignerFrame(ToolBarMenuDock ad) { public DesignerFrame(ToolBarMenuDock ad) {
setName(DESIGNER_FRAME_NAME); setName(DESIGNER_FRAME_NAME);
@ -809,18 +814,21 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
* 报表运行环境改变时,需要刷新某些面板 * 报表运行环境改变时,需要刷新某些面板
*/ */
public void refreshEnv() { public void refreshEnv() {
this.setTitle(); this.setTitle();
DesignerFrameFileDealerPane.getInstance().refreshDockingView(); fixedThreadPool.execute(new Runnable() {
TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()); @Override
TemplateTreePane.getInstance().refreshDockingView(); public void run() {
DesignTableDataManager.clearGlobalDs(); DesignerFrameFileDealerPane.getInstance().refreshDockingView();
EastRegionContainerPane.getInstance().refreshDownPane(); TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter());
TemplateTreePane.getInstance().refreshDockingView();
JTemplate template = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); DesignTableDataManager.clearGlobalDs();
if (template != null) { EastRegionContainerPane.getInstance().refreshDownPane();
template.refreshToolArea(); JTemplate template = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
} if (template != null) {
template.refreshToolArea();
}
}
});
} }
/** /**

Loading…
Cancel
Save