当前位置: 首页>>代码示例>>Java>>正文


Java SplashScreen.close方法代码示例

本文整理汇总了Java中java.awt.SplashScreen.close方法的典型用法代码示例。如果您正苦于以下问题:Java SplashScreen.close方法的具体用法?Java SplashScreen.close怎么用?Java SplashScreen.close使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.awt.SplashScreen的用法示例。


在下文中一共展示了SplashScreen.close方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: start

import java.awt.SplashScreen; //导入方法依赖的package包/类
@Override
public void start(Stage primaryStage) throws Exception {
    try {
        BaseController.setStage(primaryStage);
        BaseController.setHostServices(getHostServices());
        primaryStage.getIcons().add(new Image("/com/ciphertechsolutions/io/ui/icons/ion.png"));

        SplashScreen splash = SplashScreen.getSplashScreen();
        MainScreenController root = BaseController.loadFXML(MainScreenController.getFXMLLocation(),
                MainScreenController.class);
        controller = new ProcessController();
        root.setWorkflowController(controller);
        root.performSetup();
        primaryStage.setScene(root.getScene());
        if (splash != null) {
            splash.close();
        }
        primaryStage.show();
        BaseController.changeScene(root.getScene());

    }
    catch (Exception e) {
        BaseController.displayErrorPopup(e, "Failed to initialize! Details: ");
        System.exit(1);
    }
}
 
开发者ID:ciphertechsolutions,项目名称:IO,代码行数:27,代码来源:GUILauncher.java

示例2: MediathekAuto

import java.awt.SplashScreen; //导入方法依赖的package包/类
public MediathekAuto(String[] ar) {
    if (ar != null) {
        if (ar.length > 0) {
            if (!ar[0].startsWith("-")) {
                if (!ar[0].endsWith(File.separator)) {
                    ar[0] += File.separator;
                }
                pfad = ar[0];
            }
        }
    }
    try {
        final SplashScreen splash = SplashScreen.getSplashScreen();
        if (splash != null) {
            splash.close();
        }
    } catch (Exception ignored) {
        SysMsg.sysMsg("NoSplashscreen");
    }
}
 
开发者ID:mediathekview,项目名称:MediathekView,代码行数:21,代码来源:MediathekAuto.java

示例3: lifecycleEvent

import java.awt.SplashScreen; //导入方法依赖的package包/类
/**
 * Acknowledge the occurrence of the specified event.
 *
 * @param event LifecycleEvent that has occurred
 */
@Override
public void lifecycleEvent(LifecycleEvent event) {
    if(event.getType().equals(Lifecycle.AFTER_START_EVENT)) {
        if(!GraphicsEnvironment.isHeadless()) {
            SplashScreen splashScreen = SplashScreen.getSplashScreen();
            if(splashScreen != null) {
                try {
                    splashScreen.close();
                } catch (IllegalStateException e) {
                    
                }
            }
        }
    } else if(event.getType().equals(Lifecycle.BEFORE_START_EVENT)) {
        if(!GraphicsEnvironment.isHeadless()) {
            showStatus("Starting Apache Tomcat ...");
            showProgress(0);
        }
    }
}
 
开发者ID:apache,项目名称:marmotta,代码行数:26,代码来源:SplashScreenListener.java

示例4: closeSplashScreen

import java.awt.SplashScreen; //导入方法依赖的package包/类
@Override
public void closeSplashScreen() {
    SplashScreen splash = SplashScreen.getSplashScreen();
    if (splash != null) {
        splash.close();
    }
}
 
开发者ID:raeleus,项目名称:LibGDX-SplashScreen-Example,代码行数:8,代码来源:DesktopSplashWorker.java

示例5: start

import java.awt.SplashScreen; //导入方法依赖的package包/类
@Override
public void start(Stage primaryStage) throws Exception {
	try {
		final SplashScreen splash = SplashScreen.getSplashScreen();

        // Determine if we passed anything on the cmd line
        parseCmdLine();

        // Define our controllers
        SpeedGuideViewController viewController = loadFXMLController("view/SpeedGuideView.fxml");
        SpeedGuideConnection connectionController = loadFXMLController("view/ConnectionDialog.fxml");

		// Wire up our Model/View/Controllers
		viewController.setConnectionViewController(connectionController);
		viewController.setDebug(m_debug);
		viewController.defineControlBindings(m_consumer);

		// Notify our consumer some setup information
        m_consumer.setDebug(m_debug);
        m_consumer.setViewController(viewController);

		// Define the main viewing scene,
        AnchorPane layout = viewController.getLayout();
		Scene scene = new Scene(layout, layout.getPrefWidth(), layout.getPrefHeight());

		// Prevent the user from resizing the window too small
		primaryStage.setMinHeight(layout.getMinHeight());
		primaryStage.setMinWidth(layout.getMinWidth());

		// Assign to our main stage and show the application to the end user
		primaryStage.setTitle("Speed Guide");
		primaryStage.setScene(scene);
		primaryStage.show();

		// Set up our EMA Consumer and launch a thread to run...
        Thread t = new Thread(m_consumer);
        t.start();

    	Application.Parameters params = getParameters();
    	connectionController.initialize(params.getNamed().get(HOST_PARAM),
    						  			params.getNamed().get(SERVICE_PARAM),
    						  			params.getNamed().get(USER_PARAM),
    						  			m_consumer);

        // Attempt to Connect into Elektron
		if ( splash != null )
			splash.close();
        connectionController.connect();
	} catch  (Exception e) {
		System.out.print("Exception in Application Start: ");
		e.printStackTrace();
		stop();
	}
}
 
