List of usage examples for javafx.scene.shape Arc setStroke
public final void setStroke(Paint value)
From source file:Main.java
@Override public void start(Stage stage) { Arc arc = new Arc(0, 0, 50, 100, 0, 90); arc.setFill(Color.GRAY);//from w w w. j a va 2 s. c o m arc.setStroke(Color.BLACK); arc.setType(ArcType.ROUND); HBox box = new HBox(arc); Scene scene = new Scene(box); stage.setScene(scene); stage.setTitle("Test"); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Arc arc = new Arc(0, 0, 50, 100, 0, 90); arc.setFill(Color.TRANSPARENT); arc.setStroke(Color.BLACK); HBox box = new HBox(arc); Scene scene = new Scene(box); stage.setScene(scene);//from w ww . ja v a2s .co m stage.setTitle("Test"); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Arc arc = new Arc(0, 0, 50, 100, 0, 90); arc.setFill(Color.TRANSPARENT); arc.setStroke(Color.BLACK); arc.setType(ArcType.ROUND);/*from w w w.j a v a 2s.c om*/ HBox box = new HBox(arc); Scene scene = new Scene(box); stage.setScene(scene); stage.setTitle("Test"); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Arc arc = new Arc(0, 0, 50, 100, 0, 90); arc.setFill(Color.TRANSPARENT); arc.setStroke(Color.BLACK); arc.setType(ArcType.CHORD);/*from w ww. ja v a2 s. c o m*/ HBox box = new HBox(arc); Scene scene = new Scene(box); stage.setScene(scene); stage.setTitle("Test"); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Arc arc = new Arc(0, 0, 50, 100, 0, 90); arc.setFill(Color.GRAY);/*from w w w. ja v a 2 s .co m*/ arc.setStroke(Color.BLACK); arc.setType(ArcType.ROUND); HBox box = new HBox(arc); box.setSpacing(10); box.setStyle("-fx-padding: 10;" + "-fx-border-style: solid inside;" + "-fx-border-width: 2;" + "-fx-border-insets: 5;" + "-fx-border-radius: 5;" + "-fx-border-color: blue;"); Scene scene = new Scene(box); stage.setScene(scene); stage.setTitle("Test"); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Arc arc = new Arc(0, 0, 50, 100, 0, 90); arc.setFill(Color.GRAY);/*w w w . ja v a 2s . c o m*/ arc.setStroke(Color.BLACK); arc.setType(ArcType.ROUND); Arc arc1 = new Arc(0, 0, 50, 100, 0, 90); arc1.setFill(Color.GRAY); arc1.setStroke(Color.BLACK); arc1.setType(ArcType.ROUND); HBox box = new HBox(arc, arc1); box.setSpacing(10); Scene scene = new Scene(box); stage.setScene(scene); stage.setTitle("Test"); stage.show(); }
From source file:Main.java
@Override public void start(Stage stage) { Circle circle = new Circle(40); circle.setFill(Color.RED);/*from w w w . j a v a2s. c o m*/ circle.setStroke(Color.BLACK); circle.setStrokeWidth(2.0); Rectangle rect = new Rectangle(120, 75); rect.setFill(Color.RED); // Create a line Line line = new Line(0, 0, 150, 50); line.setStrokeWidth(5.0); line.setStroke(Color.GREEN); // Create a parallelogram Polygon parallelogram = new Polygon(); parallelogram.getPoints().addAll(30.0, 0.0, 130.0, 0.0, 120.00, 50.0, 0.0, 50.0); parallelogram.setFill(Color.AZURE); parallelogram.setStroke(Color.BLACK); // Create a hexagon Polyline hexagon = new Polyline(100.0, 0.0, 120.0, 20.0, 110.0, 140.0, 100.0, 60.0, 80.0, 40.0, 80.0, 120.0, 100.0, 0.0); hexagon.setFill(Color.WHITE); hexagon.setStroke(Color.BLACK); // A CHORD arc with no fill and a stroke Arc arc = new Arc(0, 0, 50, 100, 0, 90); arc.setFill(Color.TRANSPARENT); arc.setStroke(Color.BLACK); arc.setType(ArcType.CHORD); // Add all shapes to an HBox HBox root = new HBox(circle, rect, line, parallelogram, hexagon, arc); root.setSpacing(10); root.setStyle("-fx-padding: 10;" + "-fx-border-style: solid inside;" + "-fx-border-width: 2;" + "-fx-border-insets: 5;" + "-fx-border-radius: 5;" + "-fx-border-color: blue;"); Scene scene = new Scene(root); stage.setScene(scene); stage.setTitle("2D Shapes"); stage.show(); }