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

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

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

Region.resizeRelocate介绍

暂无

代码示例

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

@Override
  protected void layoutChildren() {
    super.layoutChildren();
    clip.resizeRelocate(0,0,getWidth(), getHeight());
  }
}

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

@Override
protected void layoutChildren() {
  super.layoutChildren();
  clip.resizeRelocate(0,0,getWidth(), getHeight());
}

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

@Override
protected void layoutChildren(double x, double y, double w, double h) {
  super.layoutChildren(x, y, w, h);
  double hInsets = snappedLeftInset() + snappedRightInset();
  double vInsets = snappedTopInset() + snappedBottomInset();
  double width = w + hInsets;
  double height = h + vInsets;
  colorBox.resizeRelocate(0, 0, width, height);
  pickerColorClip.resizeRelocate(0,0, width, height);
}

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

@Override
protected void layoutChildren(double x, double y, double w, double h) {
  track.resizeRelocate(x, y, w, h);
  secondaryBar.resizeRelocate(x, y, secondaryBarWidth, h);
  bar.resizeRelocate(x, y, getSkinnable().isIndeterminate() ? w : barWidth, h);
  clip.resizeRelocate(0,0, w, h);
  if (getSkinnable().isIndeterminate()) {
    createIndeterminateTimeline();
    if (getSkinnable().impl_isTreeVisible()) {
      indeterminateTransition.play();
    }
    // apply clip
    bar.setClip(clip);
  } else if (indeterminateTransition != null) {
    clearAnimation();
    // remove clip
    bar.setClip(null);
  }
}

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

child.resizeRelocate(blockX, blockY, blockWidth, blockHeight);
} else {
  BoundingBox oldBoundingBox = oldBoxes.get(child);
    child.resizeRelocate(blockX, blockY, blockWidth, blockHeight);
      child.setOpacity(0);
      child.setPrefSize(blockWidth, blockHeight);
      child.resizeRelocate(blockX, blockY, blockWidth, blockHeight);

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

@Override
protected void layoutChildren() {
  super.layoutChildren();
  clip.resizeRelocate(0,0,getWidth(), getHeight());
}

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

@Override
  protected void layoutChildren() {
    super.layoutChildren();
    clip.resizeRelocate(0,0,getWidth(), getHeight());
  }
}

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

@Override
  protected void layoutChildren() {
    //if (model == null) return;
    if (this.selection != null) {
      LineNode.this.textLayer.applyCss();
      LineNode.this.textLayer.layout();
      double begin = LineNode.this.textLayer.getCharLocation(this.selection.lowerEndpoint().intValue());
      double end = LineNode.this.textLayer.getCharLocation(this.selection.upperEndpoint().intValue());
      if (this.selection.upperEndpoint().intValue() == LineNode.this.lineHelper.getLength(LineNode.this.index) && this.continues) {
        end = getWidth();
      }
      this.selectionMarker.resizeRelocate(begin, 0, end - begin, getHeight());
    }
  }
}

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

@Override
protected void layoutChildren(double x, double y, double w, double h) {
  super.layoutChildren(x, y, w, h);
  double hInsets = snappedLeftInset() + snappedRightInset();
  double vInsets = snappedTopInset() + snappedBottomInset();
  double width = w + hInsets;
  double height = h + vInsets;
  colorBox.resizeRelocate(0, 0, width, height);
  pickerColorClip.resizeRelocate(0,0, width, height);
}

代码示例来源:origin: no.tornado/tornadofx-controls

@Override
protected void layoutChildren(){
  double contentX = getInsets().getLeft();
  double contentY = getInsets().getTop();
  double contentWidth = getWidth() - getHorizontalInsets();
  double contentHeight = getHeight() - getVerticalInsets();
  double labelWidth = Math.min( contentWidth,
      getFieldSet().getForm().getLabelContainerWidth( getHeight() ) );
  if( isHorizontalLabelPosition() ){
    if( labelHasContent() ){
      this.labelContainer.resizeRelocate(contentX,contentY,labelWidth,contentHeight);
      double inputX = contentX + labelWidth;
      double inputWidth = contentWidth - labelWidth;
      getInputContainer().resizeRelocate(inputX,contentY,inputWidth,contentHeight);
    } else {
      getInputContainer().resizeRelocate(contentX,contentY,contentWidth,contentHeight);
    }
  } else { // vertical label position
    if( labelHasContent() ){
      double labelPrefHeight = labelContainer.prefHeight( getWidth() );
      double labelHeight = Math.min(labelPrefHeight, contentHeight);
      labelContainer.resizeRelocate(contentX, contentY, Math.min( labelWidth, contentWidth), labelHeight );
      double restHeight = contentHeight - labelHeight;
      getInputContainer().resizeRelocate( contentX, contentY + labelHeight, contentWidth, restHeight );
    } else {
      getInputContainer().resizeRelocate( contentX, contentY, contentWidth, contentHeight );
    }
  }
}

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

@Override
protected void layoutChildren(double x, double y, double w, double h) {
  track.resizeRelocate(x, y, w, h);
  secondaryBar.resizeRelocate(x, y, secondaryBarWidth, h);
  bar.resizeRelocate(x, y, getSkinnable().isIndeterminate() ? w : barWidth, h);
  clip.resizeRelocate(0,0, w, h);
  if (getSkinnable().isIndeterminate()) {
    createIndeterminateTimeline();
    if (NodeHelper.isTreeShowing(getSkinnable())) {
      indeterminateTransition.play();
    }
    // apply clip
    bar.setClip(clip);
  } else if (indeterminateTransition != null) {
    clearAnimation();
    // remove clip
    bar.setClip(null);
  }
}

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

child.resizeRelocate(blockX, blockY, blockWidth, blockHeight);
} else {
  BoundingBox oldBoundingBox = oldBoxes.get(child);
    child.resizeRelocate(blockX, blockY, blockWidth, blockHeight);
      child.setOpacity(0);
      child.setPrefSize(blockWidth, blockHeight);
      child.resizeRelocate(blockX, blockY, blockWidth, blockHeight);

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

double x1 = this.textLayoutNode.localToParent(this.selectionStartNode.getBoundsInParent().getMinX(), 0).getX() + this.selectionStartX;
double x2 = this.textLayoutNode.localToParent(this.selectionEndNode.getBoundsInParent().getMinX(), 0).getX() + this.selectionEndX;
this.selectionMarker.resizeRelocate(x1, 0, x2 - x1, getHeight());

相关文章

微信公众号

最新文章

更多