@Override protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) { return topInset + bar.prefHeight(width) + bottomInset; }
@Override protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) { return arcPane.prefHeight(-1); }
@Override protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) { return Math.max(super.computePrefHeight(width - box.prefWidth(-1), topInset, rightInset, bottomInset, leftInset), topInset + box.prefHeight(-1) + bottomInset); }
public void layoutLines(double x, double y, double w, double h, double controlHeight, double translateY) { this.contentHeight = translateY; clip.setY(-contentHeight); clip.setHeight(controlHeight + contentHeight); focusedLine.resizeRelocate(x, controlHeight, w, focusedLine.prefHeight(-1)); line.resizeRelocate(x, controlHeight, w, line.prefHeight(-1)); promptContainer.resizeRelocate(x, y, w, h); scale.setPivotX(w / 2); }
@Override protected double computePrefHeight(double width) { return Math.max(getSkinnable().getTabMinHeight(), snapSize(inner.prefHeight(width))) + snappedTopInset() + snappedBottomInset(); }
@Override protected double computePrefHeight(double width) { final double padding = isHorizontal() ? snappedTopInset() + snappedBottomInset() : snappedLeftInset() + snappedRightInset(); return snapSize(headersRegion.prefHeight(-1)) + padding; }
, tabBackgroundHeight - selectedTabLine.prefHeight(-1) , snapSize(selectedTabLine.prefWidth(-1)) , snapSize(selectedTabLine.prefHeight(-1)));
@Override protected void layoutChildren(final double x, final double y, final double w, final double h) { final double labelOffset = getLabelOffset(); final CheckBox checkBox = getSkinnable(); final double boxWidth = snapSize(box.prefWidth(-1)); final double boxHeight = snapSize(box.prefHeight(-1)); final double computeWidth = Math.min(checkBox.prefWidth(-1), checkBox.minWidth(-1)); final double labelWidth = Math.min(computeWidth - boxWidth, w - snapSize(boxWidth)) + labelOffset; final double labelHeight = Math.min(checkBox.prefHeight(labelWidth), h); final double maxHeight = Math.max(boxHeight, labelHeight); final double xOffset = computeXOffset(w, labelWidth + boxWidth, checkBox.getAlignment().getHpos()) + x; final double yOffset = computeYOffset(h, maxHeight, checkBox.getAlignment().getVpos()) + x; if (invalid) { if(checkBox.isIndeterminate()){ playIndeterminateAnimation(true, false); }else if (checkBox.isSelected()) { playSelectAnimation(true, false); } invalid = false; } layoutLabelInArea(xOffset + boxWidth + labelOffset, yOffset, labelWidth, maxHeight, checkBox.getAlignment()); rippler.resize(boxWidth, boxHeight); positionInArea(rippler, xOffset, yOffset, boxWidth, maxHeight, 0, checkBox.getAlignment().getHpos(), checkBox.getAlignment().getVpos()); }
final RadioButton radioButton = getSkinnable(); final double contWidth = snapSize(container.prefWidth(-1)); final double contHeight = snapSize(container.prefHeight(-1)); final double computeWidth = Math.max(radioButton.prefWidth(-1), radioButton.minWidth(-1)); final double width = snapSize(contWidth);
private void updateHeaderContainerClip() { final double clipOffset = getClipOffset(); final Side side = getSkinnable().getSide(); double controlPrefWidth = 2 * snapSize(rightControlButton.prefWidth(-1)); // Add the spacer if the control buttons are shown // controlPrefWidth = controlPrefWidth > 0 ? controlPrefWidth + SPACER : controlPrefWidth; measureClosingTabs = true; final double headersPrefWidth = snapSize(headersRegion.prefWidth(-1)); final double headersPrefHeight = snapSize(headersRegion.prefHeight(-1)); measureClosingTabs = false; final double maxWidth = snapSize(getWidth()) - controlPrefWidth - clipOffset; final double clipWidth = headersPrefWidth < maxWidth ? headersPrefWidth : maxWidth; final double clipHeight = headersPrefHeight; clip.setX((side == Side.LEFT || side == Side.BOTTOM) && headersPrefWidth >= maxWidth ? headersPrefWidth - maxWidth : 0); clip.setY(0); clip.setWidth(clipWidth); clip.setHeight(clipHeight); }
@Override protected void layoutChildren(double x, double y, double w, double h) { super.layoutChildren(x, y, w, h); if (!isValid) { initializeVariables(); initAnimation(getSkinnable().getOrientation()); isValid = true; } double prefWidth = animatedThumb.prefWidth(-1); animatedThumb.resize(prefWidth, animatedThumb.prefHeight(prefWidth)); boolean horizontal = getSkinnable().getOrientation() == Orientation.HORIZONTAL; double width, height, layoutX, layoutY; if (horizontal) { width = thumb.getLayoutX() - snappedLeftInset(); height = track.getHeight(); layoutX = track.getLayoutX(); layoutY = track.getLayoutY(); animatedThumb.setLayoutX(thumb.getLayoutX() + thumb.getWidth() / 2 - animatedThumb.getWidth() / 2); } else { height = track.getLayoutBounds().getMaxY() + track.getLayoutY() - thumb.getLayoutY() - snappedBottomInset(); width = track.getWidth(); layoutX = track.getLayoutX(); layoutY = thumb.getLayoutY(); animatedThumb.setLayoutY(thumb.getLayoutY() + thumb.getHeight() / 2 - animatedThumb.getHeight() / 2); } coloredTrack.resizeRelocate(layoutX, layoutY, width, height); mouseHandlerPane.resizeRelocate(x, y, w, h); }
thumbNewPos = thumbPos - shifting; } else { double height = animatedThumb.prefHeight(animatedThumb.prefWidth(-1)); thumbPos = thumb.getLayoutY() - height / 2; thumbNewPos = thumb.getLayoutY() - height - thumb.getHeight();
final double tabBackgroundHeight = snapSize(prefHeight(-1)); final double headersPrefWidth = snapSize(headersRegion.prefWidth(-1)); final double headersPrefHeight = snapSize(headersRegion.prefHeight(-1));
@Override protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) { return topInset + bar.prefHeight(width) + bottomInset; }
@Override protected double computePrefHeight(double w, double topInset, double rightInset, double bottomInset, double leftInset) { final double ph = super.computePrefHeight(w, topInset, rightInset, bottomInset, leftInset); final double leftHeight = leftPane == null ? 0.0 : snapSize(leftPane.prefHeight(-1)); final double rightHeight = rightPane == null ? 0.0 : snapSize(rightPane.prefHeight(-1)); return Math.max(ph, Math.max(leftHeight, rightHeight)); } //
@Override protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) { return Math.max(super.computePrefHeight(width - box.prefWidth(-1), topInset, rightInset, bottomInset, leftInset), topInset + box.prefHeight(-1) + bottomInset); }
public void layoutLines(double x, double y, double w, double h, double controlHeight, double translateY) { this.contentHeight = translateY; clip.setY(-contentHeight); clip.setHeight(controlHeight + contentHeight); focusedLine.resizeRelocate(x, controlHeight, w, focusedLine.prefHeight(-1)); line.resizeRelocate(x, controlHeight, w, line.prefHeight(-1)); promptContainer.resizeRelocate(x, y, w, h); scale.setPivotX(w / 2); }
@Override protected double computePrefHeight(double width) { return Math.max(getSkinnable().getTabMinHeight(), snapSize(inner.prefHeight(width))) + snappedTopInset() + snappedBottomInset(); }
@Override protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) { if (isHorizontal()) { return getSkinnable().getInsets().getTop() + Math.max(lowThumb.prefHeight(-1), track.prefHeight(-1)) + ((showTickMarks) ? (trackToTickGap+tickLine.prefHeight(-1)) : 0) + bottomInset; } else { if(showTickMarks) { return Math.max(140, tickLine.prefHeight(-1)); } else { return 140; } } }
@Override protected double computePrefHeight(double width) { final double padding = isHorizontal() ? snappedTopInset() + snappedBottomInset() : snappedLeftInset() + snappedRightInset(); return snapSize(headersRegion.prefHeight(-1)) + padding; }