List of usage examples for javafx.beans.binding Bindings min
public static NumberBinding min(final int op1, final ObservableNumberValue op2)
From source file:Main.java
@Override public void start(Stage stage) { Circle c = new Circle(); Group root = new Group(c); Scene scene = new Scene(root, 100, 100); c.centerXProperty().bind(scene.widthProperty().divide(2)); c.centerYProperty().bind(scene.heightProperty().divide(2)); c.radiusProperty().bind(Bindings.min(scene.widthProperty(), scene.heightProperty()).divide(2)); stage.setTitle("A Centered Circle"); stage.setScene(scene);//from ww w .j a va 2 s. c o m stage.sizeToScene(); stage.show(); }