public abstract class ProgressMonitorTask extends Object implements Runnable, CancelTask
ProgressMonitor| Modifier and Type | Field and Description |
|---|---|
protected boolean |
cancel |
protected boolean |
done |
protected String |
error |
protected 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.
|
String |
getErrorMessage()
Applications call this to get an error message.
|
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 |
setError(String error)
for compatibility with ucar.nc2.CancelTask
|
void |
setProgress(String msg,
int progress) |
protected boolean done
protected boolean success
protected boolean cancel
protected String error
protected String note
protected int progress
public abstract void run()
public boolean isSuccess()
public boolean isCancel()
isCancel in interface CancelTaskpublic boolean isError()
public String getErrorMessage()
public boolean isDone()
public void cancel()
public String getNote()
public int getProgress()
public void setError(String error)
setError in interface CancelTaskpublic void setProgress(String msg, int progress)
setProgress in interface CancelTaskCopyright © 1999–2013 UCAR/Unidata. All rights reserved.