Example usage for javafx.scene.shape HLineTo HLineTo

List of usage examples for javafx.scene.shape HLineTo HLineTo

Introduction

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

Prototype

public HLineTo(double x) 

Source Link

Document

Creates an instance of HLineTo.

Usage

From source file:Main.java

@Override
public void start(Stage primaryStage) {

    Path path = new Path();
    path.getElements().add(new MoveTo(0.0f, 0.0f));
    path.getElements().add(new HLineTo(80.0f));

    Group root = new Group();
    root.getChildren().add(path);//from w  w w.  j a  v a  2  s  . co m
    primaryStage.setScene(new Scene(root, 300, 250));
    primaryStage.show();
}

From source file:Main.java

@Override
public void start(Stage stage) {
    ArcTo arcTo = new ArcTo();
    arcTo.setX(20);//from w  w  w .jav a 2s .c o m
    arcTo.setY(30);

    arcTo.setRadiusX(30);
    arcTo.setRadiusY(30);

    Path path = new Path(new MoveTo(0, 0), new VLineTo(100), new HLineTo(100), new VLineTo(50), arcTo);
    HBox box = new HBox(path);

    box.setSpacing(10);

    Scene scene = new Scene(box);
    stage.setScene(scene);
    stage.setTitle("Test");
    stage.show();
}