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


Java Pane.setMinSize方法代碼示例

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


在下文中一共展示了Pane.setMinSize方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: aendereReihenfolge

import javafx.scene.layout.Pane; //導入方法依賴的package包/類
private void aendereReihenfolge(){
    Stage stage = new Stage();

    Label l = new Label("Reihenfolge festlegen:");
    l.setStyle("-fx-text-fill: white");
    l.setFont(Font.font(settingsFontSize));
    l.setTranslateY(25);
    l.setTranslateX(25);

    TextField tf = new TextField(String.valueOf(orderId+1));
    tf.setFont(Font.font(settingsFontSize-3));
    tf.setTranslateX(25);
    tf.setTranslateY(60);

    Button b = new Button("Speichern");
    b.setFont(Font.font(settingsFontSize));
    b.setTranslateX(25);
    b.setTranslateY(120);
    b.setOnAction(e -> {
        orderId = Integer.parseInt(tf.getText())-1;
        stage.close();
        Plugin_Gleisbelegung.sortiereGleiseListener();
    });

    Pane p = new Pane(l,tf,b);
    p.setStyle("-fx-background-color: #303030");
    p.setMinSize(500,200);
    p.setMaxSize(500, 200);

    Scene scene = new Scene(p, 300,200);

    stage.setScene(scene);
    stage.show();
    stage.setAlwaysOnTop(true);
}
 
開發者ID:manuel3108,項目名稱:Gleisbelegung,代碼行數:36,代碼來源:Gleis.java

示例2: ControlsPaneController

import javafx.scene.layout.Pane; //導入方法依賴的package包/類
public ControlsPaneController(UIToolBox toolBox) {
    this.toolBox = toolBox;

    toolBox.getEventBus()
            .toObserverable()
            .ofType(MediaControlsChangedEvent.class)
            .subscribe(e -> updateMediaControlPane(e.get()));

    emptyControlsPane = new Pane();
    emptyControlsPane.setPrefSize(440, 80);
    emptyControlsPane.setMaxSize(440, 80);
    emptyControlsPane.setMinSize(440, 80);

    Runtime.getRuntime()
            .addShutdownHook(new Thread(() -> saveDividerPositions(splitPaneKey, getRoot())));
}
 
開發者ID:mbari-media-management,項目名稱:vars-annotation,代碼行數:17,代碼來源:ControlsPaneController.java

示例3: openLogWindow

import javafx.scene.layout.Pane; //導入方法依賴的package包/類
private void openLogWindow(){
    Stage stage = new Stage();

    //Label l = new Label("Während deiner aktuellen Sitzung sind Fehler aufgetreten. Durch einen Klick auf Weiter werden deine Log-Datei und deine Anregungen anonym hochgeladen.");
    Label l = new Label("Während deiner aktuellen Sitzung sind Fehler aufgetreten. Durch einen Klick auf Weiter wird deine Log-Datei anonym hochgeladen.");
    l.setStyle("-fx-text-fill: white");
    l.setFont(Font.font(settingsFontSize));
    l.setWrapText(true);
    l.setMaxWidth(450);
    l.setTranslateY(25);
    l.setTranslateX(25);

    /*TextField ta = new TextField();
    ta.setFont(Font.font(settingsFontSize-3));
    ta.setTranslateX(25);
    ta.setTranslateY(125);
    ta.setPrefWidth(450);
    ta.setPrefHeight(100);*/


    Button bno = new Button("Abbrechen");
    bno.setFont(Font.font(settingsFontSize));
    bno.setOnAction(e -> stage.close());
    bno.setTranslateX(250);
    bno.setTranslateY(150);

    Button byes = new Button("Weiter");
    byes.setFont(Font.font(settingsFontSize));
    byes.setTranslateX(150);
    byes.setTranslateY(150);
    byes.setOnAction(e -> {
        byes.setDisable(true);
        bno.setDisable(true);

        Runnable r = () -> {
            sendLogFile(l);
        };
        new Thread(r).start();
    });

    Pane p = new Pane(l, byes, bno);
    p.setStyle("-fx-background-color: #303030");
    p.setMinSize(500,200);
    p.setMaxSize(500, 200);

    Scene s = new Scene(p,500,200);


    stage.setScene(s);
    stage.setTitle("Log-Datei senden?");

    stage.setAlwaysOnTop(true);
    stage.show();
}
 
開發者ID:manuel3108,項目名稱:Gleisbelegung,代碼行數:55,代碼來源:Plugin_Gleisbelegung.java

示例4: createEmptyTile

import javafx.scene.layout.Pane; //導入方法依賴的package包/類
private void createEmptyTile( final GridPane screenPane, final int x, final int y, final int nbColumns, final int nbRows ) {
    final Pane tile = new Pane( );
    tile.prefWidthProperty( ).bind( widthProperty( ).add( -( nbColumns + 1 ) * GAP_SPACE ).divide( nbColumns ) );
    tile.prefHeightProperty( ).bind( heightProperty( ).add( -( nbRows + 1 ) * GAP_SPACE ).divide( nbRows ) );
    tile.setMinSize( USE_PREF_SIZE, USE_PREF_SIZE );
    tile.setMaxSize( USE_PREF_SIZE, USE_PREF_SIZE );
    screenPane.add( tile, x, y );
}
 
開發者ID:u2032,項目名稱:wall-t,代碼行數:9,代碼來源:WallView.java

示例5: createTileFromModel

import javafx.scene.layout.Pane; //導入方法依賴的package包/類
private void createTileFromModel( final GridPane screenPane, final Object model, final int x, final int y, final int nbColumns, final int nbRows ) {
    final Pane tile = _nodeFromModelFactory.get( model.getClass( ) ).get( model );
    tile.prefWidthProperty( ).bind( widthProperty( ).add( -( nbColumns + 1 ) * GAP_SPACE ).divide( nbColumns ) );
    tile.prefHeightProperty( ).bind( heightProperty( ).add( -( nbRows + 1 ) * GAP_SPACE ).divide( nbRows ) );
    tile.setMinSize( USE_PREF_SIZE, USE_PREF_SIZE );
    tile.setMaxSize( USE_PREF_SIZE, USE_PREF_SIZE );
    screenPane.add( tile, x, y );
}
 
開發者ID:u2032,項目名稱:wall-t,代碼行數:9,代碼來源:WallView.java

示例6: setupArchitectureManagementVisuals

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