Package org.gephi.utils.progress
Class Progress
- java.lang.Object
-
- org.gephi.utils.progress.Progress
-
public class Progress extends Object
Progress functionalities accessor.- Author:
- Mathieu Bastian
-
-
Constructor Summary
Constructors Constructor Description Progress()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
finish(ProgressTicket progressTicket)
Finish the progress task.static void
finish(ProgressTicket progressTicket, String finishMessage)
Finish the progress task and display a wrap-up messagestatic String
getDisplayName(ProgressTicket progressTicket)
Returns the current task's display name, or an empty string.static void
progress(ProgressTicket progressTicket)
Notify the user about a new completed unit.static void
progress(ProgressTicket progressTicket, int workunit)
Notify the user about completed workunits.static void
progress(ProgressTicket progressTicket, String message)
Notify the user about progress by showing message with details.static void
progress(ProgressTicket progressTicket, String message, int workunit)
Notify the user about completed workunits and show additional detailed message.static void
setDisplayName(ProgressTicket progressTicket, String newDisplayName)
Change the display name of the progress task.static void
start(ProgressTicket progressTicket)
Start the progress indication for indeterminate task.static void
start(ProgressTicket progressTicket, int workunits)
Start the progress indication for a task with known number of steps.static void
switchToDeterminate(ProgressTicket progressTicket, int workunits)
Currently indeterminate task can be switched to show percentage completed.static void
switchToIndeterminate(ProgressTicket progressTicket)
Currently determinate task can be switched to indeterminate mode.
-
-
-
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 taskfinishMessage
- 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 taskworkunit
- 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 taskmessage
- 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 taskmessage
- details about the status of the taskworkunit
- 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 tasknewDisplayName
- 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 taskworkunits
- 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 taskworkunits
- 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
-
-