public final class ProgressHandle extends Object
Modifier and Type | Method and Description |
---|---|
void |
finish()
finish the task, remove the task's component from the progress bar UI.
|
void |
progress(int workunit)
Notify the user about completed workunits.
|
void |
progress(String message)
Notify the user about progress by showing message with details.
|
void |
progress(String message,
int workunit)
Notify the user about completed workunits and show additional detailed message.
|
void |
setDisplayName(String newDisplayName)
change the display name of the progress task.
|
void |
setInitialDelay(int millis)
Set a custom initial delay for the progress task to appear in the status bar.
|
void |
start()
start the progress indication for indeterminate task.
|
void |
start(int workunits)
start the progress indication for a task with known number of steps.
|
void |
start(int workunits,
long estimate)
start the progress indication for a task with known number of steps and known
time estimate for completing the task.
|
void |
suspend(String message)
Currently running task can switch to silent suspend mode where the progress bar
stops moving, hides completely or partially.
|
void |
switchToDeterminate(int workunits)
Currently indeterminate task can be switched to show percentage completed.
|
void |
switchToDeterminate(int workunits,
long estimate)
Currently indeterminate task can be switched to show the time estimate til completion.
|
void |
switchToIndeterminate()
Currently determinate task (with percentage or time estimate) can be
switched to indeterminate mode.
|
public void start()
public void start(int workunits)
workunits
- total number of workunits that will be processedpublic void start(int workunits, long estimate)
workunits
- total number of workunits that will be processedestimate
- estimated time to process the task in secondspublic void switchToIndeterminate()
public void suspend(String message)
message
- a message to display in the silent modepublic void switchToDeterminate(int workunits)
workunits
- a definite number of complete units of work out of the totalpublic void switchToDeterminate(int workunits, long estimate)
workunits
- a definite number of complete units of work out of the totalestimate
- estimated time to process the task, in secondspublic void finish()
public void progress(int workunit)
workunit
- a cumulative number of workunits completed so farpublic void progress(String message)
message
- details about the status of the taskpublic void progress(String message, int workunit)
message
- details about the status of the taskworkunit
- a cumulative number of workunits completed so farpublic void setInitialDelay(int millis)
Progress bars that are placed in custom dialogs do always appear right away without a delay.
millis
- number of miliseconds to wait before the progress appears in status bar.public void setDisplayName(String newDisplayName)
newDisplayName
- a new name to set for the taskBuilt on August 26 2014. | Portions Copyright 1997-2014 Sun Microsystems, Inc. All rights reserved.