|
|
@ -1,11 +1,13 @@ |
|
|
|
package com.fr.start; |
|
|
|
package com.fr.start; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.concurrent.NamedThreadFactory; |
|
|
|
import com.fr.concurrent.NamedThreadFactory; |
|
|
|
|
|
|
|
import com.fr.design.constants.DesignerLaunchStatus; |
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
import com.fr.design.mainframe.bbs.BBSConstants; |
|
|
|
import com.fr.design.mainframe.bbs.BBSConstants; |
|
|
|
import com.fr.event.Event; |
|
|
|
import com.fr.event.Event; |
|
|
|
import com.fr.event.EventDispatcher; |
|
|
|
import com.fr.event.EventDispatcher; |
|
|
|
import com.fr.event.Listener; |
|
|
|
import com.fr.event.Listener; |
|
|
|
|
|
|
|
import com.fr.event.Null; |
|
|
|
import com.fr.general.GeneralContext; |
|
|
|
import com.fr.general.GeneralContext; |
|
|
|
import com.fr.general.locale.image.I18nImage; |
|
|
|
import com.fr.general.locale.image.I18nImage; |
|
|
|
import com.fr.module.ModuleEvent; |
|
|
|
import com.fr.module.ModuleEvent; |
|
|
@ -28,13 +30,13 @@ public class SplashContext { |
|
|
|
public static final String SPLASH_PATH = getSplashPath(); |
|
|
|
public static final String SPLASH_PATH = getSplashPath(); |
|
|
|
public static final String SPLASH_CACHE_NAME = SPLASH_PATH.substring(SPLASH_PATH.lastIndexOf("/") + 1); |
|
|
|
public static final String SPLASH_CACHE_NAME = SPLASH_PATH.substring(SPLASH_PATH.lastIndexOf("/") + 1); |
|
|
|
private static final int FETCH_ONLINE_MAX_TIMES = 50; |
|
|
|
private static final int FETCH_ONLINE_MAX_TIMES = 50; |
|
|
|
private static final String THANKS = Toolkit.i18nText("Fine-Design_Report_Thanks_To"); |
|
|
|
private String THANKS = StringUtils.EMPTY; |
|
|
|
|
|
|
|
|
|
|
|
private static final SplashContext SPLASH_CONTEXT = new SplashContext(); |
|
|
|
private static final SplashContext SPLASH_CONTEXT = new SplashContext(); |
|
|
|
|
|
|
|
|
|
|
|
private SplashStrategy splashStrategy; |
|
|
|
private SplashStrategy splashStrategy; |
|
|
|
|
|
|
|
|
|
|
|
private String moduleId = Toolkit.i18nText("Fine-Design_Basic_Initializing"); |
|
|
|
private String moduleId = StringUtils.EMPTY; |
|
|
|
private int loadingIndex = 0; |
|
|
|
private int loadingIndex = 0; |
|
|
|
private String[] loading = new String[]{"..", "....", "......"}; |
|
|
|
private String[] loading = new String[]{"..", "....", "......"}; |
|
|
|
|
|
|
|
|
|
|
@ -73,8 +75,13 @@ public class SplashContext { |
|
|
|
public void show() { |
|
|
|
public void show() { |
|
|
|
splashStrategy.show(); |
|
|
|
splashStrategy.show(); |
|
|
|
//监听
|
|
|
|
//监听
|
|
|
|
|
|
|
|
EventDispatcher.listen(DesignerLaunchStatus.UI_PRE_INIT_COMPLETE, new Listener<Null>() { |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public void on(Event event, Null param) { |
|
|
|
initListener(); |
|
|
|
initListener(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 隐藏启动动画 |
|
|
|
* 隐藏启动动画 |
|
|
@ -91,6 +98,8 @@ public class SplashContext { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void initListener() { |
|
|
|
private void initListener() { |
|
|
|
|
|
|
|
THANKS = Toolkit.i18nText("Fine-Design_Report_Thanks_To"); |
|
|
|
|
|
|
|
moduleId = Toolkit.i18nText("Fine-Design_Basic_Initializing"); |
|
|
|
scheduler.scheduleAtFixedRate(new Runnable() { |
|
|
|
scheduler.scheduleAtFixedRate(new Runnable() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
public void run() { |
|
|
|