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


Java Platform.setImplicitExit方法代码示例

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


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

示例1: start

import javafx.application.Platform; //导入方法依赖的package包/类
public void start(Stage primaryStage, Pane rootLayout) throws Exception {
  	ourStage = primaryStage;
  	createTrayIcon(primaryStage);
      firstTime = true;
      Platform.setImplicitExit(false);
      primaryStage.setTitle("Fantasy World Manager Web Service - " + App.worldFileUtil.getWorldName());
      primaryStage.getIcons().add(new javafx.scene.image.Image(App.retGlobalResource("/src/main/webapp/WEB-INF/images/icons/server/64.png").openStream()));
      Scene myScene = new Scene(rootLayout);
      myScene.getStylesheets().add(App.retGlobalResource("/src/main/ui/jettyWindowStylesheet.css").toString());
      primaryStage.setScene(myScene);
      primaryStage.show();
      started = true;
      showAddress();
      showPassword();
      radio10.setSelected(WorldConfig.getRad10());
      radio15.setSelected(WorldConfig.getRad15());
      radioShowAll.setSelected(WorldConfig.getShowAll());
      setScene(myScene);
      visPasswordVar.toBack();
if(AppConfig.getDarkMode())
{
	setDark(true);
}
  }
 
开发者ID:ForJ-Latech,项目名称:fwm,代码行数:25,代码来源:JettyController.java

示例2: createBrowser

