54 lines
1.6 KiB
54 lines
1.6 KiB
7 years ago
|
package com.fr.start.module;
|
||
|
|
||
|
import com.fr.module.Activator;
|
||
7 years ago
|
import com.fr.stable.CoreActivator;
|
||
7 years ago
|
import com.fr.stable.module.ModuleListener;
|
||
|
import com.fr.start.Designer;
|
||
7 years ago
|
import com.fr.start.EnvSwitcher;
|
||
7 years ago
|
import com.fr.start.ReportSplashPane;
|
||
|
import com.fr.start.SplashWindow;
|
||
|
import com.fr.startup.activators.BasicActivator;
|
||
|
|
||
|
/**
|
||
|
* Created by juhaoyu on 2018/1/8.
|
||
|
*/
|
||
|
public class DesignerStartup extends Activator {
|
||
7 years ago
|
|
||
7 years ago
|
@Override
|
||
|
public void start() {
|
||
7 years ago
|
|
||
7 years ago
|
startSub(PreStartActivator.class);
|
||
7 years ago
|
//启动基础部分
|
||
|
startSub(BasicActivator.class);
|
||
|
//启动画面
|
||
|
SplashWindow splashWindow = createSplashWindow();
|
||
7 years ago
|
String[] args = getModule().upFindSingleton(StartupArgs.class).get();
|
||
7 years ago
|
Designer designer = new Designer(args);
|
||
7 years ago
|
//启动env
|
||
7 years ago
|
startSub(DesignerEnvProvider.class);
|
||
|
//启动各个模块
|
||
7 years ago
|
getSub(CoreActivator.class).start();
|
||
7 years ago
|
getSub("designer").start();
|
||
7 years ago
|
getRoot().getSingleton(EnvSwitcher.class).switch2LastEnv();
|
||
7 years ago
|
//启动设计器界面
|
||
7 years ago
|
designer.show(args);
|
||
7 years ago
|
//启动画面结束
|
||
|
splashWindow.setVisible(false);
|
||
|
splashWindow.dispose();
|
||
|
startSub(StartFinishActivator.class);
|
||
|
}
|
||
7 years ago
|
|
||
7 years ago
|
private SplashWindow createSplashWindow() {
|
||
7 years ago
|
|
||
7 years ago
|
ReportSplashPane reportSplashPane = new ReportSplashPane();
|
||
|
SplashWindow splashWindow = new SplashWindow(reportSplashPane);
|
||
|
getModule().setSingleton(ModuleListener.class, reportSplashPane.getModuleListener());
|
||
|
return splashWindow;
|
||
|
}
|
||
7 years ago
|
|
||
7 years ago
|
@Override
|
||
|
public void stop() {
|
||
7 years ago
|
|
||
7 years ago
|
}
|
||
|
}
|