From a08bec7b167de5769ef077ee3d296aa338fdabfd Mon Sep 17 00:00:00 2001 From: ju Date: Fri, 14 Jun 2019 11:42:45 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-17988=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E5=90=AF=E5=8A=A8=E9=80=9F=E5=BA=A6--=E6=9C=AC=E6=9C=BA?= =?UTF-8?q?=E5=A4=A7=E6=A6=82=E4=BB=8E=2014.2s=20->=2010.2=20bugfix=20?= =?UTF-8?q?=E5=90=8E=E9=9D=A2=E5=88=B7=E6=96=B0env=E7=9A=84=E5=8E=9F?= =?UTF-8?q?=E5=9B=A0=E6=98=AF=E5=95=A5=EF=BC=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/event/DesignerOpenedListener.java | 2 +- .../fr/design/mainframe/DesignerFrame.java | 19 ++++++++----------- .../main/java/com/fr/start/BaseDesigner.java | 5 ++++- .../com/fr/start/module/DesignerStartup.java | 11 ----------- 4 files changed, 13 insertions(+), 24 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/event/DesignerOpenedListener.java b/designer-base/src/main/java/com/fr/design/event/DesignerOpenedListener.java index 77c6bcf8f..c14fe870f 100644 --- a/designer-base/src/main/java/com/fr/design/event/DesignerOpenedListener.java +++ b/designer-base/src/main/java/com/fr/design/event/DesignerOpenedListener.java @@ -9,5 +9,5 @@ public interface DesignerOpenedListener extends EventListener { /** * Invoked when the target of the listener has changed the rpt content. */ - public void designerOpened(); + void designerOpened(); } \ No newline at end of file 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 e10de8ab4..277ca93eb 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 @@ -308,16 +308,6 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta } } }); - this.addDesignerOpenedListener(new DesignerOpenedListener() { - - @Override - public void designerOpened() { - - HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().setComposite(); - reCalculateFrameSize(); - HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().doResize(); - } - }); this.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); this.setVisible(false); this.setExtendedState(JFrame.MAXIMIZED_BOTH); @@ -326,7 +316,14 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta initMenuPane(); this.progressDialog = new ProgressDialog(this); } - + + public void resizeFrame() { + + HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().setComposite(); + reCalculateFrameSize(); + HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().doResize(); + } + public void closeAuthorityEditing() { DesignModeContext.switchTo(com.fr.design.base.mode.DesignerMode.NORMAL); WestRegionContainerPane.getInstance().replaceDownPane( diff --git a/designer-base/src/main/java/com/fr/start/BaseDesigner.java b/designer-base/src/main/java/com/fr/start/BaseDesigner.java index f88582e66..91e4f725e 100644 --- a/designer-base/src/main/java/com/fr/start/BaseDesigner.java +++ b/designer-base/src/main/java/com/fr/start/BaseDesigner.java @@ -55,11 +55,14 @@ public abstract class BaseDesigner extends ToolBarMenuDock { public void show() { collectUserInformation(); showDesignerFrame(false); - DesignerContext.getDesignerFrame().setVisible(true); + + //TODO: 2019-06-14 这里有啥作用? DesignerContext.getDesignerFrame().refreshEnv(); for (int i = 0; !TemplateTreePane.getInstance().getTemplateFileTree().isTemplateShowing() && i < LOAD_TREE_MAXNUM; i++) { TemplateTreePane.getInstance().getTemplateFileTree().refresh(); } + DesignerContext.getDesignerFrame().setVisible(true); + DesignerContext.getDesignerFrame().resizeFrame(); } diff --git a/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java b/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java index 97bdceda1..539e8359a 100644 --- a/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java +++ b/designer-realize/src/main/java/com/fr/start/module/DesignerStartup.java @@ -1,21 +1,11 @@ package com.fr.start.module; -import com.fr.design.file.HistoryTemplateListCache; -import com.fr.event.Event; -import com.fr.event.Listener; import com.fr.module.Activator; import com.fr.record.analyzer.EnableMetrics; import com.fr.record.analyzer.Metrics; import com.fr.runtime.FineRuntime; -import com.fr.start.DesignerInitial; import com.fr.start.ServerStarter; -import com.fr.start.server.FineEmbedServer; -import com.fr.workspace.Workspace; -import com.fr.workspace.WorkspaceEvent; - -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; /** * Created by juhaoyu on 2018/1/8. @@ -31,7 +21,6 @@ public class DesignerStartup extends Activator { getSub("parallel").start(); //designer模块启动好后,查看demo browserDemo(); - startSub(DesignerShowActivator.class); startSub(StartFinishActivator.class); FineRuntime.startFinish();