當前位置: 首頁>>代碼示例>>Java>>正文


Java Stage.setFullScreenExitHint方法代碼示例

本文整理匯總了Java中javafx.stage.Stage.setFullScreenExitHint方法的典型用法代碼示例。如果您正苦於以下問題:Java Stage.setFullScreenExitHint方法的具體用法?Java Stage.setFullScreenExitHint怎麽用?Java Stage.setFullScreenExitHint使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javafx.stage.Stage的用法示例。


在下文中一共展示了Stage.setFullScreenExitHint方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: start

import javafx.stage.Stage; //導入方法依賴的package包/類
@Override
public void start(Stage primaryStage) {
	GameChooser gameManager = new GameChooser(primaryStage);		
	primaryStage.setScene(makeScene());
	primaryStage.setFullScreenExitHint("");
	primaryStage.setFullScreenExitKeyCombination(null);
	primaryStage.show();
	primaryStage.setFullScreen(true);
       Animation myAnimation = makeAnimation(myActor, 100, 200, 100);
       // start animation
       myAnimation.play();
       
       Animation myAnimation1 = makeAnimation(myActor1, 100, 200, 100);
       // start animation
       myAnimation1.play();
       
       Animation myAnimation2 = makeAnimation(myActor2,100,240,140);
       // start animation
       myAnimation2.play();
}
 
開發者ID:LtubSalad,項目名稱:voogasalad-ltub,代碼行數:21,代碼來源:LoaderTester.java

示例2: start

import javafx.stage.Stage; //導入方法依賴的package包/類
/**
 *
 * @param primaryStage
 */
@Override
public void start(Stage primaryStage) {
    gameManager = new GameManager();
    gameBounds = gameManager.getLayoutBounds();

    StackPane root = new StackPane(gameManager);
    root.getStyleClass().addAll("game-root");
    ChangeListener<Number> resize = (ov, v, v1) -> {
        double scale = Math.min((root.getWidth() - MARGIN) / gameBounds.getWidth(), (root.getHeight() - MARGIN) / gameBounds.getHeight());
        gameManager.setScale(scale);
        gameManager.setLayoutX((root.getWidth() - gameBounds.getWidth()) / 2d);
        gameManager.setLayoutY((root.getHeight() - gameBounds.getHeight()) / 2d);
    };
    root.widthProperty().addListener(resize);
    root.heightProperty().addListener(resize);

    Scene scene = new Scene(root);
    scene.getStylesheets().add(CSS);
    addKeyHandler(scene);
    addSwipeHandlers(scene);

    if (isARMDevice()) {
        primaryStage.setFullScreen(true);
        primaryStage.setFullScreenExitHint("");
    }

    if (Platform.isSupported(ConditionalFeature.INPUT_TOUCH)) {
        scene.setCursor(Cursor.NONE);
    }

    Rectangle2D visualBounds = Screen.getPrimary().getVisualBounds();
    double factor = Math.min(visualBounds.getWidth() / (gameBounds.getWidth() + MARGIN),
            visualBounds.getHeight() / (gameBounds.getHeight() + MARGIN));
    primaryStage.setTitle("2048FX");
    primaryStage.setScene(scene);
    primaryStage.setMinWidth(gameBounds.getWidth() / 2d);
    primaryStage.setMinHeight(gameBounds.getHeight() / 2d);
    primaryStage.setWidth((gameBounds.getWidth() + MARGIN) * factor);
    primaryStage.setHeight((gameBounds.getHeight() + MARGIN) * factor);
    primaryStage.show();
}
 
開發者ID:juebanlin,項目名稱:util4j,代碼行數:46,代碼來源:Game2048.java


注:本文中的javafx.stage.Stage.setFullScreenExitHint方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。