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


Java Stage.setMaxWidth方法代码示例

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


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

示例1: start

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


    FXMLLoader loader = new FXMLLoader(getClass().getClassLoader().getResource("view.fxml"));

    GridPane gridPane = null;
    try {
        gridPane = loader.load();
    } catch (IOException e) {
        e.printStackTrace();
    }

    GeneratorController controller = loader.getController();

    Scene scene = new Scene(gridPane, 900, 450);
    stage.setTitle("Generator faktur Dtree");
    stage.setScene(scene);
    stage.setMaxHeight(842.0);
    stage.setMaxWidth(1366.0);
    stage.setResizable(true);
    stage.show();
}
 
开发者ID:Garret29,项目名称:PDF_Invoice_generator,代码行数:24,代码来源:GeneratorView.java

示例2: handleSaveGame

import javafx.stage.Stage; //导入方法依赖的package包/类
/**
 * Opens a dialog to save the game
 */
@FXML
protected void handleSaveGame() {
    try {
        // Load game saving view
        FXMLLoader loader = new FXMLLoader();
        loader.setResources(this.scrabble.getI18nMessages());
        loader.setLocation(Scrabble.class.getResource("view/SaveGame.fxml"));
        VBox page = loader.load();

        // Create the dialog stage
        Stage dialogStage = new Stage();
        dialogStage.setMinWidth(SaveGameController.STAGE_WIDTH);
        dialogStage.setMaxWidth(SaveGameController.STAGE_WIDTH);
        dialogStage.setMinHeight(SaveGameController.STAGE_HEIGHT);
        dialogStage.setMaxHeight(SaveGameController.STAGE_HEIGHT);

        dialogStage.setTitle(this.scrabble.getI18nMessages().getString("save"));
        dialogStage.initModality(Modality.WINDOW_MODAL);
        dialogStage.initOwner(this.scrabble.getPrimaryStage());

        Scene scene = new Scene(page);
        dialogStage.setScene(scene);

        SaveGameController controller = loader.getController();
        controller.setDialogStage(dialogStage);
        controller.setScrabble(this.scrabble);

        dialogStage.showAndWait();
    } catch (IOException e) {
        this.scrabble.showGeneralApplicationError(e);
    }
}
 
开发者ID:Chrisp1tv,项目名称:ScrabbleGame,代码行数:36,代码来源:GameController.java

示例3: start

import javafx.stage.Stage; //导入方法依赖的package包/类
@Override
public void start(Stage primaryStage) throws Exception {
    FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/main.fxml"));
    Parent root = fxmlLoader.load();
    primaryStage.setTitle("ソースリスト作るよ");
    primaryStage.setScene(new Scene(root, 700, 500));
    primaryStage.getIcons().add(new Image(getClass().getResourceAsStream("/icons.png")));
    primaryStage.setMinHeight(500);
    primaryStage.setMinWidth(700);
    Controller controller = fxmlLoader.getController();
    controller.init(primaryStage);
    primaryStage.setMaxHeight(500);
    primaryStage.setMaxWidth(700);


    primaryStage.show();
}
 
开发者ID:Khromium,项目名称:MakeSourceList4j,代码行数:18,代码来源:Main.java

示例4: configureSize

import javafx.stage.Stage; //导入方法依赖的package包/类
/**
 * Configure size of the root container.
 *
 * @param container the root container.
 * @param size      the size.
 */
@FXThread
private void configureSize(@NotNull final VBox container, @NotNull final Point size) {

    final Stage dialog = getDialog();

    final double width = size.getX();
    final double height = size.getY();

    if (width >= 1D) {
        FXUtils.setFixedWidth(container, width);
        dialog.setMinWidth(width);
        dialog.setMaxWidth(width);
    }

    if (height >= 1D) {
        FXUtils.setFixedHeight(container, height);
        dialog.setMinHeight(height);
        dialog.setMaxHeight(height);
    }
}
 
开发者ID:JavaSaBr,项目名称:jmonkeybuilder,代码行数:27,代码来源:EditorDialog.java

示例5: initGraphics

import javafx.stage.Stage; //导入方法依赖的package包/类
protected void initGraphics(Stage stage) {
	scene = new Scene(new Region());
	scene.setFill(null);
	
	stage.setMaxWidth(1);
	stage.setMaxHeight(1);
	stage.setWidth(1);
	stage.setHeight(1);
	stage.getIcons().add(new javafx.scene.image.Image("resources/Logo.png"));
	
	stage.setResizable(false);
	stage.setAlwaysOnTop(true);
}
 
开发者ID:Team-Sprout,项目名称:Clipcon-Client,代码行数:14,代码来源:Notification.java

示例6: handleExchangeLetterWithBag

import javafx.stage.Stage; //导入方法依赖的package包/类
/**
 * Exchanges a letter with the bag
 */
@FXML
protected void handleExchangeLetterWithBag() {
    try {
        this.refreshScrabbleInterface();

        // Load letters exchanging view
        FXMLLoader loader = new FXMLLoader();
        loader.setResources(this.scrabble.getI18nMessages());
        loader.setLocation(Scrabble.class.getResource("view/ExchangeLetter.fxml"));
        VBox page = loader.load();

        // Create the dialog stage
        Stage dialogStage = new Stage();
        dialogStage.setMinWidth(ExchangeLettersController.EXCHANGE_LETTERS_STAGE_WIDTH);
        dialogStage.setMaxWidth(ExchangeLettersController.EXCHANGE_LETTERS_STAGE_WIDTH);
        dialogStage.setMinHeight(ExchangeLettersController.EXCHANGE_LETTERS_STAGE_HEIGHT);
        dialogStage.setMaxHeight(ExchangeLettersController.EXCHANGE_LETTERS_STAGE_HEIGHT);

        dialogStage.setTitle(this.scrabble.getI18nMessages().getString("exchangeLettersWithTheBag"));
        dialogStage.initModality(Modality.WINDOW_MODAL);
        dialogStage.initOwner(this.scrabble.getPrimaryStage());

        Scene scene = new Scene(page);
        dialogStage.setScene(scene);

        ExchangeLettersController controller = loader.getController();
        controller.setDialogStage(dialogStage);
        controller.setScrabble(this.scrabble);
        controller.initializeInterface();

        dialogStage.showAndWait();

        this.refreshLetters();
    } catch (IOException e) {
        this.scrabble.showGeneralApplicationError(e);
    }
}
 
开发者ID:Chrisp1tv,项目名称:ScrabbleGame,代码行数:41,代码来源:GameController.java


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