public abstract class Task extends java.lang.Object implements java.lang.Runnable, ProgressObserver
| Modifier | Constructor and Description |
|---|---|
protected |
Task() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
_run()
This is the method you have to implement and that will be executed
in the thread.
|
void |
cancel()
Cancel the task
|
java.lang.String |
getLabel() |
long |
getMaximum() |
javax.swing.SwingWorker.StateValue |
getState() |
java.lang.String |
getStatus() |
long |
getValue() |
boolean |
isCancellable() |
void |
run() |
void |
setCancellable(boolean cancellable) |
void |
setLabel(java.lang.String label) |
void |
setMaximum(long maximum)
Update the maximum value.
|
void |
setStatus(java.lang.String status)
Update the status label.
|
void |
setValue(long value)
Update the progress value.
|
java.lang.String |
toString() |
public final void run()
run in interface java.lang.Runnablepublic abstract void _run()
public final void setValue(long value)
ProgressObserversetValue in interface ProgressObservervalue - the new valuepublic final void setMaximum(long maximum)
ProgressObserversetMaximum in interface ProgressObservermaximum - the new maximum valuepublic void setStatus(java.lang.String status)
ProgressObserversetStatus in interface ProgressObserverstatus - the new status labelpublic long getValue()
public java.lang.String getStatus()
public long getMaximum()
public javax.swing.SwingWorker.StateValue getState()
public java.lang.String getLabel()
public void setLabel(java.lang.String label)
public boolean isCancellable()
public void setCancellable(boolean cancellable)
public void cancel()
public java.lang.String toString()
toString in class java.lang.Object