Java Code Examples for javafx.scene.shape.Polyline#setStrokeWidth()
The following examples show how to use
javafx.scene.shape.Polyline#setStrokeWidth() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PolylineSample.java From marathonv5 with Apache License 2.0 | 6 votes |
public static Node createIconContent() { Polyline polyline = new Polyline(new double[]{ 45, 10, 10, 80, 80, 80, }); polyline.setStroke(Color.web("#b9c0c5")); polyline.setStrokeWidth(5); polyline.getStrokeDashArray().addAll(15d,15d); polyline.setFill(null); javafx.scene.effect.InnerShadow effect = new javafx.scene.effect.InnerShadow(); effect.setOffsetX(1); effect.setOffsetY(1); effect.setRadius(3); effect.setColor(Color.rgb(0,0,0,0.6)); polyline.setEffect(effect); return polyline; }
Example 2
Source File: PolylineSample.java From marathonv5 with Apache License 2.0 | 6 votes |
public static Node createIconContent() { Polyline polyline = new Polyline(new double[]{ 45, 10, 10, 80, 80, 80, }); polyline.setStroke(Color.web("#b9c0c5")); polyline.setStrokeWidth(5); polyline.getStrokeDashArray().addAll(15d,15d); polyline.setFill(null); javafx.scene.effect.InnerShadow effect = new javafx.scene.effect.InnerShadow(); effect.setOffsetX(1); effect.setOffsetY(1); effect.setRadius(3); effect.setColor(Color.rgb(0,0,0,0.6)); polyline.setEffect(effect); return polyline; }
Example 3
Source File: PolylineSample.java From marathonv5 with Apache License 2.0 | 5 votes |
public PolylineSample() { super(180,90); // Red stroked not closed triangle Polyline polyline1 = new Polyline(new double[]{ 45, 10, 10, 80, 80, 80, }); polyline1.setFill(Color.TRANSPARENT); polyline1.setStroke(Color.RED); // Blue stroked closed triangle Polyline polyline2 = new Polyline(new double[]{ 135, 10, 100, 80, 170, 80, 135, 10, }); polyline2.setStroke(Color.DODGERBLUE); polyline2.setStrokeWidth(2); polyline2.setFill(null); // Create a group to show all the polylines); getChildren().add(new Group(polyline1, polyline2)); // REMOVE ME setControls( new SimplePropertySheet.PropDesc("Polyline 1 Fill", polyline1.fillProperty()), new SimplePropertySheet.PropDesc("Polyline 1 Stroke", polyline1.strokeProperty()), new SimplePropertySheet.PropDesc("Polyline 2 Stroke", polyline2.strokeProperty()) ); // END REMOVE ME }
Example 4
Source File: PolylineSample.java From marathonv5 with Apache License 2.0 | 5 votes |
public PolylineSample() { super(180,90); // Red stroked not closed triangle Polyline polyline1 = new Polyline(new double[]{ 45, 10, 10, 80, 80, 80, }); polyline1.setFill(Color.TRANSPARENT); polyline1.setStroke(Color.RED); // Blue stroked closed triangle Polyline polyline2 = new Polyline(new double[]{ 135, 10, 100, 80, 170, 80, 135, 10, }); polyline2.setStroke(Color.DODGERBLUE); polyline2.setStrokeWidth(2); polyline2.setFill(null); // Create a group to show all the polylines); getChildren().add(new Group(polyline1, polyline2)); // REMOVE ME setControls( new SimplePropertySheet.PropDesc("Polyline 1 Fill", polyline1.fillProperty()), new SimplePropertySheet.PropDesc("Polyline 1 Stroke", polyline1.strokeProperty()), new SimplePropertySheet.PropDesc("Polyline 2 Stroke", polyline2.strokeProperty()) ); // END REMOVE ME }