Interface ProgressIndicator

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      void cancel()
      Try to cancel this operation.
      default ProgressIndicator createSubProgress​(double max)
      Creates a new progress indicator that just delegates to this, except that its [0, 1] progress interval maps to this's [getFraction()-max].
      double getFraction()  
      boolean isCanceled()  
      boolean isCancellable()  
      boolean isIndeterminate()  
      void logError​(java.lang.String s)
      Logs an error.
      void logError​(java.lang.String s, java.lang.Throwable e)
      Logs an error, including a stacktrace.
      void logInfo​(java.lang.String s)
      Logs an info message.
      default void logVerbose​(java.lang.String s)  
      void logWarning​(java.lang.String s)
      Logs a warning.
      void logWarning​(java.lang.String s, java.lang.Throwable e)
      Logs a warning, including a stacktrace.
      void setCancellable​(boolean cancellable)
      Sets whether the user should be able to cancel this operation.
      void setFraction​(double v)
      Sets how much progress should be shown on the progress bar, between 0 and 1.
      void setIndeterminate​(boolean indeterminate)
      Sets whether this progress indicator should show indeterminate progress.
      void setSecondaryText​(java.lang.String s)
      Sets the secondary text on the progress indicator.
      void setText​(java.lang.String s)
      Sets the main text shown in the progress indicator.
    • Method Detail

      • setText

        void setText​(@Nullable
                     java.lang.String s)
        Sets the main text shown in the progress indicator.
      • isCanceled

        boolean isCanceled()
        Returns:
        True if the user has canceled this operation.
      • cancel

        void cancel()
        Try to cancel this operation.
      • setCancellable

        void setCancellable​(boolean cancellable)
        Sets whether the user should be able to cancel this operation.
      • isCancellable

        boolean isCancellable()
        Returns:
        true if the user should be able to cancel this operation.
      • setIndeterminate

        void setIndeterminate​(boolean indeterminate)
        Sets whether this progress indicator should show indeterminate progress.
      • isIndeterminate

        boolean isIndeterminate()
        Returns:
        true if this progress indicator is set to show indeterminate progress.
      • setFraction

        void setFraction​(double v)
        Sets how much progress should be shown on the progress bar, between 0 and 1.
      • getFraction

        double getFraction()
        Returns:
        The current amount of progress shown on the progress bar, between 0 and 1.
      • setSecondaryText

        void setSecondaryText​(@Nullable
                              java.lang.String s)
        Sets the secondary text on the progress indicator.
      • logWarning

        void logWarning​(@NonNull
                        java.lang.String s)
        Logs a warning.
      • logWarning

        void logWarning​(@NonNull
                        java.lang.String s,
                        @Nullable
                        java.lang.Throwable e)
        Logs a warning, including a stacktrace.
      • logError

        void logError​(@NonNull
                      java.lang.String s)
        Logs an error.
      • logError

        void logError​(@NonNull
                      java.lang.String s,
                      @Nullable
                      java.lang.Throwable e)
        Logs an error, including a stacktrace.
      • logInfo

        void logInfo​(@NonNull
                     java.lang.String s)
        Logs an info message.
      • logVerbose

        default void logVerbose​(@NonNull
                                java.lang.String s)
      • createSubProgress

        default ProgressIndicator createSubProgress​(double max)
        Creates a new progress indicator that just delegates to this, except that its [0, 1] progress interval maps to this's [getFraction()-max]. So for example if this is currently at 10% and a sub progress is created with max = 0.5, when the sub progress is at 50% the parent progress will be at 30%, and when the sub progress is at 100% the parent will be at 50%.