public abstract class ProgressMonitorTask
extends java.lang.Object
implements java.lang.Runnable
ProgressMonitor
Modifier and Type | Field and Description |
---|---|
protected boolean |
cancel |
protected boolean |
done |
protected java.lang.String |
error |
protected java.lang.String |
note |
protected int |
progress |
protected boolean |
success |
Constructor and Description |
---|
ProgressMonitorTask() |
Modifier and Type | Method and Description |
---|---|
void |
cancel()
ProgressMonitor will call this when the user cancels.
|
java.lang.String |
getErrorMessage()
Applications call this to get an error message.
|
java.lang.String |
getNote()
ProgressMonitor displays this note in the ProgressMonitor.
|
int |
getProgress()
ProgressMonitor displays this progress value in the ProgressMonitor.
|
boolean |
isCancel()
Application calls to see if task is cancelled.
|
boolean |
isDone()
ProgressMonitor calls to see if task is done.
|
boolean |
isError()
Applications call this to find out if there was an error.
|
boolean |
isSuccess()
Application calls to see if task is success.
|
abstract void |
run()
Here is where the work gets done.
|
void |
setDone(boolean done) |
void |
setError(java.lang.String error)
for compatibility with ucar.nc2.CancelTask
|
void |
setProgress(java.lang.String msg,
int progress) |
protected boolean done
protected boolean success
protected boolean cancel
protected java.lang.String error
protected java.lang.String note
protected int progress
public abstract void run()
run
in interface java.lang.Runnable
public boolean isSuccess()
public boolean isCancel()
public boolean isError()
public java.lang.String getErrorMessage()
public boolean isDone()
public void cancel()
public java.lang.String getNote()
public int getProgress()
public void setError(java.lang.String error)
public void setProgress(java.lang.String msg, int progress)
public void setDone(boolean done)