本文整理了Java中javafx.scene.Node.resizeRelocate()
方法的一些代码示例,展示了Node.resizeRelocate()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.resizeRelocate()
方法的具体详情如下:
包路径:javafx.scene.Node
类名称:Node
方法名:resizeRelocate
暂无
代码示例来源:origin: org.fxmisc.flowless/flowless
@Override
public void resizeRelocate(
Node node, double b0, double l0, double breadth, double length) {
node.resizeRelocate(l0, b0, length, breadth);
}
代码示例来源:origin: org.fxmisc.flowless/flowless
@Override
public void resizeRelocate(
Node node, double b0, double l0, double breadth, double length) {
node.resizeRelocate(b0, l0, breadth, length);
}
代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls
@Override
protected void layoutChildren() {
this.activeNodes.entrySet().forEach(e -> {
if (!this.yOffsetData.containsKey(e.getKey())) {
return;
}
double x = 0;
double y = this.yOffsetData.get(e.getKey()).doubleValue();
double width = getWidth();
double height = getLineHeight();
e.getValue().resizeRelocate(x, y, width, height);
});
}
代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls
@Override
protected void layoutChildren() {
synchronized (this.sync) {
this.activeNodes.entrySet().forEach(e -> {
double x = 0;
double y = e.getKey().intValue() * getLineHeight() - getYOffset();
double width = getWidth();
double height = getLineHeight();
e.getValue().resizeRelocate(x, y, width, height);
});
}
}
代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls
@Override
protected void layoutChildren() {
Iterator<Entry<TextAnnotation, Node>> iterator = this.usedNodes.entrySet().iterator();
while (iterator.hasNext()) {
Entry<TextAnnotation, Node> entry = iterator.next();
com.google.common.collect.Range<Integer> range = entry.getKey().getRange();
double x = getCharLocation(range.lowerEndpoint().intValue());
double width = getCharLocation(range.upperEndpoint().intValue()) -x;
entry.getValue().resizeRelocate(x, 0, width, getHeight());
}
}
代码示例来源:origin: no.tornado/tornadofx-controls
protected void layoutChildren(double x, double y, double w, double h) {
for (Node node : getChildren()) {
if (getSkinnable().getOrientation() == Orientation.VERTICAL) {
double prefHeight = node.prefHeight(-1);
node.resizeRelocate(x, y, w, prefHeight);
y += prefHeight;
} else {
double prefWidth = node.prefWidth(-1);
node.resizeRelocate(x, y, prefWidth, h);
x += prefWidth;
}
}
}
代码示例来源:origin: eu.mihosoft.vrl.workflow/vworkflows-fx
@Override
protected void layoutChildren() {
int count = 0;
double width = getHeight();
double height = getHeight();
for (Node n : getManagedChildren()) {
double x = (width + spacing) * count;
n.resizeRelocate(x, 0, width, height);
count++;
}
}
代码示例来源:origin: org.jfxtras/jfxtras-window
@Override
protected void layoutChildren() {
int count = 0;
double width = getHeight();
double height = getHeight();
for (Node n : getManagedChildren()) {
double x = (width + spacing) * count;
n.resizeRelocate(x, 0, width, height);
count++;
}
}
代码示例来源:origin: no.tornado/tornadofx-controls
/**
* Lay out the columns of the TableRow, then add the expanded content node below if this row is currently expanded.
*/
@Override
protected void layoutChildren(double x, double y, double w, double h) {
super.layoutChildren(x, y, w, h);
if (isExpanded()) getContent().resizeRelocate(0.0, tableRowPrefHeight, w, h - tableRowPrefHeight);
}
}
代码示例来源:origin: org.controlsfx/controlsfx
/**
* Lay out the columns of the TableRow, then add the expanded content node below if this row is currently expanded.
*/
@Override
protected void layoutChildren(double x, double y, double w, double h) {
super.layoutChildren(x, y, w, h);
if (isExpanded()) getContent().resizeRelocate(0.0, tableRowPrefHeight, w, h - tableRowPrefHeight);
}
}
代码示例来源:origin: eu.mihosoft.vrl.workflow/vworkflows-fx
@Override
protected void layoutChildren() {
int count = 0;
double width = getHeight();
double height = getHeight();
for (Node n : getManagedChildren()) {
double x = (width + spacing) * count;
n.resizeRelocate(x, 0, width, height);
count++;
}
}
代码示例来源:origin: org.controlsfx/controlsfx
@Override
protected void layoutChildren(double contentX, double contentY, double contentWidth, double contentHeight) {
double total = getSkinnable().getTotal();
List<T> segments = getSkinnable().getSegments();
int size = segments.size();
double x = contentX;
double y = contentY + contentHeight;
for (int i = 0; i < size; i++) {
SegmentedBar.Segment segment = segments.get(i);
Node segmentNode = segmentNodes.get(segment);
double segmentValue = segment.getValue();
if (getSkinnable().getOrientation().equals(Orientation.HORIZONTAL)) {
double segmentWidth = segmentValue / total * contentWidth;
segmentNode.resizeRelocate(x, contentY, segmentWidth, contentHeight);
x += segmentWidth;
} else {
double segmentHeight = segmentValue / total * contentHeight;
segmentNode.resizeRelocate(contentX, y - segmentHeight, contentWidth, segmentHeight);
y -= segmentHeight;
}
}
}
}
代码示例来源:origin: no.tornado/tornadofx-controls
protected void layoutChildren(double contentX, double contentY, double contentWidth, double contentHeight) {
double usedLineWidth = 0;
double hgap = getSkinnable().getHgap().doubleValue();
double vgap = getSkinnable().getVgap().doubleValue();
double prefHeight = getPrefRowHeight();
for (Node node : getChildren()) {
double prefWidth = node.prefWidth(prefHeight);
if (usedLineWidth + prefWidth > contentWidth && usedLineWidth > 0) {
usedLineWidth = 0;
contentY += prefHeight + vgap;
}
double x = usedLineWidth + contentX;
node.resizeRelocate(x, contentY, prefWidth, prefHeight);
usedLineWidth += prefWidth + hgap;
}
}
代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls
e.getValue().resizeRelocate(x, y + dy, width, height);
});
代码示例来源:origin: org.controlsfx/controlsfx
private void addLocation(WorldMapView.Location location) {
Point2D coordinates = getLocationCoordinates(location);
Callback<WorldMapView.Location, Node> locationViewFactory = getSkinnable().getLocationViewFactory();
Node view = locationViewFactory.call(location);
if (view == null) {
throw new IllegalArgumentException("location view factory returned NULL");
}
view.getStyleClass().add(DEFAULT_STYLE_LOCATION);
view.setManaged(false);
locationsGroup.getChildren().add(view);
view.applyCss();
view.resizeRelocate(coordinates.getX(), coordinates.getY(), view.prefWidth(-1), view.prefHeight(-1));
locationMap.put(location, view);
}
代码示例来源:origin: org.controlsfx/controlsfx
@Override protected void layoutChildren(double x, double y, double w, double h) {
final double notificationBarHeight = notificationBar.prefHeight(w);
notificationBar.resize(w, notificationBarHeight);
// layout the content
if (content != null) {
content.resizeRelocate(x, y, w, h);
}
// and update the clip so that the notification bar does not draw outside
// the bounds of the notification pane
clip.setX(x);
clip.setY(y);
clip.setWidth(w);
clip.setHeight(h);
}
代码示例来源:origin: com.miglayout/miglayout-javafx
public Node createReplacement(Node node)
{
Rectangle2D b = getBounds(node);
Node replNode = new ImageView(node.snapshot(new SnapshotParameters(), null));
replacedNodeMap.put(node, replNode);
replNode.setUserData(node);
replNode.setManaged(false);
replNode.setId(ANIM_REPLACE_ID);
replNode.resizeRelocate(b.getMinX(), b.getMinY(), b.getWidth(), b.getHeight());
return replNode;
}
代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls
super.layoutChildren();
if (this.resizeLeft != null) {
this.resizeLeft.resizeRelocate(0, this.getResizeHandleSize(), this.getResizeHandleSize(), getHeight() - 2 * this.getResizeHandleSize());
this.resizeLeft.visibleProperty().bind(this.resizeable);
this.resizeRight.resizeRelocate(getWidth() - this.getResizeHandleSize(), this.getResizeHandleSize(), this.getResizeHandleSize(), getHeight() - 2 * this.getResizeHandleSize());
this.resizeRight.visibleProperty().bind(this.resizeable);
this.resizeTop.resizeRelocate(this.getResizeHandleSize(), 0, getWidth() - this.getResizeHandleSize(), this.getResizeHandleSize());
this.resizeTop.visibleProperty().bind(this.resizeable);
this.resizeBottom.resizeRelocate(this.getResizeHandleSize(), getHeight() - this.getResizeHandleSize(), getWidth() - this.getResizeHandleSize(), this.getResizeHandleSize());
this.resizeBottom.visibleProperty().bind(this.resizeable);
this.resizeCornerRightBottom.resizeRelocate(getWidth() - this.getResizeHandleSize(), getHeight() - this.getResizeHandleSize(), this.getResizeHandleSize(), this.getResizeHandleSize());
this.resizeCornerRightBottom.visibleProperty().bind(this.resizeable);
this.resizeCornerRightTop.resizeRelocate(getWidth() - this.getResizeHandleSize(), 0, this.getResizeHandleSize(), this.getResizeHandleSize());
this.resizeCornerRightTop.visibleProperty().bind(this.resizeable);
this.resizeCornerLeftBottom.resizeRelocate(0, getHeight() - this.getResizeHandleSize(), this.getResizeHandleSize(), this.getResizeHandleSize());
this.resizeCornerLeftBottom.visibleProperty().bind(this.resizeable);
this.resizeCornerLeftTop.resizeRelocate(0, 0, this.getResizeHandleSize(), this.getResizeHandleSize());
this.resizeCornerLeftTop.visibleProperty().bind(this.resizeable);
代码示例来源:origin: at.bestsolution.efxclipse.rt/org.eclipse.fx.ui.controls
@Override
protected void layoutChildren() {
int space = 0;
int w = 16;
this.horizontal.resizeRelocate(0, getHeight() - w, getWidth() - w , w);
this.vertical.resizeRelocate(getWidth() - w, 0, w, getHeight()- w);
if (this.center != null) {
this.clip.setX(0);
this.clip.setY(0);
this.clip.setWidth(getWidth() - w - space);
this.clip.setHeight(getHeight() - w - space);
this.center.resizeRelocate(0, 0, getWidth() - w - space, getHeight() - w - space);
}
}
代码示例来源:origin: org.fxmisc.richtext/richtextfx
@Override
protected
void layoutChildren() {
Insets ins = getInsets();
double w = getWidth() - ins.getLeft() - ins.getRight();
double h = getHeight() - ins.getTop() - ins.getBottom();
double graphicWidth = getGraphicPrefWidth();
text.resizeRelocate(graphicWidth + ins.getLeft(), ins.getTop(), w - graphicWidth, h);
graphic.ifPresent(g -> g.resizeRelocate(graphicOffset.get() + ins.getLeft(), ins.getTop(), graphicWidth, h));
}
内容来源于网络,如有侵权,请联系作者删除!