本文整理匯總了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);
}
示例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())));
}
示例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();
}
示例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 );
}
示例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 );
}
示例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));
}