本文整理汇总了Java中javafx.scene.shape.QuadCurve.setControlY方法的典型用法代码示例。如果您正苦于以下问题:Java QuadCurve.setControlY方法的具体用法?Java QuadCurve.setControlY怎么用?Java QuadCurve.setControlY使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javafx.scene.shape.QuadCurve
的用法示例。
在下文中一共展示了QuadCurve.setControlY方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createIconContent
import javafx.scene.shape.QuadCurve; //导入方法依赖的package包/类
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;
}
示例2: buildArc
import javafx.scene.shape.QuadCurve; //导入方法依赖的package包/类
private Node buildArc(Point2D point, Node n1, Node n2, boolean bigDestination, boolean bigSource) {
final int sourceRadius = bigSource ? BIG_RADIUS : SMALL_RADIUS;
final int destRadius = bigDestination ? BIG_RADIUS : SMALL_RADIUS;
final QuadCurve cubic = new QuadCurve();
cubic.startXProperty().bind(n1.layoutXProperty().add(destRadius));
cubic.startYProperty().bind(n1.layoutYProperty().add(destRadius));
cubic.endXProperty().bind(n2.layoutXProperty().add(sourceRadius));
cubic.endYProperty().bind(n2.layoutYProperty().add(sourceRadius));
cubic.setControlX(point.getX());
cubic.setControlY(0);
cubic.setFill(Color.TRANSPARENT);
cubic.setStrokeWidth(4);
cubic.setStroke(Color.WHITE);
// cubic.setEffect(getDropShadow());
cubic.setOpacity(0.0);
linkLayer.getChildren().add(cubic);
return cubic;
}
示例3: QuadCurveSample
import javafx.scene.shape.QuadCurve; //导入方法依赖的package包/类
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
}