[ProgressIndicator] 0% indicator should be displayed for near-zero negative progress values

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P5
    • tbd
    • Affects Version/s: 8, 9
    • Component/s: javafx

      Please run the following code:

      import javafx.application.Application;
      import javafx.geometry.Insets;
      import javafx.scene.Group;
      import javafx.scene.Scene;
      import javafx.scene.control.ProgressIndicator;
      import javafx.stage.Stage;

      public class ProgressTest extends Application {

          @Override
          public void start(Stage stage) {

              Group root = new Group();
              Scene scene = new Scene(root, 200, 200);
              stage.setScene(scene);
              double progress = 1.5;// -Double.MIN_VALUE;
              ProgressIndicator i = new ProgressIndicator(progress);
              i.setPadding(new Insets(20, 20, 20, 20));
              root.getChildren().add(i);
              stage.show();
          }
          
          public static void main(String[] args) { launch(args); }
      }

      The "Done" indicator will appear (JDK9 b129, Win. 7); the progress value here is 150%.

      Then please try
       progress = -Double.MIN_VALUE
      - no progress indicator displayed at all.
      try
       progress = Double.MIN_VALUE
      - "0%" indicator will appear. This seems to be inconsistent (especially when using some rough estimates for the progress value).

            Assignee:
            Unassigned
            Reporter:
            Alexander Stepanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: