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


Java Stage.setMaxHeight方法代碼示例

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


在下文中一共展示了Stage.setMaxHeight方法的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.setMaxHeight方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。