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
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
_run()
This is the method you have to implement and that will be executed in the thread.void
cancel()
Cancel the taskgetLabel()
long
getState()
long
getValue()
boolean
final void
run()
void
setCancellable
(boolean cancellable) void
final void
setMaximum
(long maximum) Update the maximum value.void
Update the status label.final void
setValue
(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:ProgressObserver
Update the progress value.- Specified by:
setValue
in interfaceProgressObserver
- Parameters:
value
- the new value
-
setMaximum
public final void setMaximum(long maximum) Description copied from interface:ProgressObserver
Update the maximum value.- Specified by:
setMaximum
in interfaceProgressObserver
- Parameters:
maximum
- the new maximum value
-
setStatus
Description copied from interface:ProgressObserver
Update the status label.- Specified by:
setStatus
in 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
-