Java Code Examples for javafx.scene.shape.CubicCurve#setStartY()
The following examples show how to use
javafx.scene.shape.CubicCurve#setStartY() .
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: CubicCurveSample.java From marathonv5 with Apache License 2.0 | 6 votes |
public static Node createIconContent() { CubicCurve cubicCurve = new CubicCurve(); cubicCurve.setStartX(0); cubicCurve.setStartY(50); cubicCurve.setControlX1(20); cubicCurve.setControlY1(0); cubicCurve.setControlX2(70); cubicCurve.setControlY2(100); cubicCurve.setEndX(80); cubicCurve.setEndY(50); cubicCurve.setStroke(Color.web("#b9c0c5")); cubicCurve.setStrokeWidth(5); cubicCurve.getStrokeDashArray().addAll(15d,15d); cubicCurve.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)); cubicCurve.setEffect(effect); return cubicCurve; }
Example 2
Source File: CubicCurveSample.java From marathonv5 with Apache License 2.0 | 6 votes |
public static Node createIconContent() { CubicCurve cubicCurve = new CubicCurve(); cubicCurve.setStartX(0); cubicCurve.setStartY(50); cubicCurve.setControlX1(20); cubicCurve.setControlY1(0); cubicCurve.setControlX2(70); cubicCurve.setControlY2(100); cubicCurve.setEndX(80); cubicCurve.setEndY(50); cubicCurve.setStroke(Color.web("#b9c0c5")); cubicCurve.setStrokeWidth(5); cubicCurve.getStrokeDashArray().addAll(15d,15d); cubicCurve.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)); cubicCurve.setEffect(effect); return cubicCurve; }
Example 3
Source File: CubicCurveSample.java From marathonv5 with Apache License 2.0 | 5 votes |
public CubicCurveSample() { super(180,90); // Create cubicCurve shape CubicCurve cubicCurve = new CubicCurve(); cubicCurve.setStartX(0); cubicCurve.setStartY(45); cubicCurve.setControlX1(30); cubicCurve.setControlY1(10); cubicCurve.setControlX2(150); cubicCurve.setControlY2(80); cubicCurve.setEndX(180); cubicCurve.setEndY(45); cubicCurve.setStroke(Color.RED); cubicCurve.setFill(Color.ROSYBROWN); cubicCurve.setStrokeWidth(2d); // show the cubicCurve shape; getChildren().add(cubicCurve); // REMOVE ME setControls( new SimplePropertySheet.PropDesc("Cubic Curve Fill", cubicCurve.fillProperty()), new SimplePropertySheet.PropDesc("Cubic Curve Stroke", cubicCurve.strokeProperty()), new SimplePropertySheet.PropDesc("Cubic Curve Start X", cubicCurve.startXProperty(), 0d, 170d), new SimplePropertySheet.PropDesc("Cubic Curve Start Y", cubicCurve.startYProperty(), 10d, 80d), new SimplePropertySheet.PropDesc("Cubic Curve Control X1", cubicCurve.controlX1Property(), 0d, 180d), new SimplePropertySheet.PropDesc("Cubic Curve Control Y1", cubicCurve.controlY1Property(), 0d, 90d), new SimplePropertySheet.PropDesc("Cubic Curve Control X2", cubicCurve.controlX2Property(), 0d, 180d), new SimplePropertySheet.PropDesc("Cubic Curve Control Y2", cubicCurve.controlY2Property(), 0d, 90d), new SimplePropertySheet.PropDesc("Cubic Curve End X", cubicCurve.endXProperty(), 10d, 180d), new SimplePropertySheet.PropDesc("Cubic Curve End Y", cubicCurve.endYProperty(), 10d, 80d) ); // END REMOVE ME }
Example 4
Source File: CubicCurveSample.java From marathonv5 with Apache License 2.0 | 5 votes |
public CubicCurveSample() { super(180,90); // Create cubicCurve shape CubicCurve cubicCurve = new CubicCurve(); cubicCurve.setStartX(0); cubicCurve.setStartY(45); cubicCurve.setControlX1(30); cubicCurve.setControlY1(10); cubicCurve.setControlX2(150); cubicCurve.setControlY2(80); cubicCurve.setEndX(180); cubicCurve.setEndY(45); cubicCurve.setStroke(Color.RED); cubicCurve.setFill(Color.ROSYBROWN); cubicCurve.setStrokeWidth(2d); // show the cubicCurve shape; getChildren().add(cubicCurve); // REMOVE ME setControls( new SimplePropertySheet.PropDesc("Cubic Curve Fill", cubicCurve.fillProperty()), new SimplePropertySheet.PropDesc("Cubic Curve Stroke", cubicCurve.strokeProperty()), new SimplePropertySheet.PropDesc("Cubic Curve Start X", cubicCurve.startXProperty(), 0d, 170d), new SimplePropertySheet.PropDesc("Cubic Curve Start Y", cubicCurve.startYProperty(), 10d, 80d), new SimplePropertySheet.PropDesc("Cubic Curve Control X1", cubicCurve.controlX1Property(), 0d, 180d), new SimplePropertySheet.PropDesc("Cubic Curve Control Y1", cubicCurve.controlY1Property(), 0d, 90d), new SimplePropertySheet.PropDesc("Cubic Curve Control X2", cubicCurve.controlX2Property(), 0d, 180d), new SimplePropertySheet.PropDesc("Cubic Curve Control Y2", cubicCurve.controlY2Property(), 0d, 90d), new SimplePropertySheet.PropDesc("Cubic Curve End X", cubicCurve.endXProperty(), 10d, 180d), new SimplePropertySheet.PropDesc("Cubic Curve End Y", cubicCurve.endYProperty(), 10d, 80d) ); // END REMOVE ME }
Example 5
Source File: DragIcon.java From java_fx_node_link_demo with The Unlicense | 4 votes |
public void setType (DragIconType type) { mType = type; getStyleClass().clear(); getStyleClass().add("dragicon"); //added because the cubic curve will persist into other icons if (this.getChildren().size() > 0) getChildren().clear(); switch (mType) { case cubic_curve: getStyleClass().add("icon-yellow"); Pane pane = new Pane(); pane.setPrefWidth(64.0); pane.setPrefHeight(64.0); //pane.getStyleClass().add("icon-blue"); pane.setLayoutX(0.0); pane.setLayoutY(0.0); CubicCurve curve = new CubicCurve(); curve.setStartX(10.0); curve.setStartY(20.0); curve.setEndX(54.0); curve.setEndY(44.0); curve.setControlX1(64.0); curve.setControlY1(20.0); curve.setControlX2(0.0); curve.setControlY2(44.0); curve.getStyleClass().add("cubic-icon"); pane.getChildren().add(curve); //r//oot_pane. getChildren().add(pane); break; case blue: getStyleClass().add("icon-blue"); break; case red: getStyleClass().add("icon-red"); break; case green: getStyleClass().add("icon-green"); break; case grey: getStyleClass().add("icon-grey"); break; case purple: getStyleClass().add("icon-purple"); break; case yellow: getStyleClass().add("icon-yellow"); break; case black: getStyleClass().add("icon-black"); break; default: break; } }