本文整理了Java中javafx.scene.Node.resize()
方法的一些代码示例,展示了Node.resize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.resize()
方法的具体详情如下:
包路径:javafx.scene.Node
类名称:Node
方法名:resize
暂无
代码示例来源:origin: jfoenixadmin/JFoenix
JFXNodeUtils.updateBackground(((Region) control).getBackground(), (Region) mask);
mask.resize(width, height);
mask.relocate(bounds.getMinX() + diffMinX, bounds.getMinY() + diffMinY);
break;
代码示例来源:origin: org.fxmisc.flowless/flowless
@Override
public void resize(Node node, double breadth, double length) {
node.resize(breadth, length);
}
代码示例来源:origin: org.fxmisc.flowless/flowless
@Override
public void resize(Node node, double breadth, double length) {
node.resize(length, breadth);
}
代码示例来源:origin: stackoverflow.com
Node backgroundNode = getBackgroundNode();
backgroundNode.resize(1080, 720);
backgroundNode.snapshot(new SnapshotParameters(), null);
代码示例来源:origin: com.guigarage/animations
@Override
protected void layoutChildren() {
super.layoutChildren();
for(Node child : getChildren()) {
if(!child.equals(playIcon) && !child.equals(pauseIcon)) {
child.relocate(0, 0);
child.resize(getWidth(), getHeight());
}
}
}
}
代码示例来源:origin: stackoverflow.com
private class MyLayer extends Layer {
private final Node root;
private final double size = 150;
public MyLayer() {
root = new StackPane(new Button("A custom layer"));
root.setStyle("-fx-background-color: white;");
getChildren().add(root);
getGlassPane().getLayers().add(this);
}
@Override
public void layoutChildren() {
root.setVisible(isShowing());
if (!isShowing()) {
return;
}
root.resize(size, size);
resizeRelocate((getGlassPane().getWidth() - size)/2, (getGlassPane().getHeight()- size)/2, size, size);
}
}
代码示例来源:origin: eu.mihosoft.vrl.workflow/vworkflows-fx
@Override
protected void layoutChildren() {
getParent().requestLayout();
super.layoutChildren();
for (Node n : getManagedChildren()) {
if (n instanceof Region) {
Region p = (Region) n;
double width = Math.max(p.getMinWidth(), p.getPrefWidth());
double height = Math.max(p.getMinHeight(), p.getPrefHeight());
n.resize(width, height);
double nX = Math.min(0, n.getLayoutX());
double nY = Math.min(0, n.getLayoutY());
n.relocate(nX, nY);
}
}
}
代码示例来源:origin: org.fxmisc.flowless/flowless
@Override
protected void layoutChildren() {
double width = getLayoutBounds().getWidth();
double height = getLayoutBounds().getHeight();
content.resize(width / zoom.getX(), height/ zoom.getY());
}
代码示例来源:origin: org.jfxtras/jfxtras-common
lNode.resize(lNodeLayoutInfo.w, lNodeLayoutInfo.h);
代码示例来源:origin: org.controlsfx/controlsfx
@Override protected void layoutChildren(double x, double y, double w, double h) {
for (int i = 0; i < getChildren().size(); i++) {
Node n = getChildren().get(i);
double nw = snapSize(n.prefWidth(h));
double nh = snapSize(n.prefHeight(-1));
if (i > 0) {
// We have to position the bread crumbs slightly overlapping
double ins = n instanceof BreadCrumbButton ? ((BreadCrumbButton)n).getArrowWidth() : 0;
x = snapPosition(x - ins);
}
n.resize(nw, nh);
n.relocate(x, y);
x += nw;
}
}
代码示例来源:origin: org.fxmisc.flowless/flowless
@Override
protected void layoutChildren() {
double layoutWidth = getLayoutBounds().getWidth();
double layoutHeight = getLayoutBounds().getHeight();
boolean vbarVisible = vbar.isVisible();
boolean hbarVisible = hbar.isVisible();
double vbarWidth = vbarVisible ? vbar.prefWidth(-1) : 0;
double hbarHeight = hbarVisible ? hbar.prefHeight(-1) : 0;
double w = layoutWidth - vbarWidth;
double h = layoutHeight - hbarHeight;
content.resize(w, h);
hbar.setVisibleAmount(w);
vbar.setVisibleAmount(h);
if(vbarVisible) {
vbar.resizeRelocate(layoutWidth - vbarWidth, 0, vbarWidth, h);
}
if(hbarVisible) {
hbar.resizeRelocate(0, layoutHeight - hbarHeight, w, hbarHeight);
}
}
代码示例来源:origin: org.controlsfx/controlsfx
@Override protected void layoutChildren(double x, double y, double w, double h) {
// double currentWidth = getSkinnable().getWidth();
double cellWidth = getSkinnable().gridViewProperty().get().getCellWidth();
double cellHeight = getSkinnable().gridViewProperty().get().getCellHeight();
double horizontalCellSpacing = getSkinnable().gridViewProperty().get().getHorizontalCellSpacing();
double verticalCellSpacing = getSkinnable().gridViewProperty().get().getVerticalCellSpacing();
double xPos = 0;
double yPos = 0;
// This has been commented out as I removed the API from GridView until
// a use case was created.
// HPos currentHorizontalAlignment = getSkinnable().gridViewProperty().get().getHorizontalAlignment();
// if (currentHorizontalAlignment != null) {
// if (currentHorizontalAlignment.equals(HPos.CENTER)) {
// xPos = (currentWidth % computeCellWidth()) / 2;
// } else if (currentHorizontalAlignment.equals(HPos.RIGHT)) {
// xPos = currentWidth % computeCellWidth();
// }
// }
for (Node child : getChildren()) {
child.relocate(xPos + horizontalCellSpacing, yPos + verticalCellSpacing);
child.resize(cellWidth, cellHeight);
xPos = xPos + horizontalCellSpacing + cellWidth + horizontalCellSpacing;
}
}
}
代码示例来源:origin: com.jfoenix/jfoenix
JFXNodeUtils.updateBackground(((Region) control).getBackground(), (Region) mask);
mask.resize(width, height);
mask.relocate(bounds.getMinX() + diffMinX, bounds.getMinY() + diffMinY);
break;
代码示例来源:origin: com.nexitia.emaginplatform/emagin-jfxcore-engine
node.resize(w - SHADOW_WIDTH * 2 - ROUNDED_DELTA * 2, h - SHADOW_WIDTH * 2 - ROUNDED_DELTA * 2);
node.setLayoutX(SHADOW_WIDTH + ROUNDED_DELTA);
node.setLayoutY(SHADOW_WIDTH + ROUNDED_DELTA);
内容来源于网络,如有侵权,请联系作者删除!