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


Java BorderPane.setPrefHeight方法代码示例

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


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

示例1: getContentPane

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
@Override protected Parent getContentPane() {
    BorderPane root = new BorderPane();

    root.getStyleClass().add("MarathonFileChooser");
    root.setId("marathon-file-chooser");
    if (doesAllowChildren) {
        if (!fileChooserInfo.isFileCreation()) {
            propertiesView = new AddPropertiesView(new TestPropertiesInfo(fileChooserInfo.getFileToSave()));
            TitledPane titledPane = new TitledPane("Properties", propertiesView);
            centerPane.getChildren().addAll(splitPane, titledPane);
            root.setPrefWidth(540);
            root.setPrefHeight(580);
        } else {
            root.setPrefWidth(540);
            root.setPrefHeight(380);
            centerPane.getChildren().addAll(splitPane);
        }
    } else {
        root.setPrefWidth(540);
        root.setPrefHeight(380);
        centerPane.getChildren().add(childrenListView);
    }
    root.setCenter(centerPane);
    root.setBottom(buttonBar);
    return root;
}
 
开发者ID:jalian-systems,项目名称:marathonv5,代码行数:27,代码来源:MarathonFileChooser.java

示例2: setupArchitectureManagementVisuals

import javafx.scene.layout.BorderPane; //导入方法依赖的package包/类
/**
 * Create the different buttons for the architecture management and add the desired actions to them
 */
private void setupArchitectureManagementVisuals() {
    HBox buttons = new HBox();

    Button configButton = new Button("Config");
    Button startButton = new Button("Start");
    Button pauseButton = new Button("Pause");
    Button resumeButton = new Button("Resume");
    Button stopButton = new Button("Stop");

    buttons.getChildren().addAll(configButton, startButton, pauseButton, resumeButton, stopButton);

    BorderPane borderPane = new BorderPane();
    borderPane.setPrefHeight(canvas.getScene().getHeight());
    borderPane.setPrefWidth(canvas.getScene().getWidth());

    Pane space = new Pane();
    space.setMinSize(1, 1);
    HBox.setHgrow(space, Priority.ALWAYS);

    HBox container = new HBox();
    container.setPrefWidth(canvas.getScene().getWidth());

    container.getChildren().addAll(space, buttons);
    borderPane.setBottom(container);
    root.getChildren().add(borderPane);

    configButton.setOnMouseClicked(new ArchitectureButtonEventHandler(SimulationAction.CONFIG, publisher));
    startButton.setOnMouseClicked(new ArchitectureButtonEventHandler(SimulationAction.START, publisher));
    stopButton.setOnMouseClicked(new ArchitectureButtonEventHandler(SimulationAction.STOP, publisher));
    pauseButton.setOnMouseClicked(new ArchitectureButtonEventHandler(SimulationAction.PAUSE, publisher));
    resumeButton.setOnMouseClicked(new ArchitectureButtonEventHandler(SimulationAction.RESUME, publisher));
}
 
开发者ID:INAETICS,项目名称:Drones-Simulator,代码行数:36,代码来源:Game.java


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