Browse Source

Merge pull request #1134 in DESIGN/design from ~VITO/c-design:feature/10.0 to feature/10.0

* commit 'c3090829296a615b789c15af320fd24465e1a278':
  REPORT-22207 设计器不显示主界面
persist/11.0
neil 5 years ago
parent
commit
5424011bd1
  1. 22
      designer-base/src/main/java/com/fr/start/BaseDesigner.java
  2. 12
      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();

12
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)
INSTANCE = new ServerTray();
UIUtil.invokeLaterIfNeeded(new Runnable() {
@Override
public void run() {
if (INSTANCE == null) {
INSTANCE = new ServerTray();
}
}
});
}
}
Loading…
Cancel
Save