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

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

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

Line.setStrokeWidth介绍

暂无

代码示例

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

leftLine = new Line();
rightLine.setStroke(control.getCheckedColor());
rightLine.setStrokeWidth(lineThick);
leftLine.setStroke(control.getCheckedColor());
leftLine.setStrokeWidth(lineThick);
rightLine.setVisible(false);
leftLine.setVisible(false);

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

line.fillProperty().bind(timePicker.defaultColorProperty());
line.strokeProperty().bind(line.fillProperty());
line.setStrokeWidth(1.5);
minsPointer.getChildren().addAll(line, selectionCircle, minCircle);
StackPane.setAlignment(selectionCircle, Pos.CENTER_LEFT);

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

line.fillProperty().bind(timePicker.defaultColorProperty());
line.strokeProperty().bind(line.fillProperty());
line.setStrokeWidth(1.5);
hoursPointer.getChildren().addAll(line, selectionCircle);
StackPane.setAlignment(selectionCircle, Pos.CENTER_LEFT);
_24HourLine.fillProperty().bind(timePicker.defaultColorProperty());
_24HourLine.strokeProperty().bind(_24HourLine.fillProperty());
_24HourLine.setStrokeWidth(1.5);
_24HoursPointer.getChildren().addAll(_24HourLine, _24HourSelectionCircle);
StackPane.setAlignment(_24HourSelectionCircle, Pos.CENTER_LEFT);

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

line.setEndX(circleRadius * 2 + 2);
line.setEndY(0);
line.setStrokeWidth(circleRadius * 1.5);
line.setStrokeLineCap(StrokeLineCap.ROUND);
line.setSmooth(true);

代码示例来源: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.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.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 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: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls

public CaretLayer() {
  this.caret.setVisible(false);
  this.caret.setStrokeWidth(2);
  this.caret.getStyleClass().add("text-caret"); //$NON-NLS-1$
  this.caret.setVisible(false);
  this.getChildren().add(this.caret);
  this.caretAnimation = createCaretAnimation(this.caret);
  
  this.sceneProperty().addListener((x, o, n)->{
    if (n == null) {
      if (this.caretAnimation != null) {
        this.caretAnimation.stop();
      }
      this.caretAnimation = null;
    }
    else {
      this.caretAnimation = createCaretAnimation(this.caret);
    }
  });
}

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

l.setEndX(0);
l.setEndY(40);
l.setStrokeWidth(7);
l.setStrokeLineCap(StrokeLineCap.ROUND);
l.setStroke(Color.WHITE);
l.setEndX(0);
l.setEndY(40);
l.setStrokeWidth(3);
l.setStrokeLineCap(StrokeLineCap.ROUND);
l.strokeProperty().bind(this.fill);

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

l.setEndX(0);
l.setEndY(40);
l.setStrokeWidth(7);
l.setStrokeLineCap(StrokeLineCap.ROUND);
l.setStroke(Color.WHITE);
l.setEndX(0);
l.setEndY(40);
l.setStrokeWidth(3);
l.setStrokeLineCap(StrokeLineCap.ROUND);
l.strokeProperty().bind(this.fill);

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

wire1.setStrokeWidth(2);
wire2.setStrokeWidth(2);
wire3.setStrokeWidth(2);
wire4.setStrokeWidth(2);
wire5.setStrokeWidth(2);
wire6.setStrokeWidth(2);
wire7.setStrokeWidth(2);
wire8.setStrokeWidth(2);
wire9.setStrokeWidth(2);

代码示例来源:origin: com.jfoenix/jfoenix

leftLine = new Line();
rightLine.setStroke(control.getCheckedColor());
rightLine.setStrokeWidth(lineThick);
leftLine.setStroke(control.getCheckedColor());
leftLine.setStrokeWidth(lineThick);
rightLine.setVisible(false);
leftLine.setVisible(false);

代码示例来源:origin: com.jfoenix/jfoenix

line.fillProperty().bind(timePicker.defaultColorProperty());
line.strokeProperty().bind(line.fillProperty());
line.setStrokeWidth(1.5);
hoursPointer.getChildren().addAll(line, selectionCircle);
StackPane.setAlignment(selectionCircle, Pos.CENTER_LEFT);
_24HourLine.fillProperty().bind(timePicker.defaultColorProperty());
_24HourLine.strokeProperty().bind(_24HourLine.fillProperty());
_24HourLine.setStrokeWidth(1.5);
_24HoursPointer.getChildren().addAll(_24HourLine, _24HourSelectionCircle);
StackPane.setAlignment(_24HourSelectionCircle, Pos.CENTER_LEFT);

代码示例来源:origin: com.jfoenix/jfoenix

line.fillProperty().bind(timePicker.defaultColorProperty());
line.strokeProperty().bind(line.fillProperty());
line.setStrokeWidth(1.5);
minsPointer.getChildren().addAll(line, selectionCircle, minCircle);
StackPane.setAlignment(selectionCircle, Pos.CENTER_LEFT);

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

this.selectionMarker.getStyleClass().add("selection-marker"); //$NON-NLS-1$
this.caret.setVisible(false);
this.caret.setStrokeWidth(2);
this.caret.setManaged(false);
this.caret.getStyleClass().add("text-caret"); //$NON-NLS-1$

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

line.setStrokeWidth(10);
line.setRotate(angle/2);

代码示例来源:origin: com.jfoenix/jfoenix

line.setEndX(circleRadius * 2 + 2);
line.setEndY(0);
line.setStrokeWidth(circleRadius * 1.5);
line.setStrokeLineCap(StrokeLineCap.ROUND);
line.setSmooth(true);

相关文章