public class ProgressFeedback extends Object implements IProgressCallback, ActionListener
ProgressWindow while a task
executes in a worker thread.| Modifier and Type | Class and Description |
|---|---|
static class |
ProgressFeedback.ProgressFeedbackThread |
| Modifier | Constructor and Description |
|---|---|
protected |
ProgressFeedback(String strNotice,
boolean bHideAbortButton,
boolean bShowInStudioGlassPane)
Construct a ProgressFeedback with a given text notice.
|
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(ActionEvent e) |
int |
getProgress() |
boolean |
incrementProgress(String strMessage,
String... args) |
boolean |
isAbort()
Should the operation abort?
|
void |
operationComplete()
Signals that the operation is complete
|
static <T> T |
runWithPossibleDialog(Callable<T> callable,
String message) |
protected static ProgressFeedback |
runWithProgress(IRunnableWithProgress task,
ProgressFeedback progressFeedback) |
static ProgressFeedback |
runWithProgress(String strNotice,
IRunnableWithProgress task)
A helper method that executes a task in a worker thread and displays feedback
in a progress windows.
|
static ProgressFeedback |
runWithProgress(String strNotice,
IRunnableWithProgress task,
boolean bHideAbortBtn) |
static ProgressFeedback |
runWithProgress(String strNotice,
IRunnableWithProgress task,
boolean bHideAbortBtn,
boolean bShowInStudioGlassPane) |
void |
setLength(int iLength)
How long is this operation in units? For a StagedProgressFeedback, this moves to the next stage
|
boolean |
updateProgress(int iProgress,
String strMessage,
String... args)
Call this when a unit of progress completes.
|
boolean |
updateProgress(String strMessage,
String... args)
Call this to update the progress message without modifying the amount of progress completed.
|
protected ProgressFeedback(String strNotice, boolean bHideAbortButton, boolean bShowInStudioGlassPane)
strNotice - The text notice to display in the ProgressWindow.bHideAbortButton - will hide abort buttonbShowInStudioGlassPane - will show in studio panepublic static ProgressFeedback runWithProgress(String strNotice, IRunnableWithProgress task)
strNotice - The text notice to display in the ProgressWindow.task - The task to execute in a separate (worker) thread.public static ProgressFeedback runWithProgress(String strNotice, IRunnableWithProgress task, boolean bHideAbortBtn)
public static ProgressFeedback runWithProgress(String strNotice, IRunnableWithProgress task, boolean bHideAbortBtn, boolean bShowInStudioGlassPane)
protected static ProgressFeedback runWithProgress(IRunnableWithProgress task, ProgressFeedback progressFeedback)
public static <T> T runWithPossibleDialog(Callable<T> callable, String message)
public void setLength(int iLength)
IProgressCallbacksetLength in interface IProgressCallbackiLength - The number of units the operation is expected to execute.public boolean updateProgress(int iProgress,
String strMessage,
String... args)
IProgressCallbackupdateProgress in interface IProgressCallbackiProgress - The unit of progress completed.strMessage - A short message describing the progress.public boolean incrementProgress(String strMessage, String... args)
incrementProgress in interface IProgressCallbackpublic boolean updateProgress(String strMessage, String... args)
IProgressCallbackupdateProgress in interface IProgressCallbackpublic int getProgress()
getProgress in interface IProgressCallbackpublic boolean isAbort()
IProgressCallbackisAbort in interface IProgressCallbackpublic void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenerpublic void operationComplete()
IProgressCallbackoperationComplete in interface IProgressCallbackCopyright © 2022. All rights reserved.