本文整理了Java中javafx.scene.shape.Line.setStartY()
方法的一些代码示例,展示了Line.setStartY()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Line.setStartY()
方法的具体详情如下:
包路径:javafx.scene.shape.Line
类名称:Line
方法名:setStartY
暂无
代码示例来源:origin: jfoenixadmin/JFoenix
rightLine.setStartY(maxHeight - padding - lineThick);
rightLine.setEndX((boxWidth + padding - labelOffset) / 2 - boxWidth / 5.5);
rightLine.setEndY(maxHeight - padding - lineThick);
leftLine.setStartX((boxWidth + padding - labelOffset) / 2 - boxWidth / 5.5);
leftLine.setStartY(maxHeight - padding - lineThick);
leftLine.setEndX((boxWidth + padding - labelOffset) / 2 - boxWidth / 5.5);
leftLine.setEndY(maxHeight - padding - lineThick);
代码示例来源:origin: jfoenixadmin/JFoenix
line.setStroke(getSkinnable().isSelected() ? toggleButton.getToggleLineColor() : toggleButton.getUnToggleLineColor());
line.setStartX(0);
line.setStartY(0);
line.setEndX(circleRadius * 2 + 2);
line.setEndY(0);
代码示例来源:origin: com.powsybl/powsybl-gse-network-explorer
@Override
protected void layoutChildren() {
double size = Math.min(getWidth(), getHeight());
lines[0].setStartX(size / 2);
lines[0].setStartY(0);
lines[0].setEndX(size / 2);
lines[0].setEndY(size / 2);
lines[1].setStartX(0);
lines[1].setStartY(size / 2);
lines[1].setEndX(size);
lines[1].setEndY(size / 2);
lines[2].setStartX(size / 4);
lines[2].setStartY(size * 3 / 4);
lines[2].setEndX(size * 3 / 4);
lines[2].setEndY(size * 3 / 4);
lines[3].setStartX(size * 3 / 8);
lines[3].setStartY(size);
lines[3].setEndX(size * 5 / 8);
lines[3].setEndY(size);
}
}
代码示例来源:origin: com.powsybl/powsybl-gse-network-explorer
@Override
protected void layoutChildren() {
double size = Math.min(getWidth(), getHeight());
double marginX = 1d / 6;
double marginY = 1d / 10;
l1.setStartX(size / 2);
l1.setStartY(size * marginY);
l1.setEndX(size / 2);
l1.setEndY(size * (1d / 2 - marginY));
l2.setStartX(size * marginX);
l2.setStartY(size * (1d / 2 - marginY));
l2.setEndX(size * (1d - marginX));
l2.setEndY(size * (1d / 2 - marginY));
l3.setStartX(size * marginX);
l3.setStartY(size * (1d / 2 + marginY));
l3.setEndX(size * (1 - marginX));
l3.setEndY(size * (1d / 2 + marginY));
l4.setStartX(size / 2);
l4.setStartY(size * (1d / 2 + marginY));
l4.setEndX(size / 2);
l4.setEndY(size * (1 - marginY));
}
}
代码示例来源:origin: com.powsybl/powsybl-gse-network-explorer
l1.setStartY(0);
l1.setEndX(size / 2);
l1.setEndY(marginY);
peakLine1[i].setStartY(marginY + i * dy * 4);
peakLine1[i].setEndX(size / 2 + dx);
peakLine1[i].setEndY(marginY + dy + i * dy * 4);
peakLine2[i].setStartY(marginY + dy + i * dy * 4);
peakLine2[i].setEndX(size / 2 - dx);
peakLine2[i].setEndY(marginY + dy * 3 + i * dy * 4);
peakLine3[i].setStartY(marginY + dy * 3 + i * dy * 4);
peakLine3[i].setEndX(size / 2);
peakLine3[i].setEndY(marginY + dy * 4 + i * dy * 4);
l2.setStartY(size - marginY);
l2.setEndX(size / 2);
l2.setEndY(size);
代码示例来源:origin: com.powsybl/powsybl-gse-network-explorer
@Override
protected void layoutChildren() {
double size = Math.min(getWidth(), getHeight());
double marginY = size / 10;
l1.setStartX(size / 2);
l1.setStartY(0);
l1.setEndX(size / 2);
l1.setEndY(marginY);
double r = (size - (2 * marginY)) / (2 + 2 * (spirals - 1) * Math.cos(Math.PI / 4));
for (int i = 0; i < spirals; i++) {
a[i].setCenterX(size / 2);
a[i].setCenterY(marginY + r + 2 * i * r * Math.cos(Math.PI / 4));
a[i].setRadiusX(r);
a[i].setRadiusY(r);
}
l2.setStartX(size / 2);
l2.setStartY(size - marginY);
l2.setEndX(size / 2);
l2.setEndY(size);
}
}
代码示例来源:origin: com.powsybl/powsybl-gse-network-explorer
@Override
protected void layoutChildren() {
double size = Math.min(getWidth(), getHeight());
leg1.setStartX(size / 2);
leg1.setStartY(size * MARGIN);
leg1.setEndX(size / 2);
leg1.setEndY(size * BOX_MARGIN);
leg2.setStartX(size / 2);
leg2.setStartY(size * (1 - MARGIN));
leg2.setEndX(size / 2);
leg2.setEndY(size * (1 - BOX_MARGIN));
box.setX(size * BOX_MARGIN);
box.setY(size * BOX_MARGIN);
box.setWidth(size * (1 - 2 * BOX_MARGIN));
box.setHeight(size * (1 - 2 * BOX_MARGIN));
}
}
代码示例来源:origin: org.controlsfx/controlsfx
private Node createCloseIcon() {
Group group = new Group();
group.getStyleClass().add("graphics"); //$NON-NLS-1$
Circle circle = new Circle();
circle.getStyleClass().add("circle"); //$NON-NLS-1$
circle.setRadius(6);
circle.setCenterX(6);
circle.setCenterY(6);
group.getChildren().add(circle);
Line line1 = new Line();
line1.getStyleClass().add("line"); //$NON-NLS-1$
line1.setStartX(4);
line1.setStartY(4);
line1.setEndX(8);
line1.setEndY(8);
group.getChildren().add(line1);
Line line2 = new Line();
line2.getStyleClass().add("line"); //$NON-NLS-1$
line2.setStartX(8);
line2.setStartY(4);
line2.setEndX(4);
line2.setEndY(8);
group.getChildren().add(line2);
return group;
}
代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls
@Override
public void layoutChildren() {
double caretOffset = getCharLocation(this.caretIndex);
this.caret.setStartX(caretOffset);
this.caret.setStrokeLineCap(StrokeLineCap.BUTT);
this.caret.setEndX(caretOffset);
this.caret.setStartY(0);
this.caret.setEndY(getHeight());
this.caret.toFront();
}
}
代码示例来源:origin: org.tentackle/tentackle-fx
circle.setCenterY(CIRCLE_RADIUS);
line.setStartX(CIRCLE_RADIUS);
line.setStartY(CIRCLE_RADIUS);
line.setEndX(CIRCLE_RADIUS);
line.setEndY(CIRCLE_RADIUS + LINE_LENGTH);
line.setStartY(0);
line.setEndX(CIRCLE_RADIUS);
line.setEndY(LINE_LENGTH);
line.setStartY(CIRCLE_RADIUS);
line.setEndX(LINE_LENGTH);
line.setEndY(CIRCLE_RADIUS);
circle.setCenterY(CIRCLE_RADIUS);
line.setStartX(CIRCLE_RADIUS);
line.setStartY(CIRCLE_RADIUS);
line.setEndX(CIRCLE_RADIUS + LINE_LENGTH);
line.setEndY(CIRCLE_RADIUS);
代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls
l.setStartY(6);
l.setEndX(0);
l.setEndY(40);
l.setStartY(6);
l.setEndX(0);
l.setEndY(40);
代码示例来源:origin: at.bestsolution.eclipse/org.eclipse.fx.ui.controls
l.setStartY(6);
l.setEndX(0);
l.setEndY(40);
l.setStartY(6);
l.setEndX(0);
l.setEndY(40);
代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls
@Override
public void attach(Pane node, TextNode textNode) {
Line l = (Line) textNode.getUserData();
if( l == null ) {
l = new Line();
l.setMouseTransparent(true);
l.setManaged(false);
l.setStartY(textNode.getBoundsInLocal().getHeight() - 2);
l.strokeProperty().bind(textNode.fillProperty());
l.setEndY(textNode.getBoundsInLocal().getHeight() - 2 );
l.setEndX(textNode.getBoundsInLocal().getWidth());
//l.setTranslateY(textNode.getBaselineOffset() + 2.0);
textNode.setUserData(l);
}
node.getChildren().add(l);
}
代码示例来源:origin: com.jfoenix/jfoenix
rightLine.setStartY(maxHeight - padding - lineThick);
rightLine.setEndX((boxWidth + padding - labelOffset) / 2 - boxWidth / 5.5);
rightLine.setEndY(maxHeight - padding - lineThick);
leftLine.setStartX((boxWidth + padding - labelOffset) / 2 - boxWidth / 5.5);
leftLine.setStartY(maxHeight - padding - lineThick);
leftLine.setEndX((boxWidth + padding - labelOffset) / 2 - boxWidth / 5.5);
leftLine.setEndY(maxHeight - padding - lineThick);
代码示例来源:origin: com.cedarsoft.commons/javafx
@SuppressWarnings("MethodDoesntCallSuperMethod")
@Override
protected void layoutChildren() {
double width = getWidth();
double height = getHeight();
double labelPrefWidth = label.prefWidth(height);
double labelPrefHeight = label.prefHeight(width);
rectangle.setX(0);
rectangle.setY(0);
rectangle.setWidth(labelPrefWidth + 10);
rectangle.setHeight(labelPrefHeight + 6);
label.resizeRelocate(5, 3, labelPrefWidth, labelPrefHeight);
line.setStartX(width / 2.0);
line.setEndX(line.getStartX());
line.setStartY(rectangle.getHeight());
line.setEndY(height);
}
代码示例来源:origin: at.bestsolution.eclipse/org.eclipse.fx.ui.controls
this.caret.setStartY(getInsets().getTop() + 1);
this.caret.setEndY(h + getInsets().getTop() + 1);
this.caret.toFront();
this.caret.setStartY(0);
this.caret.setEndY(15);
this.caret.setStartX(0);
this.caret.setEndX(0);
this.caret.setStartY(0);
this.caret.setEndY(getHeight());
代码示例来源:origin: org.copper-engine/copper-monitoring-client
@Override
public void handle(MouseEvent event) {
Point2D scenePoint = chart.localToScene(event.getSceneX(), event.getSceneY());
Point2D position = chartWrap.sceneToLocal(scenePoint.getX(), scenePoint.getY());
Bounds chartAreaBounds = chartArea.localToScene(chartArea.getBoundsInLocal());
valueMarker.setStartY(0);
valueMarker.setEndY(chartWrap.sceneToLocal(chartAreaBounds).getMaxY() - chartWrap.sceneToLocal(chartAreaBounds).getMinY());
valueMarker.setStartX(0);
valueMarker.setEndX(0);
valueMarker.setTranslateX(position.getX() - chartWrap.getWidth() / 2);
double ydelta = chartArea.localToScene(0, 0).getY() - chartWrap.localToScene(0, 0).getY();
valueMarker.setTranslateY(-ydelta * 2);
}
});
代码示例来源:origin: com.jfoenix/jfoenix
line.setStroke(getSkinnable().isSelected() ? toggleButton.getToggleLineColor() : toggleButton.getUnToggleLineColor());
line.setStartX(0);
line.setStartY(0);
line.setEndX(circleRadius * 2 + 2);
line.setEndY(0);
内容来源于网络,如有侵权,请联系作者删除!