开发者ID:TR-API-Samples,项目名称:Example.EMA.Java.SpeedGuide,代码行数:55,代码来源:SpeedGuide.java

示例6: launchApplet

import java.awt.SplashScreen; //导入方法依赖的package包/类
/**
 * Launches a JNLP applet. This method should be called from a
 * thread in the application's thread group.
 * <p>
 * The enableCodeBase parameter adds the applet's codebase to
 * the locations searched for resources and classes.  This can
 * slow down the applet loading but allows browser-style applets
 * that don't use JAR files exclusively to be run from a applet
 * JNLP file.  If the applet JNLP file does not specify any
 * resources then the code base will be enabled regardless of
 * the specified value.
 * </p>
 *
 * @param file the JNLP file
 * @param enableCodeBase whether to add the codebase URL to the classloader
 * @param cont container where to put application
 * @return application
 * @throws net.sourceforge.jnlp.LaunchException if deploy unrecoverably die
 */
protected ApplicationInstance launchApplet(JNLPFile file, boolean enableCodeBase, Container cont) throws LaunchException {
    if (!file.isApplet()) {
        throw launchError(new LaunchException(file, null, R("LSFatal"), R("LCClient"), R("LNotApplet"), R("LNotAppletInfo")));
    }
  
    if (JNLPRuntime.getForksAllowed() && file.needsNewVM()) {
        if (!JNLPRuntime.isHeadless()) {
            SplashScreen sp = SplashScreen.getSplashScreen();
            if (sp != null) {
                sp.close();
            }
        }
    }
    if (handler != null) {
        handler.launchInitialized(file);
    }
    
    AppletInstance applet = null;
    try {
        ServiceUtil.checkExistingSingleInstance(file);
        applet = createApplet(file, enableCodeBase, cont);
        applet.initialize();
        applet.getAppletEnvironment().startApplet(); // this should be a direct call to applet instance
        return applet;
    } catch (InstanceExistsException ieex) {
        OutputController.getLogger().log("Single instance applet is already running.");
        throw launchError(new LaunchException(file, ieex, R("LSFatal"), R("LCLaunching"), R("LCouldNotLaunch"), R("LSingleInstanceExists")), applet);
    } catch (LaunchException lex) {
        throw launchError(lex, applet);
    } catch (Exception ex) {
        throw launchError(new LaunchException(file, ex, R("LSFatal"), R("LCLaunching"), R("LCouldNotLaunch"), R("LCouldNotLaunchInfo")), applet);
    }finally{
        if (handler != null) {
            handler.launchStarting(applet);
        }
    }
}
 
开发者ID:GITNE,项目名称:icedtea-web,代码行数:57,代码来源:Launcher.java

示例7: closeSplashScreen

import java.awt.SplashScreen; //导入方法依赖的package包/类
private static void closeSplashScreen() {
	if (GraphicsEnvironment.isHeadless()) {
		return;
	}
	SplashScreen splash = SplashScreen.getSplashScreen();
	if (splash != null) {
		try {
			splash.close();
			LOGGER.debug("Successfully closed the splash screen");
		} catch (IllegalStateException e) {
			LOGGER.debug("Splash screen already closed; no big deal");
		}
	}
}
 
开发者ID:The4thLaw,项目名称:demyo,代码行数:15,代码来源:Start.java

示例8: run

