@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);
            }
        }
    }
@ 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 ) ; } } }
{@inheritDoc}