@Override protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) { return arcPane.prefWidth(-1); }
private double computeErrorWidth(double w) { return w - errorIcon.prefWidth(-1); }
@Override protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) { return Math.max(100, leftInset + bar.prefWidth(getSkinnable().getWidth()) + rightInset); }
@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); }
@Override protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) { return super.computePrefWidth(height, topInset, rightInset, bottomInset, leftInset) + snapSize(box.prefWidth(-1)) + labelOffset + 2 * padding; }
@Override protected double computePrefWidth(double height) { double prefWidth = snapSize(inner.prefWidth(height)); if (prefWidth > 0) { prefWidth += snappedLeftInset() + snappedRightInset(); } return prefWidth; }
@Override protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset) { return super.computePrefWidth(height, topInset, rightInset, bottomInset, leftInset) + snapSize(box.prefWidth(-1)) + getLabelOffset(); }
private boolean isTabsFitHeaderWidth() { double headerPrefWidth = snapSize(headersRegion.prefWidth(-1)); double rightControlWidth = 2 * snapSize(rightControlButton.prefWidth(-1)); double visibleWidth = headerPrefWidth + rightControlWidth + snappedLeftInset() + SPACER; return visibleWidth <= getWidth(); }
@Override protected double computePrefWidth(double height) { final double padding = isHorizontal() ? 2 * snappedLeftInset() + snappedRightInset() : 2 * snappedTopInset() + snappedBottomInset(); return snapSize(headersRegion.prefWidth(height)) + 2 * rightControlButton.prefWidth(height) + padding + SPACER; }
@Override protected void layoutChildren() { super.layoutChildren(); if (!getChildren().contains(selectedPane)) { getChildren().add(0, cellRippler); cellRippler.rippler.clear(); getChildren().add(0, selectedPane); } cellRippler.resizeRelocate(0, 0, getWidth(), getHeight()); cellRippler.releaseRipple(); selectedPane.resizeRelocate(0, 0, selectedPane.prefWidth(-1), getHeight()); selectedPane.setVisible(isSelected() ? true : false); }
public void invalid(double w) { final ValidatorBase activeValidator = control.getActiveValidator(); if (activeValidator != null) { showError(activeValidator); final double errorContainerWidth = w - errorIcon.prefWidth(-1); setOpacity(1); resize(w, computeErrorHeight(errorContainerWidth)); errorContainerClip.setWidth(w); errorContainerClip.setHeight(getHeight()); errorClipScale.setY(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()); }
snapSize(headersRegion.getWidth()) : 0 , 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 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));
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); }
thumbNewPos = thumbPos - shifting; } else { double height = animatedThumb.prefHeight(animatedThumb.prefWidth(-1)); thumbPos = thumb.getLayoutY() - height / 2; thumbNewPos = thumb.getLayoutY() - height - thumb.getHeight(); thumbNewPos = thumbPos - shifting; } else { double width = animatedThumb.prefWidth(-1); thumbPos = thumb.getLayoutX() - width / 2; thumbNewPos = thumb.getLayoutX() - width - thumb.getWidth();
final double lineWidth = selectedTabLine.prefWidth(-1);
@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); }
final double h = snapSize(getHeight()) - padding; final double tabBackgroundHeight = snapSize(prefHeight(-1)); final double headersPrefWidth = snapSize(headersRegion.prefWidth(-1)); final double headersPrefHeight = snapSize(headersRegion.prefHeight(-1));
@Override protected double computePrefWidth(double h, double topInset, double rightInset, double bottomInset, double leftInset) { final double pw = super.computePrefWidth(h, topInset, rightInset, bottomInset, leftInset); final double leftWidth = leftPane == null ? 0.0 : snapSize(leftPane.prefWidth(h)); final double rightWidth = rightPane == null ? 0.0 : snapSize(rightPane.prefWidth(h)); return pw + leftWidth + rightWidth; }