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

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

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

Line.getStyleClass介绍

暂无

代码示例

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

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: org.tentackle/tentackle-fx

line.getStyleClass().add("line");

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

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

相关文章