private void updateClipHeight(double newHeight) { clip.setHeight(newHeight - getGap()); }
/** * update the size of error container and its clip * * @param w * @param errorContainerHeight */ private void updateErrorContainerSize(double w, double errorContainerHeight) { errorContainerClip.setWidth(w); errorContainerClip.setHeight(errorContainerHeight); resize(w, errorContainerHeight); }
@Override protected void setOverLayBounds(Rectangle overlay) { overlay.setWidth(ripplerPane.getWidth()); overlay.setHeight(ripplerPane.getHeight()); }
@Override protected void handleControlPropertyChanged(String property) { super.handleControlPropertyChanged(property); if ("SELECTED_TAB".equals(property)) { isSelectingTab = true; selectedTab = getSkinnable().getSelectionModel().getSelectedItem(); getSkinnable().requestLayout(); } else if ("WIDTH".equals(property)) { clip.setWidth(getSkinnable().getWidth()); } else if ("HEIGHT".equals(property)) { clip.setHeight(getSkinnable().getHeight()); } }
protected void setOverLayBounds(Rectangle overlay){ overlay.setWidth(control.getLayoutBounds().getWidth()); overlay.setHeight(control.getLayoutBounds().getHeight()); }
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); }
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); } }
/** * {@inheritDoc} */ @Override protected void layoutChildren(double contentX, double contentY, double contentWidth, double contentHeight) { final double strokeWidth = arc.getStrokeWidth(); final double radius = Math.min(contentWidth, contentHeight) / 2 - strokeWidth / 2; final double arcSize = snapSize(radius * 2 + strokeWidth); arcPane.resizeRelocate((contentWidth - arcSize) / 2 + 1, (contentHeight - arcSize) / 2 + 1, arcSize, arcSize); updateArcLayout(radius, arcSize); fillRect.setWidth(arcSize); fillRect.setHeight(arcSize); if (!isValid) { initialize(); isValid = true; } if (!getSkinnable().isIndeterminate()) { arc.setLength(arcLength); if (text.isVisible()) { final double progress = control.getProgress(); int intProgress = (int) Math.round(progress * 100.0); Font font = text.getFont(); text.setFont(Font.font(font.getFamily(), radius / 1.7)); text.setText((progress > 1 ? 100 : intProgress) + "%"); text.relocate((arcSize - text.getLayoutBounds().getWidth()) / 2, (arcSize - text.getLayoutBounds().getHeight()) / 2); } } }
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); }
this.setTranslateY(-gap / 2 + (-gap * (getIndex()))); clip.setY(gap / 2); clip.setHeight(getHeight() - gap); gapAnimation = new Timeline(new KeyFrame(Duration.millis(240), new KeyValue(this.translateYProperty(), } else if (selectionChanged) { clip.setY(0); clip.setHeight(getHeight()); gapAnimation = new Timeline( new KeyFrame(Duration.millis(240), clip.setHeight(getHeight() - gap); clip.setHeight(getHeight());
tabsClip.setHeight(contentHeight); tabsContainerHolder.resize(contentWidth, contentHeight); tabsContainerHolder.relocate(contentStartX, contentStartY); if (tabContentHolder.getClip() != null) { ((Rectangle) tabContentHolder.getClip()).setWidth(contentWidth); ((Rectangle) tabContentHolder.getClip()).setHeight(contentHeight);
private void updateClipHeight(double newHeight) { clip.setHeight(newHeight - getGap()); }
/** * update the size of error container and its clip * * @param w * @param errorContainerHeight */ private void updateErrorContainerSize(double w, double errorContainerHeight) { errorContainerClip.setWidth(w); errorContainerClip.setHeight(errorContainerHeight); resize(w, errorContainerHeight); }
public void setCount(int count) { text.setText(Integer.toString(count)); double height = text.getBoundsInLocal().getHeight(); double width = Math.max(text.getBoundsInLocal().getWidth(), height); r1.setWidth(width * 1.3); r1.setHeight(height * 1.3); r2.setWidth(width * 1.2); r2.setHeight(height * 1.2); } }
@Override protected void setOverLayBounds(Rectangle overlay) { overlay.setWidth(ripplerPane.getWidth()); overlay.setHeight(ripplerPane.getHeight()); }
/** * Resized the specified rectangle so that its upper left point is {@code (0, 0)} and its width and height are * both 0. * * @param rectangle * the {@link Rectangle} which will be resized */ private static void resizeRectangleToZero(Rectangle rectangle) { rectangle.setX(0); rectangle.setY(0); rectangle.setWidth(0); rectangle.setHeight(0); }
protected void setOverLayBounds(Rectangle overlay){ overlay.setWidth(control.getLayoutBounds().getWidth()); overlay.setHeight(control.getLayoutBounds().getHeight()); }
@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 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); }
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); } }