import javafx.application.Platform; //导入方法依赖的package包/类
private void createBrowser() {
    Platform.setImplicitExit(false);
    if( null == browser ) {
        WebView view = new WebView();
        initBrowser( view );
        issue217410Hack(view);

        browser = view;
        INIT_LOCK.release();
    }

    if( null != container ) {
        BorderPane pane = new BorderPane();
        pane.setCenter( browser );
        Scene scene = new Scene( pane );
        scene.setFill( getSceneFillColor() );
        container.setScene( scene );
    }

    if( null != urlToLoad ) {
        _setURL( urlToLoad );
        urlToLoad = null;
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:25,代码来源:WebBrowserImpl.java

示例3: start

import javafx.application.Platform; //导入方法依赖的package包/类
@Override
public void start(final Stage stage) {
    Platform.setImplicitExit(false);
    STAGE_TITLE = "STAGE_TITLE";
    STAGE_TITLE_2 = "STAGE_TITLE_2";
    STAGE_PANE = new Pane();
    TEST_STAGE = stage;
    stage.show();
    stage.hide();
}
 
开发者ID:Tristan971,项目名称:EasyFXML,代码行数:11,代码来源:StagesTest.java

示例4: startMe

import javafx.application.Platform; //导入方法依赖的package包/类
/**
 * Called by a thread created when
 */
public static void startMe()
{
    if (primaryStage == null)
    {
        try
        {
            Platform.setImplicitExit(false);
            Bootstrap.launch();
        }
        catch (Exception exception)
        {
            FlexFXBundle.setStartupException(exception);
        }
    }
    else
    {
        FlexFXBundle.setStage(primaryStage, IS_FX_THREAD_RESTART);
    }
}
 
开发者ID:jtkb,项目名称:flexfx,代码行数:23,代码来源:Bootstrap.java

示例5: start

import javafx.application.Platform; //导入方法依赖的package包/类
@Override
public void start(Stage stage) throws Exception {

    Platform.setImplicitExit(false);

    Injector.setConfigurationSource(config::getInjectionValue);
    Injector.setLogger(s -> LOG.info(s));
    Injector.setModelOrService(Logger.class, LOG);
    Injector.setModelOrService(HueSenseConfig.class, config);
    Injector.setModelOrService(DBManager.class, dbMan);
    Injector.setModelOrService(DataStore.class, store);
    Injector.setModelOrService(HueComm.class, hue);
    Injector.setModelOrService(LanComm.class, lan);
    Injector.setModelOrService(MailService.class, mailServ);

    ConnectingView connView = new ConnectingView();
    Scene scene = new Scene(connView.getView());
    scene.setFill(Color.WHITE);
    stage.setTitle("HueSense");
    final String uri = Thread.currentThread().getContextClassLoader().getResource("global.css").toExternalForm();
    scene.getStylesheets().add(uri);
    stage.initStyle(StageStyle.TRANSPARENT);
    stage.setScene(scene);
    stage.setAlwaysOnTop(true);
    stage.setResizable(false);

    stage.centerOnScreen();
    UIUtils.setIcon(stage);

    stage.show();

    hue.startConnecting();

}
 
开发者ID:dainesch,项目名称:HueSense,代码行数:35,代码来源:Launcher.java

示例6: start

import javafx.application.Platform; //导入方法依赖的package包/类
@Override
public void start(Stage primaryStage) throws Exception {
    Platform.setImplicitExit(true);
    SearchTreePaneController paneBuilder = new SearchTreePaneController(conceptService, uiBundle);
    BorderPane node = paneBuilder.getRoot();
    FlowPane pane = new FlowPane();
    pane.setPrefSize(800, 250);
    DragPaneDecorator dragPaneDecorator = new DragPaneDecorator(conceptService, eventBus, uiBundle);
    dragPaneDecorator.decorate(pane);
    node.setBottom(pane);
    Scene scene = new Scene(node, 800, 800);
    scene.getStylesheets().add("/css/common.css");
    primaryStage.setScene(scene);
    primaryStage.show();
    primaryStage.setOnCloseRequest(e -> {
        Platform.exit();
        System.exit(0);
    });
}
 
开发者ID:mbari-media-management,项目名称:vars-annotation,代码行数:20,代码来源:DragAndDropDemo.java

示例7: close

import javafx.application.Platform; //导入方法依赖的package包/类
public static void close(){
	log.debug("Jetty Controller is closing");
       try {
       	Platform.setImplicitExit(true);
    	   started = false;
    	   server.stop();
    	   server.join();
    	   ourStage.close();
   } catch (Exception e1) {
	   e1.printStackTrace();
   }
}
 
开发者ID:ForJ-Latech,项目名称:fwm,代码行数:13,代码来源:JettyController.java

示例8: closeWindow

import javafx.application.Platform; //导入方法依赖的package包/类
private void closeWindow(WindowEvent e){
	log.debug("Jetty Controller is closing");
       try {
       	Platform.setImplicitExit(true);
    	   started = false;
    	   server.stop();
    	   server.join();
    	   ourStage.close();
   } catch (Exception e1) {
	   e1.printStackTrace();
   }
}
 
开发者ID:ForJ-Latech,项目名称:fwm,代码行数:13,代码来源:JettyController.java

示例9: initFX

import javafx.application.Platform; //导入方法依赖的package包/类
private void initFX() {
    Platform.setImplicitExit(false);
    v = new WebView();
    BorderPane bp = new BorderPane();
    Scene scene = new Scene(bp, Color.ALICEBLUE);

    class X implements ChangeListener<String>, Runnable {

        private String title;

        public X() {
            super();
        }

        @Override
        public void changed(ObservableValue<? extends String> ov, String t, String t1) {
            title = v.getEngine().getTitle();
            EventQueue.invokeLater(this);
        }

        @Override
        public void run() {
            if (title != null) {
                HtmlComponent.this.setDisplayName(title);
            }
        }
    }
    final X x = new X();
    v.getEngine().titleProperty().addListener(x);
    Platform.runLater(x);
    bp.setCenter(v);
    p.setScene(scene);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:34,代码来源:HtmlComponent.java

示例10: start

import javafx.application.Platform; //导入方法依赖的package包/类
@Override
public void start(Stage stage) throws Exception {
    logger.info("Starting application");

    Platform.setImplicitExit(true);

    ApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);
    ScreensConfig screens = context.getBean(ScreensConfig.class);
    LanguageModel lang = context.getBean(LanguageModel.class);

    screens.setLangModel(lang);
    screens.setPrimaryStage(stage);
    screens.showMainScreen();
    screens.loadFirst();
}
 
开发者ID:stancalau,项目名称:springfx,代码行数:16,代码来源:Main.java

示例11: saveConfig

import javafx.application.Platform; //导入方法依赖的package包/类
@FXML
private void saveConfig() {
    JGMRConfig.getInstance().setAuthCode(tbAuthCode.getText());
    JGMRConfig.getInstance().setPath(tbSaveDirectory.getText());
    JGMRConfig.getInstance().setSaveFileDialog(cbShowSave.selectedProperty().get());
    JGMRConfig.getInstance().setLogToFile(cbSaveLogInformation.selectedProperty().get());
    JGMRConfig.getInstance().setNotificationsMinized(cbMinimized.selectedProperty().get());
    JGMRConfig.getInstance().setMinimizeToTray(cbSystemtray.selectedProperty().get());
    JGMRConfig.getInstance().setDontAskMeToSave(cbAskForSave.selectedProperty().get());
    Platform.setImplicitExit(!cbSystemtray.selectedProperty().get());
    String frequency = (String) cbFrequency.getSelectionModel().getSelectedItem();
    switch (frequency) {
        case fifteenmin:
            JGMRConfig.getInstance().setNotificationFrequency(15);
            break;
        case thirtymin:
            JGMRConfig.getInstance().setNotificationFrequency(30);
            break;
        case sixtymin:
            JGMRConfig.getInstance().setNotificationFrequency(60);
            break;
        case never:
            JGMRConfig.getInstance().setNotificationFrequency(0);
            break;
    }
    Stage stage = (Stage) tbAuthCode.getScene().getWindow();
    stage.close();
}
 
开发者ID:eternia16,项目名称:javaGMR,代码行数:29,代码来源:SettingsDialogController.java

示例12: start

import javafx.application.Platform; //导入方法依赖的package包/类
@Override
public void start(Stage primaryStage) throws Exception {
    Platform.setImplicitExit(true);
    TreeView<Concept> treeView = controller.getTreeView();
    Scene scene = new Scene(treeView, 800, 800);
    primaryStage.setScene(scene);

    primaryStage.setOnCloseRequest(e -> {
        Platform.exit();
        System.exit(0);
    });
    primaryStage.show();

}
 
开发者ID:mbari-media-management,项目名称:vars-annotation,代码行数:15,代码来源:TreeViewDemo.java

示例13: start

import javafx.application.Platform; //导入方法依赖的package包/类
@Override
public void start(Stage primaryStage) throws Exception {
    Platform.setImplicitExit(true);
    SearchTreePaneController controller = new SearchTreePaneController(conceptService, uiBundle);
    BorderPane node = controller.getRoot();
    Scene scene = new Scene(node, 800, 800);
    primaryStage.setScene(scene);
    primaryStage.show();
    primaryStage.setOnCloseRequest(e -> {
        Platform.exit();
        System.exit(0);
    });
}
 
开发者ID:mbari-media-management,项目名称:vars-annotation,代码行数:14,代码来源:SearchableTreePaneDemo.java

示例14: startGui

import javafx.application.Platform; //导入方法依赖的package包/类
public void startGui(final Stage primaryStage) {
    Platform.setImplicitExit(true);
    this.mainStage = primaryStage;
    primaryStage.setScene(this.getRootScene(easyFxml));
    primaryStage.setTitle(this.getMainStageTitle());
    primaryStage.show();
}
 
开发者ID:Tristan971,项目名称:Lyrebird,代码行数:8,代码来源:GuiBootstraper.java

示例15: setupClass

import javafx.application.Platform; //导入方法依赖的package包/类
/** Class initialization */
@BeforeClass
public static void setupClass() {
    StubTrace trace = new StubTrace();
    StubProject stubProject = new StubProject(trace);

    /* Initialize JavaFX */
    new JFXPanel();
    Platform.setImplicitExit(false);

    StubView view = new StubView();
    TimeGraphModelControl control = view.getControl();
    TimeGraphWidget viewer = view.getViewer();
    assertNotNull(viewer);

    JfxUtils.runLaterAndWait(() -> {
        stage = new Stage();
        stage.setScene(new Scene(viewer.getRootNode()));
        stage.show();

        /* Make sure the window has some reasonable dimensions. */
        stage.setHeight(500);
        stage.setWidth(1600);
    });
    updateUI();

    /* Disable automatic redraw. We'll trigger view painting manually. */
    viewer.getDebugOptions().isPaintingEnabled.set(false);
    /* Disable mouse listeners in case the mouse dwells inside the view. */
    viewer.getDebugOptions().isScrollingListenersEnabled.set(false);

    updateUI();

    control.getViewContext().setCurrentTraceProject(stubProject.getTraceProject());
    updateUI();

    sfProject = stubProject;
    sfView = view;
    sfWidget = viewer;
    sfControl = control;
}
 
开发者ID:lttng,项目名称:lttng-scope,代码行数:42,代码来源:TimeGraphWidgetTestBase.java


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