Example usage for javafx.scene.shape CubicCurveTo setX

List of usage examples for javafx.scene.shape CubicCurveTo setX

Introduction

In this page you can find the example usage for javafx.scene.shape CubicCurveTo setX.

Prototype

public final void setX(double value) 

Source Link

Usage

From source file:Main.java

@Override
public void start(Stage stage) {
    stage.setTitle("ComboBoxSample");
    Scene scene = new Scene(new Group(), 450, 250);

    Path path = new Path();

    MoveTo moveTo = new MoveTo();
    moveTo.setX(0.0f);/*from   w w w .j av  a 2s .  c o m*/
    moveTo.setY(0.0f);

    CubicCurveTo cubicTo = new CubicCurveTo();
    cubicTo.setControlX1(0.0f);
    cubicTo.setControlY1(0.0f);
    cubicTo.setControlX2(100.0f);
    cubicTo.setControlY2(100.0f);
    cubicTo.setX(100.0f);
    cubicTo.setY(50.0f);

    path.getElements().add(moveTo);
    path.getElements().add(cubicTo);

    Group root = (Group) scene.getRoot();
    root.getChildren().add(path);
    stage.setScene(scene);
    stage.show();
}