private void setBar(final double VALUE) {
        double factor  = VALUE / gauge.getRange();

        if (gauge.isGradientBarEnabled() && !gauge.getGradientBarStops().isEmpty()) {
            Color color = gauge.getGradientLookup().getColorAt(factor);
            fluidBody.setFill(color);
            fluidTop.setFill(color.darker());
        } else if (gauge.getSectionsVisible() && !sections.isEmpty()) {
            int listSize = sections.size();
            for (int i = 0 ; i < listSize ; i++) {
                if (sections.get(i).contains(VALUE)) {
                    Color color = sections.get(i).getColor();
                    fluidBody.setFill(color);
                    fluidTop.setFill(color.darker());
                    break;
                }
            }
        }

        double centerY = height * 0.71111111 - factor * 0.58888889 * height;
        fluidTop.setCenterY(centerY);

        fluidUpperRight.setControlY1(centerY + 0.58888889 * height);
        fluidUpperRight.setControlY2(centerY);
        fluidUpperRight.setY(centerY);

        fluidUpperCenter.setControlY1(centerY + 0.06666667 * height);
        fluidUpperCenter.setControlY2(centerY + 0.12222222 * height);
        fluidUpperCenter.setY(centerY + 0.12222222 * height);

        fluidUpperLeft.setControlY1(centerY + 0.12222222 * height);
        fluidUpperLeft.setControlY2(centerY + 0.06666667 * height);
        fluidUpperLeft.setY(centerY);

        valueText.setText(String.format(locale, formatString, factor * 100));
        valueText.relocate((width - valueText.getLayoutBounds().getWidth()) * 0.5, (height - valueText.getLayoutBounds().getHeight()) * 0.5);
    }
private void setBar ( final double VALUE ) { double factor = VALUE / gauge . getRange ( ) ; if ( gauge . isGradientBarEnabled ( ) && ! gauge . getGradientBarStops ( ) . isEmpty ( ) ) { Color color = gauge . getGradientLookup ( ) . getColorAt ( factor ) ; fluidBody . setFill ( color ) ; fluidTop . setFill ( color . darker ( ) ) ; } else if ( gauge . getSectionsVisible ( ) && ! sections . isEmpty ( ) ) { int listSize = sections . size ( ) ; for ( int i = 0 ; i < listSize ; i ++ ) { if ( sections . get ( i ) . contains ( VALUE ) ) { Color color = sections . get ( i ) . getColor ( ) ; fluidBody . setFill ( color ) ; fluidTop . setFill ( color . darker ( ) ) ; break ; } } } double centerY = height * 0.71111111 - factor * 0.58888889 * height ; fluidTop . setCenterY ( centerY ) ; fluidUpperRight . setControlY1 ( centerY + 0.58888889 * height ) ; fluidUpperRight . setControlY2 ( centerY ) ; fluidUpperRight . setY ( centerY ) ; fluidUpperCenter . setControlY1 ( centerY + 0.06666667 * height ) ; fluidUpperCenter . setControlY2 ( centerY + 0.12222222 * height ) ; fluidUpperCenter . setY ( centerY + 0.12222222 * height ) ; fluidUpperLeft . setControlY1 ( centerY + 0.12222222 * height ) ; fluidUpperLeft . setControlY2 ( centerY + 0.06666667 * height ) ; fluidUpperLeft . setY ( centerY ) ; valueText . setText ( String . format ( locale , formatString , factor * 100 ) ) ; valueText . relocate ( ( width - valueText . getLayoutBounds ( ) . getWidth ( ) ) * 0.5 , ( height - valueText . getLayoutBounds ( ) . getHeight ( ) ) * 0.5 ) ; }
******************** Private Methods ***********************************