public class ProgressSuspender
extends java.lang.Object
implements java.lang.AutoCloseable
Modifier and Type | Class and Description |
---|---|
static interface |
ProgressSuspender.SuspenderListener |
Modifier and Type | Field and Description |
---|---|
static Topic<ProgressSuspender.SuspenderListener> |
TOPIC |
Modifier and Type | Method and Description |
---|---|
void |
attachToProgress(ProgressIndicatorEx progress)
Associates an additional progress indicator with this suspender, so that its
#checkCanceled can later block the calling thread. |
void |
close() |
java.lang.String |
getSuspendedText() |
static ProgressSuspender |
getSuspender(ProgressIndicator indicator) |
boolean |
isSuspended() |
static ProgressSuspender |
markSuspendable(ProgressIndicator indicator,
java.lang.String suspendedText) |
void |
resumeProcess() |
void |
suspendProcess(java.lang.String reason) |
public static final Topic<ProgressSuspender.SuspenderListener> TOPIC
public void close()
close
in interface java.lang.AutoCloseable
public static ProgressSuspender markSuspendable(ProgressIndicator indicator, java.lang.String suspendedText)
public static ProgressSuspender getSuspender(ProgressIndicator indicator)
public void attachToProgress(ProgressIndicatorEx progress)
#checkCanceled
can later block the calling thread.public java.lang.String getSuspendedText()
public boolean isSuspended()
public void suspendProcess(java.lang.String reason)
reason
- if provided, is displayed in the UI instead of suspended text passed into constructor until the progress is resumedpublic void resumeProcess()