当前位置: 首页>>代码示例>>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;未经允许,请勿转载。