@Override public void resizeRelocate( Node node, double b0, double l0, double breadth, double length) { node.resizeRelocate(l0, b0, length, breadth); }
@Override public void resizeRelocate( Node node, double b0, double l0, double breadth, double length) { node.resizeRelocate(b0, l0, breadth, length); }
@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); }); }
@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); }); } }
@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()); } }
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; } } }
@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++; } }
@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++; } }
/** * 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); } }
/** * 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); } }
@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++; } }
@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; } } } }
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; } }
e.getValue().resizeRelocate(x, y + dy, width, height); });
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); }
@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); }
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; }
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);
@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); } }
@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)); }