import java.awt.SplashScreen; //导入方法依赖的package包/类
@Override
public void run() {
	// Get App Icons
	ImageManager imageManager = new ImageManager();
	List<Image> appIcons = new ArrayList<Image>();
	appIcons.add(imageManager.getImage("icon/app/icon 128x128.png"));
	appIcons.add(imageManager.getImage("icon/app/icon 64x64.png"));
	appIcons.add(imageManager.getImage("icon/app/icon 32x32.png"));
	appIcons.add(imageManager.getImage("icon/app/icon 16x16.png"));

	// Hide Splash Screen so the JFrame does not hide when appearing
	SplashScreen s = SplashScreen.getSplashScreen();
	if (s != null){
		s.close();
	}

	// Initialize Frame
	JFrame frame = new JFrame(TinkerTimeLauncher.FULL_NAME);
	frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	frame.setLayout(new BorderLayout());
	frame.setIconImages(appIcons);
	frame.setJMenuBar(menuBar);
	frame.add(toolBar, BorderLayout.NORTH);
	frame.add(modSelectorPanelController.getComponent(), BorderLayout.CENTER);
	frame.pack();
	frame.setLocationRelativeTo(null);
	frame.setVisible(true);
	frame.toFront();
}
 
开发者ID:oharaandrew314,项目名称:TinkerTime,代码行数:30,代码来源:TinkerTimeLauncher.java

示例9: closeSplashIfneeded

import java.awt.SplashScreen; //导入方法依赖的package包/类
private static void closeSplashIfneeded() {
	if (isHeadless())
		return;
	SplashScreen splash = SplashScreen.getSplashScreen();
	//Check if we have specified any splash screen
	if (splash == null) {
		return;
	}
	if (splash.isVisible())
		splash.close();
}
 
开发者ID:LSIR,项目名称:gsn,代码行数:12,代码来源:Main.java

示例10: initSplashScreen

import java.awt.SplashScreen; //导入方法依赖的package包/类
private void initSplashScreen() {
    final SplashScreen splash = SplashScreen.getSplashScreen();

    if (splash != null) {
        Graphics2D g = splash.createGraphics();

        if (g != null) {
            return;
        }

        splash.close();
    }
}
 
开发者ID:moosbusch,项目名称:Lumpi,代码行数:14,代码来源:HostFrame.java

示例11: start

import java.awt.SplashScreen; //导入方法依赖的package包/类
@Override
    public void start(Stage pStage) 
    {  
        Globals.primaryStage=pStage;
        Globals.primaryStage.setOnCloseRequest(new EventHandler<WindowEvent>()
        {
            @Override
            public void handle(WindowEvent event) 
            {
                destruct();
            }
        });
//        Globals.primaryStage.widthProperty().addListener(new ChangeListener<Number>() 
//        {
//            @Override public void changed(ObservableValue<? extends Number> observableValue, Number oldSceneWidth, Number newSceneWidth) 
//            {
//                if(newSceneWidth.intValue()>ObdqProperties.MaxWidth)
//                     Globals.primaryStage.setWidth(ObdqProperties.MaxWidth);
//            }
//          });
        
        
        initialize();
        
            SettingsUtils.setPageHistory(LandingPage.class);
            Globals.Page=new Scene(Globals.root , ObdqProperties.defaultWindowWidth, ObdqProperties.defaultWindowHeight);
            Globals.Page.getStylesheets().addAll(SettingsUtils.getTheamFolderLocation()+SettingsUtils.cssLocation);
            Globals.currentPage=LandingPage.class;
            new LandingPage().getPageContent(Globals.root,Globals.pane);     

        Globals.primaryStage.setScene(Globals.Page);
        Globals.primaryStage.show();
        SplashScreen splash = SplashScreen.getSplashScreen();
        if(splash!=null)
        {
            splash.close();
            splash=null;
        }

    }
 
开发者ID:obdq,项目名称:obdq,代码行数:41,代码来源:OBDQ.java

示例12: init

import java.awt.SplashScreen; //导入方法依赖的package包/类
private void init(String[] args) throws Exception {
    final SplashScreen splash = SplashScreen.getSplashScreen();
    //System.err.println("Splash " + splash.getImageURL() );
    if (splash == null) {
    	System.err.println("Cannot launch splash screen. Proceeding.");
    }
    Method m = loadBrevisMain();
    if (splash != null) {
        splash.close();
    }
    invokeBrevisMain(m, args);
}
 
开发者ID:kephale,项目名称:brevis,代码行数:13,代码来源:Launcher.java

示例13: closeSplash

import java.awt.SplashScreen; //导入方法依赖的package包/类
private static void closeSplash() {
	try {
		final SplashScreen splash = SplashScreen.getSplashScreen();
		if (splash != null) {
			splash.close();
		}
	} catch (final IllegalStateException e) {
		logger.error("Error closing the splash window", e); //$NON-NLS-1$
	}
}
 
开发者ID:openforis,项目名称:collect-earth,代码行数:11,代码来源:EarthApp.java


注:本文中的java.awt.SplashScreen.close方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。