List of usage examples for javafx.scene.shape Path Path
public Path()
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);/*www . j ava2 s .c o m*/ primaryStage.setScene(new Scene(root, 300, 250)); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { Group group = new Group(); Path spade = new Path(); spade.getElements().add(new MoveTo(25.0f, 0.0f)); spade.getElements()//w w w . j a va2 s . c om .add(QuadCurveToBuilder.create().controlX(40.0f).controlY(50.0f).x(27.0f).y(30.0f).build()); group.getChildren().add(spade); Scene scene = new Scene(group, 300, 200); primaryStage.setScene(scene); primaryStage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Group root = new Group(); Scene scene = new Scene(root, 300, 150); stage.setScene(scene);// w w w. ja v a 2 s . c o m stage.setTitle(""); Path path = new Path(); MoveTo moveTo = new MoveTo(); moveTo.setX(0.0f); moveTo.setY(50.0f); QuadCurveTo quadTo = new QuadCurveTo(); quadTo.setControlX(25.0f); quadTo.setControlY(0.0f); quadTo.setX(50.0f); quadTo.setY(50.0f); path.getElements().add(moveTo); path.getElements().add(quadTo); root.getChildren().add(path); scene.setRoot(root); stage.show(); }
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 a va 2 s. com*/ 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(); }
From source file:Main.java
@Override public void start(final Stage stage) { stage.setTitle("HTML"); stage.setWidth(500);/* w w w . j a va2 s . c o m*/ stage.setHeight(500); Scene scene = new Scene(new Group()); VBox root = new VBox(); Path path = new Path(); path.getElements().add(new MoveTo(50.0f, 0.0f)); path.getElements().add(new VLineTo(50.0f)); root.getChildren().addAll(path); scene.setRoot(root); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(final Stage stage) { stage.setTitle("HTML"); stage.setWidth(500);// w w w . j a v a 2 s . c om stage.setHeight(500); Scene scene = new Scene(new Group()); VBox root = new VBox(); Path path = new Path(); path.getElements().add(new MoveTo(50.0f, 0.0f)); VLineTo vlt = new VLineTo(50.0f); path.getElements().add(vlt); System.out.println(vlt.getY()); root.getChildren().addAll(path); scene.setRoot(root); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(final Stage stage) { stage.setTitle("HTML"); stage.setWidth(500);// w w w . j a v a2 s . c o m stage.setHeight(500); Scene scene = new Scene(new Group()); VBox root = new VBox(); Path path = new Path(); path.getElements().add(new MoveTo(50.0f, 0.0f)); VLineTo vlt = new VLineTo(50.0f); vlt.setY(.7); path.getElements().add(vlt); System.out.println(vlt.getY()); root.getChildren().addAll(path); scene.setRoot(root); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(final Stage stage) { stage.setTitle("HTML"); stage.setWidth(500);/*from w ww .j a v a 2 s . com*/ stage.setHeight(500); Scene scene = new Scene(new Group()); VBox root = new VBox(); Path path = new Path(); path.getElements().add(new MoveTo(50.0f, 0.0f)); VLineTo vlt = new VLineTo(); vlt.setY(.7); path.getElements().add(vlt); System.out.println(vlt.yProperty()); root.getChildren().addAll(path); scene.setRoot(root); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(final Stage stage) { stage.setTitle("HTML"); stage.setWidth(500);/*from w w w . ja v a 2 s . co m*/ stage.setHeight(500); Scene scene = new Scene(new Group()); VBox root = new VBox(); Path path = new Path(); path.getElements().add(new MoveTo(50.0f, 0.0f)); VLineTo vlt = new VLineTo(50.0f); vlt.setY(.7); path.getElements().add(vlt); System.out.println(vlt.yProperty()); root.getChildren().addAll(path); scene.setRoot(root); stage.setScene(scene); stage.show(); }
From source file:Main.java
@Override public void start(Stage primaryStage) { Group root = new Group(); Scene scene = new Scene(root, 300, 250); path = new Path(); path.setStrokeWidth(1);/*w w w . j a v a2 s. co m*/ path.setStroke(Color.BLACK); scene.setOnMouseClicked(mouseHandler); scene.setOnMouseDragged(mouseHandler); scene.setOnMouseEntered(mouseHandler); scene.setOnMouseExited(mouseHandler); scene.setOnMouseMoved(mouseHandler); scene.setOnMousePressed(mouseHandler); scene.setOnMouseReleased(mouseHandler); root.getChildren().add(path); primaryStage.setScene(scene); primaryStage.show(); }