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

x33g5p2x  于2022-01-29 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(143)

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

Rectangle.setStrokeType介绍

暂无

代码示例

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

rectangle.setStrokeType(StrokeType.INSIDE);

代码示例来源:origin: org.jrebirth.af/component

private Rectangle buidlRectangle(double stroke) {
  Rectangle r = new Rectangle();
  r.setStrokeType(StrokeType.INSIDE);
  r.setStrokeWidth(stroke);
  r.setStroke(Color.RED);
  r.setFill(Color.TRANSPARENT);
  return r;
}

代码示例来源:origin: org.jrebirth.af/component

private Rectangle buidlRectangle(double stroke) {
  Rectangle r = new Rectangle();
  r.setStrokeType(StrokeType.INSIDE);
  r.setStrokeWidth(stroke);
  r.setStroke(Color.RED);
  r.setFill(Color.TRANSPARENT);
  return r;
}

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

rectangle.setStrokeType(StrokeType.INSIDE);

代码示例来源:origin: org.controlsfx/controlsfx

/**
 * Styles the selected and unselected area.
 */
private void styleAreas() {
  selectedArea.fillProperty().bind(getSkinnable().selectionAreaFillProperty());
  selectedArea.strokeProperty().bind(getSkinnable().selectionBorderPaintProperty());
  selectedArea.strokeWidthProperty().bind(getSkinnable().selectionBorderWidthProperty());
  selectedArea.setStrokeType(StrokeType.OUTSIDE);
  // if the control's layout depends on this rectangle,
  // the stroke's width messes up the layout if the selection is on the pane's edge
  selectedArea.setManaged(false);
  selectedArea.setMouseTransparent(true);
  unselectedArea.setFill(Color.TRANSPARENT);
  unselectedArea.strokeProperty().bind(getSkinnable().unselectedAreaFillProperty());
  unselectedArea.strokeWidthProperty().bind(
      Bindings.max(getSkinnable().widthProperty(), getSkinnable().heightProperty()));
  unselectedArea.setStrokeType(StrokeType.OUTSIDE);
  // this call is crucial! it prevents the enormous unselected area from messing up the layout
  unselectedArea.setManaged(false);
  unselectedArea.setMouseTransparent(true);
}

代码示例来源:origin: org.gillius/jfxutils

selectRect.setOpacity( 0.3 );
selectRect.setStroke( Color.rgb( 0, 0x29, 0x66 ) );
selectRect.setStrokeType( StrokeType.INSIDE );
selectRect.setStrokeWidth( 3.0 );
StackPane.setAlignment( selectRect, Pos.TOP_LEFT );

相关文章

微信公众号

最新文章

更多