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 77c6bcf8f1..c14fe870fc 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 e10de8ab42..277ca93eb5 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 f88582e664..91e4f725e7 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 97bdceda1b..539e8359a0 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();