javafx.scene.shape.Line.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(8.2k)|赞(0)|评价(0)|浏览(148)

本文整理了Java中javafx.scene.shape.Line.<init>()方法的一些代码示例,展示了Line.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Line.<init>()方法的具体详情如下:
包路径:javafx.scene.shape.Line
类名称:Line
方法名:<init>

Line.<init>介绍

暂无

代码示例

代码示例来源:origin: jfoenixadmin/JFoenix

rippler.setRipplerFill(getSkinnable().isSelected() ? control.getUnCheckedColor() : control.getCheckedColor());
rightLine = new Line();
leftLine = new Line();
rightLine.setStroke(control.getCheckedColor());
rightLine.setStrokeWidth(lineThick);

代码示例来源:origin: jfoenixadmin/JFoenix

Line line = new Line(shift, 0, contentCircleRadius, 0);
line.fillProperty().bind(timePicker.defaultColorProperty());
line.strokeProperty().bind(line.fillProperty());

代码示例来源:origin: jfoenixadmin/JFoenix

Line line = new Line(shift, 0, contentCircleRadius, 0);
line.fillProperty().bind(timePicker.defaultColorProperty());
line.strokeProperty().bind(line.fillProperty());
pointerGroup.setVisible(!is24HourView);
Line _24HourLine = new Line(shift + _24HourShift, 0, contentCircleRadius, 0);
_24HourLine.fillProperty().bind(timePicker.defaultColorProperty());
_24HourLine.strokeProperty().bind(_24HourLine.fillProperty());

代码示例来源:origin: jfoenixadmin/JFoenix

line = new Line();
line.setStroke(getSkinnable().isSelected() ? toggleButton.getToggleLineColor() : toggleButton.getUnToggleLineColor());
line.setStartX(0);

代码示例来源:origin: org.copper-engine/copper-monitoring-client

public static void addMarker(final XYChart<?, ?> chart, final StackPane chartWrap) {
  final Line valueMarker = new Line();
  final Node chartArea = chart.lookup(".chart-plot-background");
  chartArea.setOnMouseMoved(new EventHandler<MouseEvent>() {
    @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);
    }
  });
  chartWrap.getChildren().add(valueMarker);
}

代码示例来源:origin: com.powsybl/powsybl-gse-network-explorer

public CapacitorSymbol(Color stroke, double strokeWidth, double size) {
  setPrefSize(size, size);
  l1 = new Line();
  l1.setStroke(stroke);
  l1.setStrokeWidth(strokeWidth);
  l2 = new Line();
  l2.setStroke(stroke);
  l2.setStrokeWidth(strokeWidth);
  l3 = new Line();
  l3.setStroke(stroke);
  l3.setStrokeWidth(strokeWidth);
  l4 = new Line();
  l4.setStroke(stroke);
  l4.setStrokeWidth(strokeWidth);
  getChildren().addAll(l1, l2, l3, l4);
}

代码示例来源:origin: com.powsybl/powsybl-gse-network-explorer

public ResistanceSymbol(Color stroke, double strokeWidth, double size, int peaks) {
  this.peaks = peaks;
  setPrefSize(size, size);
  l1 = new Line();
  l1.setStroke(stroke);
  l1.setStrokeWidth(strokeWidth);
  l2 = new Line();
  l2.setStroke(stroke);
  l2.setStrokeWidth(strokeWidth);
  getChildren().addAll(l1, l2);
  peakLine1 = new Line[peaks];
  peakLine2 = new Line[peaks];
  peakLine3 = new Line[peaks];
  for (int i = 0; i < peaks; i++) {
    peakLine1[i] = new Line();
    peakLine1[i].setStroke(stroke);
    peakLine1[i].setStrokeWidth(strokeWidth);
    peakLine2[i] = new Line();
    peakLine2[i].setStroke(stroke);
    peakLine2[i].setStrokeWidth(strokeWidth);
    peakLine3[i] = new Line();
    peakLine3[i].setStroke(stroke);
    peakLine3[i].setStrokeWidth(strokeWidth);
    getChildren().addAll(peakLine1[i], peakLine2[i], peakLine3[i]);
  }
}

代码示例来源:origin: com.bitplan.radolan/com.bitplan.radolan

/**
 * draw a cross on the given pane with the given stroke width and color
 * 
 * @param pane
 * @param strokeWidth
 * @param color
 */
