Java Code Examples for javafx.scene.shape.QuadCurve#setControlY()
The following examples show how to use
javafx.scene.shape.QuadCurve#setControlY() .
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: QuadCurveSample.java From marathonv5 with Apache License 2.0 | 6 votes |
public static Node createIconContent() { QuadCurve quadCurve = new QuadCurve(); quadCurve.setStartX(0); quadCurve.setStartY(50); quadCurve.setControlX(20); quadCurve.setControlY(0); quadCurve.setEndX(80); quadCurve.setEndY(50); quadCurve.setStroke(Color.web("#b9c0c5")); quadCurve.setStrokeWidth(5); quadCurve.getStrokeDashArray().addAll(15d,15d); quadCurve.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)); quadCurve.setEffect(effect); return quadCurve; }
Example 2
Source File: QuadCurveSample.java From marathonv5 with Apache License 2.0 | 6 votes |
public static Node createIconContent() { QuadCurve quadCurve = new QuadCurve(); quadCurve.setStartX(0); quadCurve.setStartY(50); quadCurve.setControlX(20); quadCurve.setControlY(0); quadCurve.setEndX(80); quadCurve.setEndY(50); quadCurve.setStroke(Color.web("#b9c0c5")); quadCurve.setStrokeWidth(5); quadCurve.getStrokeDashArray().addAll(15d,15d); quadCurve.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)); quadCurve.setEffect(effect); return quadCurve; }
Example 3
Source File: QuadCurveSample.java From marathonv5 with Apache License 2.0 | 5 votes |
public QuadCurveSample() { super(180,90); // Create quadCurve shape QuadCurve quadCurve = new QuadCurve(); quadCurve.setStartX(0); quadCurve.setStartY(45); quadCurve.setControlX(50); quadCurve.setControlY(10); quadCurve.setEndX(180); quadCurve.setEndY(45); quadCurve.setStroke(Color.RED); quadCurve.setFill(Color.ROSYBROWN); quadCurve.setStrokeWidth(2d); // show the quadCurve shape; getChildren().add(quadCurve); // REMOVE ME setControls( new SimplePropertySheet.PropDesc("Cubic Curve Fill", quadCurve.fillProperty()), new SimplePropertySheet.PropDesc("Cubic Curve Stroke", quadCurve.strokeProperty()), new SimplePropertySheet.PropDesc("Cubic Curve Start X", quadCurve.startXProperty(), 0d, 170d), new SimplePropertySheet.PropDesc("Cubic Curve Start Y", quadCurve.startYProperty(), 10d, 80d), new SimplePropertySheet.PropDesc("Cubic Curve Control X1", quadCurve.controlXProperty(), 0d, 180d), new SimplePropertySheet.PropDesc("Cubic Curve Control Y1", quadCurve.controlYProperty(), 0d, 90d), new SimplePropertySheet.PropDesc("Cubic Curve End X", quadCurve.endXProperty(), 10d, 180d), new SimplePropertySheet.PropDesc("Cubic Curve End Y", quadCurve.endYProperty(), 10d, 80d) ); // END REMOVE ME }
Example 4
Source File: QuadCurveSample.java From marathonv5 with Apache License 2.0 | 5 votes |
public QuadCurveSample() { super(180,90); // Create quadCurve shape QuadCurve quadCurve = new QuadCurve(); quadCurve.setStartX(0); quadCurve.setStartY(45); quadCurve.setControlX(50); quadCurve.setControlY(10); quadCurve.setEndX(180); quadCurve.setEndY(45); quadCurve.setStroke(Color.RED); quadCurve.setFill(Color.ROSYBROWN); quadCurve.setStrokeWidth(2d); // show the quadCurve shape; getChildren().add(quadCurve); // REMOVE ME setControls( new SimplePropertySheet.PropDesc("Cubic Curve Fill", quadCurve.fillProperty()), new SimplePropertySheet.PropDesc("Cubic Curve Stroke", quadCurve.strokeProperty()), new SimplePropertySheet.PropDesc("Cubic Curve Start X", quadCurve.startXProperty(), 0d, 170d), new SimplePropertySheet.PropDesc("Cubic Curve Start Y", quadCurve.startYProperty(), 10d, 80d), new SimplePropertySheet.PropDesc("Cubic Curve Control X1", quadCurve.controlXProperty(), 0d, 180d), new SimplePropertySheet.PropDesc("Cubic Curve Control Y1", quadCurve.controlYProperty(), 0d, 90d), new SimplePropertySheet.PropDesc("Cubic Curve End X", quadCurve.endXProperty(), 10d, 180d), new SimplePropertySheet.PropDesc("Cubic Curve End Y", quadCurve.endYProperty(), 10d, 80d) ); // END REMOVE ME }