Class Progress


  • public class Progress
    extends Object
    Progress functionalities accessor.
    Author:
    Mathieu Bastian
    • Constructor Detail

      • Progress

        public Progress()
    • Method Detail

      • finish

        public static void finish​(ProgressTicket progressTicket)
        Finish the progress task.
        Parameters:
        progressTicket - the progress ticket of the task
      • finish

        public static void finish​(ProgressTicket progressTicket,
                                  String finishMessage)
        Finish the progress task and display a wrap-up message
        Parameters:
        progressTicket - the progress ticket of the task
        finishMessage - a message about the finished task
      • progress

        public static void progress​(ProgressTicket progressTicket)
        Notify the user about a new completed unit. Equivalent to incrementing workunits by one.
        Parameters:
        progressTicket - the progress ticket of the task
      • progress

        public static void progress​(ProgressTicket progressTicket,
                                    int workunit)
        Notify the user about completed workunits.
        Parameters:
        progressTicket - the progress ticket of the task
        workunit - a cumulative number of workunits completed so far
      • progress

        public static void progress​(ProgressTicket progressTicket,
                                    String message)
        Notify the user about progress by showing message with details.
        Parameters:
        progressTicket - the progress ticket of the task
        message - details about the status of the task
      • progress

        public static void progress​(ProgressTicket progressTicket,
                                    String message,
                                    int workunit)
        Notify the user about completed workunits and show additional detailed message.
        Parameters:
        progressTicket - the progress ticket of the task
        message - details about the status of the task
        workunit - a cumulative number of workunits completed so far
      • setDisplayName

        public static void setDisplayName​(ProgressTicket progressTicket,
                                          String newDisplayName)
        Change the display name of the progress task. Use with care, please make sure the changed name is not completely different, or otherwise it might appear to the user as a different task.
        Parameters:
        progressTicket - the progress ticket of the task
        newDisplayName - the new display name
      • getDisplayName

        public static String getDisplayName​(ProgressTicket progressTicket)
        Returns the current task's display name, or an empty string.
      • start

        public static void start​(ProgressTicket progressTicket)
        Start the progress indication for indeterminate task.
        Parameters:
        progressTicket - the progress ticket of the task
      • start

        public static void start​(ProgressTicket progressTicket,
                                 int workunits)
        Start the progress indication for a task with known number of steps.
        Parameters:
        progressTicket - the progress ticket of the task
        workunits - total number of workunits that will be processed
      • switchToDeterminate

        public static void switchToDeterminate​(ProgressTicket progressTicket,
                                               int workunits)
        Currently indeterminate task can be switched to show percentage completed.
        Parameters:
        progressTicket - the progress ticket of the task
        workunits - workunits total number of workunits that will be processed
      • switchToIndeterminate

        public static void switchToIndeterminate​(ProgressTicket progressTicket)
        Currently determinate task can be switched to indeterminate mode.
        Parameters:
        progressTicket - the progress ticket of the task