public static void drawCross(Pane pane, double strokeWidth, Color color) {
 double w = pane.getWidth();
 double h = pane.getHeight();
 Line line = new Line(0, 0, w, h);
 line.setStrokeWidth(strokeWidth);
 line.setStroke(color);
 Line line2 = new Line(w, 0, 0, h);
 line2.setStrokeWidth(strokeWidth);
 line2.setStroke(color);
 pane.getChildren().addAll(line, line2);
}

代码示例来源:origin: com.powsybl/powsybl-gse-network-explorer

public InductorSymbol(Color stroke, double strokeWidth, double size, int spirals) {
  this.spirals = spirals;
  setPrefSize(size, size);
  l1 = new Line();
  l1.setStroke(stroke);
  l1.setStrokeWidth(strokeWidth);
  a = new Arc[spirals];
  for (int i = 0; i < spirals; i++) {
    a[i] = createArc(stroke, strokeWidth);
  }
  l2 = new Line();
  l2.setStroke(stroke);
  l2.setStrokeWidth(strokeWidth);
  getChildren().addAll(l1, l2);
  getChildren().addAll(Arrays.asList(a));
}

代码示例来源:origin: com.powsybl/powsybl-gse-network-explorer

public GroundSymbol(Color stroke, double strokeWidth, double size) {
  setPrefSize(size, size);
  for (int i = 0; i < lines.length; i++) {
    lines[i] = new Line();
    lines[i].setStroke(stroke);
    lines[i].setStrokeWidth(strokeWidth);
  }
  getChildren().addAll(lines);
}

代码示例来源: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: com.cedarsoft.commons/javafx

public DragButton(@Nonnull String text) {
 setCursor(Cursor.W_RESIZE);
 rectangle = new Rectangle();
 rectangle.setFill(Color.GRAY);
 rectangle.setArcHeight(5.0);
 rectangle.setArcWidth(5.0);
 line = new Line();
 label = Components.label(text);
 label.setTextFill(Color.WHITE);
 getChildren().addAll(rectangle, line, label);
}

代码示例来源:origin: at.bestsolution.eclipse/org.eclipse.fx.ui.controls

@Override
public void attach(StyledTextNode node, Text textNode) {
  Line l = (Line) textNode.getUserData();
  if( l == null ) {
    l = new Line();
    l.setManaged(false);
    l.setEndX(textNode.getBoundsInLocal().getWidth());
    l.setTranslateY(textNode.getBaselineOffset() + 2.0);
    textNode.setUserData(l);
  }
  node.getChildren().add(l);
}

代码示例来源:origin: com.powsybl/powsybl-gse-network-explorer

public SwitchSymbol(Color stroke, double strokeWidth, double size) {
  setPrefSize(size, size);
  leg1 = new Line();
  leg1.setFill(stroke);
  leg1.setStroke(stroke);
  leg1.setStrokeWidth(strokeWidth);
  leg2 = new Line();
  leg2.setFill(stroke);
  leg2.setStroke(stroke);
  leg2.setStrokeWidth(strokeWidth);
  box = new Rectangle();
  box.setFill(Color.TRANSPARENT);
  box.setStroke(stroke);
  box.setStrokeWidth(strokeWidth);
  getChildren().addAll(leg1, leg2, box);
}

代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls

Line l = new Line();
l.setStartX(0);
l.setStartY(6);
Line l = new Line();
l.setStartX(0);
l.setStartY(6);

代码示例来源:origin: at.bestsolution.eclipse/org.eclipse.fx.ui.controls

Line l = new Line();
l.setStartX(0);
l.setStartY(6);
Line l = new Line();
l.setStartX(0);
l.setStartY(6);

代码示例来源: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

rippler.setRipplerFill(getSkinnable().isSelected() ? control.getUnCheckedColor() : control.getCheckedColor());
rightLine = new Line();
leftLine = new Line();
rightLine.setStroke(control.getCheckedColor());
rightLine.setStrokeWidth(lineThick);

代码示例来源:origin: ch.sahits.game/OpenPatricianJavaFX

Line line = new Line(0, radius, destinationWidth, radius);
line.setStrokeWidth(10);
line.setRotate(angle/2);

代码示例来源:origin: org.copper-engine/copper-monitoring-client

animationPane.getChildren().add(adapterText);
Line lineInput = new Line();
lineInput.getStrokeDashArray().addAll(5d);
lineInput.setCache(true);
animationPane.getChildren().add(lineInput);
Line lineOutput = new Line();
lineOutput.getStrokeDashArray().addAll(5d);
lineOutput.setCache(true);

相关文章