本文整理汇总了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);
}
}
示例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;
}
}
示例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();
}
示例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);
}
}
示例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();
}
示例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);
});
}
示例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();
}
}
示例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();
}
}
示例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);
}
示例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();
}
示例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();
}
示例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();
}
示例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);
});
}
示例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();
}
示例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;
}