Browse Source

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

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

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

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