java.lang.Object
org.gjt.sp.util.Task
- All Implemented Interfaces:
Runnable,ProgressObserver
- Direct Known Subclasses:
CopyFileWorker,IoTask,LocalFileSaveTask,MarkersSaveRequest
A Task is a Runnable with progress.
- Since:
- jEdit 4.4pre1
- Author:
- Matthieu Casanova
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract void_run()This is the method you have to implement and that will be executed in the thread.voidcancel()Cancel the taskgetLabel()longgetState()longgetValue()booleanfinal voidrun()voidsetCancellable(boolean cancellable) voidfinal voidsetMaximum(long maximum) Update the maximum value.voidUpdate the status label.final voidsetValue(long value) Update the progress value.toString()
-
Constructor Details
-
Task
protected Task()
-
-
Method Details
-
run
public final void run() -
_run
public abstract void _run()This is the method you have to implement and that will be executed in the thread. -
setValue
public final void setValue(long value) Description copied from interface:ProgressObserverUpdate the progress value.- Specified by:
setValuein interfaceProgressObserver- Parameters:
value- the new value
-
setMaximum
public final void setMaximum(long maximum) Description copied from interface:ProgressObserverUpdate the maximum value.- Specified by:
setMaximumin interfaceProgressObserver- Parameters:
maximum- the new maximum value
-
setStatus
Description copied from interface:ProgressObserverUpdate the status label.- Specified by:
setStatusin interfaceProgressObserver- Parameters:
status- the new status label
-
getValue
public long getValue() -
getStatus
-
getMaximum
public long getMaximum() -
getState
-
getLabel
-
setLabel
-
isCancellable
public boolean isCancellable() -
setCancellable
public void setCancellable(boolean cancellable) -
cancel
public void cancel()Cancel the task -
toString
-