Example usage for javafx.scene.shape Path getBoundsInParent

List of usage examples for javafx.scene.shape Path getBoundsInParent

Introduction

In this page you can find the example usage for javafx.scene.shape Path getBoundsInParent.

Prototype

public final Bounds getBoundsInParent() 

Source Link

Usage

From source file:Main.java

@Override
public void start(Stage primaryStage) {
    primaryStage.setTitle("Shapes");
    Group root = new Group();
    Scene scene = new Scene(root, 300, 300, Color.WHITE);

    Path path = new Path();

    QuadCurve quad = QuadCurveBuilder.create().startX(50).startY(50).endX(150).endY(50).controlX(125)
            .controlY(150).translateY(path.getBoundsInParent().getMaxY()).strokeWidth(3).stroke(Color.BLACK)
            .fill(Color.WHITE).build();

    root.getChildren().add(quad);//from ww  w.  ja v  a2 s.c  o m

    primaryStage.setScene(scene);
    primaryStage.show();
}