Search in sources :

Example 1 with SplashScreen

use of pcgen.gui2.SplashScreen in project pcgen by PCGen.

the class Main method startupWithGUI.

private static void startupWithGUI() {
    // configure the UI before any type of user prompting may take place
    configureUI();
    validateEnvironment(true);
    loadProperties(true);
    initPrintPreviewFonts();
    boolean showSplash = Boolean.parseBoolean(ConfigurationSettings.initSystemProperty("showSplash", "true"));
    //TODO: allow commandline override of splash property
    SplashScreen splash = null;
    if (showSplash) {
        splash = new SplashScreen();
        splash.setVisible(true);
    }
    PCGenTaskExecutor executor = new PCGenTaskExecutor();
    executor.addPCGenTask(createLoadPluginTask());
    executor.addPCGenTask(new GameModeFileLoader());
    executor.addPCGenTask(new CampaignFileLoader());
    if (splash != null) {
        executor.addPCGenTaskListener(splash);
    }
    executor.execute();
    if (splash != null) {
        //$NON-NLS-1$
        splash.setMessage(LanguageBundle.getString("in_taskInitUi"));
    }
    FacadeFactory.initialize();
    PCGenUIManager.initializeGUI();
    if (splash != null) {
        splash.dispose();
    }
    PCGenUIManager.startGUI();
}
Also used : CampaignFileLoader(pcgen.persistence.CampaignFileLoader) SplashScreen(pcgen.gui2.SplashScreen) GameModeFileLoader(pcgen.persistence.GameModeFileLoader)

Aggregations

SplashScreen (pcgen.gui2.SplashScreen)1 CampaignFileLoader (pcgen.persistence.CampaignFileLoader)1 GameModeFileLoader (pcgen.persistence.GameModeFileLoader)1