Browse Source

REPORT-22207 设计器不显示主界面

persist/11.0
vito 5 years ago
parent
commit
c309082929
  1. 22
      designer-base/src/main/java/com/fr/start/BaseDesigner.java
  2. 10
      designer-base/src/main/java/com/fr/start/server/ServerTray.java

22
designer-base/src/main/java/com/fr/start/BaseDesigner.java

@ -46,6 +46,7 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
}
private void init() {
prepare();
// 初始化look and feel.这个在预加载之前执行是因为lookAndFeel里的东西,预加载时也要用到
DesignUtils.initLookAndFeel();
// 初始化Log Handler
@ -53,14 +54,10 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
createDesignerFrame();
}
public void show() {
UIUtil.invokeLaterIfNeeded(new Runnable() {
@Override
public void run() {
refreshTemplateTree();
}
});
/**
* 准备一些订阅
*/
private void prepare() {
EventDispatcher.listen(DesignerLaunchStatus.DESIGNER_INIT_COMPLETE, new Listener<Null>() {
@Override
public void on(Event event, Null param) {
@ -83,6 +80,15 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
});
}
public void show() {
UIUtil.invokeLaterIfNeeded(new Runnable() {
@Override
public void run() {
refreshTemplateTree();
}
});
}
private void refreshTemplateTree() {
//TODO: 2019-06-14 这里有啥作用?
DesignerContext.getDesignerFrame().refreshEnv();

10
designer-base/src/main/java/com/fr/start/server/ServerTray.java

@ -1,6 +1,7 @@
package com.fr.start.server;
import com.fr.base.BaseUtils;
import com.fr.design.ui.util.UIUtil;
import com.fr.event.Event;
import com.fr.event.EventDispatcher;
import com.fr.event.ListenerAdaptor;
@ -85,6 +86,7 @@ public class ServerTray {
//创建退出菜单监听器
ActionListener exitListener = new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
exit();
@ -177,7 +179,13 @@ public class ServerTray {
}
public static void init() {
if (INSTANCE == null)
UIUtil.invokeLaterIfNeeded(new Runnable() {
@Override
public void run() {
if (INSTANCE == null) {
INSTANCE = new ServerTray();
}
}
});
}
}
Loading…
Cancel
Save