javafx.scene.layout.Region.resize()方法的使用及代码示例

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

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

Region.resize介绍

暂无

代码示例

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

@Override
protected Node getMask() {
  Region clip = new Region();
  JFXNodeUtils.updateBackground(JFXTreeCell.this.getBackground(), clip);
  double width = control.getLayoutBounds().getWidth();
  double height = control.getLayoutBounds().getHeight();
  clip.resize(width, height);
  return clip;
}

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

@Override
protected Node getMask() {
  Region clip = new Region();
  JFXNodeUtils.updateBackground(JFXListCell.this.getBackground(), clip);
  double width = control.getLayoutBounds().getWidth();
  double height = control.getLayoutBounds().getHeight();
  clip.resize(width, height);
  return clip;
}

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

public void release() {
  this.index = -1;
  this.caretLayer.hideCaret();
  this.selectionLayer.selection = null;
  this.selectionLayer.selectionMarker.resize(0, 0);
}

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

@Override
protected Node getMask() {
  Region clip = new Region();
  JFXNodeUtils.updateBackground(JFXListCell.this.getBackground(), clip);
  double width = control.getLayoutBounds().getWidth();
  double height = control.getLayoutBounds().getHeight();
  clip.resize(width, height);
  return clip;
}

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

@Override
protected Node getMask() {
  Region clip = new Region();
  JFXNodeUtils.updateBackground(JFXTreeCell.this.getBackground(), clip);
  double width = control.getLayoutBounds().getWidth();
  double height = control.getLayoutBounds().getHeight();
  clip.resize(width, height);
  return clip;
}

代码示例来源:origin: com.aquafx-project/aquafx

@Override protected void layoutChildren(double x, double y, double w, double h) {
  super.layoutChildren(x, y, w, h);
  if (searchIconPath != null) {
    searchIconPath.toFront();
    double height = getSkinnable().getHeight();
    searchIconPath.setLayoutX(0);
    searchIconPath.setLayoutY(0);
    searchIconPath.resize(height, height);
  }
  if (cancelSearchIconPath != null) {
    cancelSearchIconPath.toFront();
    double height = getSkinnable().getHeight();
    cancelSearchIconPath.setTranslateX(getSkinnable().getWidth() - height * 1.5);
    cancelSearchIconPath.setLayoutY(height * 0.15);
    cancelSearchIconPath.resize(height * 0.55, height * 0.55);
  }
}

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

private void handleSelectionChange(Observable o, TextSelection oldSelection, TextSelection newSelection) {
  if (newSelection.length == 0) {
    this.selectionMarker.setVisible(false);
    this.selectionMarker.resize(0, 0);
  } else {
    this.selectionMarker.setVisible(true);
    int start = newSelection.offset;
    int end = newSelection.offset + newSelection.length;
    this.selectionStartNode = null;
    this.selectionEndNode = null;
    for (StyledTextNode t : this.textNodes) {
      if (t.intersectOffset(start, end)) {
        if (this.selectionStartNode == null) {
          this.selectionStartNode = t;
        }
        this.selectionEndNode = t;
      }
    }
    if (this.selectionStartNode != null && this.selectionEndNode != null) {
      int charIndex = start - this.selectionStartNode.getStartOffset();
      this.selectionStartX = this.selectionStartNode.getCharLocation(charIndex);
      charIndex = end - this.selectionEndNode.getStartOffset();
      this.selectionEndX = this.selectionEndNode.getCharLocation(charIndex);
      requestLayout();
    }
  }
}

相关文章

微信公众号

最新文章

更多