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


Java BorderPane.setPrefWidth方法代碼示例

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


在下文中一共展示了BorderPane.setPrefWidth方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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: resizeLEDs

import javafx.scene.layout.BorderPane; //導入方法依賴的package包/類
private void resizeLEDs(int size)
{
	for (BorderPane led : ledNodes)
	{
		led.setMinHeight(size);
		led.setPrefWidth(size);
	}
}
 
開發者ID:dhawal9035,項目名稱:WebPLP,代碼行數:9,代碼來源:LEDDisplay.java

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