reverse ProgressBar

per Jordi Farrero darrera modificació 2020-03-25T15:55:05+02:00

private static boolean reverse=false;

                        float current = bar.getValue();
                                if (reverse)
                                {
                                    bar.setValue(current + 0.10f);
                                    if (current >= 1.0f) {reverse=false;bar.setValue(0.9f);}
                                }
                                else
                                {
                                    bar.setValue(current - 0.10f);
                                    if (current <= 0.0f) {reverse=true;bar.setValue(0.1f);}
                                }