## org.gjt.sp.util
Class Task

    java.lang.Object
      org.gjt.sp.util.Task

All Implemented Interfaces:
  java.lang.Runnable, ProgressObserver

Direct Known Subclasses:
  CopyFileWorker, LocalFileSaveTask, MarkersSaveRequest

    public abstract class Task

extends java.lang.Object
implements java.lang.Runnable, ProgressObserver

A Task is basically a Runnable but with some information about it's progression.

Since:
  jEdit 4.4pre1

Constructor Summary
`protected` `Task()`

Method Summary
`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()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Task

    protected Task()

Method Detail

### run

    public final void run()

  Specified by:
    `run` in interface `java.lang.Runnable`

### _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 interface `ProgressObserver`
  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 interface `ProgressObserver`
  Parameters:
    `maximum` - the new maximum value

### setStatus

    public void setStatus(java.lang.String status)

  Description copied from interface: `ProgressObserver`
  Update the status label.

  Specified by:
    `setStatus` in interface `ProgressObserver`
  Parameters:
    `status` - the new status label

### getValue

    public long getValue()

### getStatus

    public java.lang.String getStatus()

### getMaximum

    public long getMaximum()

### getState

    public javax.swing.SwingWorker.StateValue getState()

### getLabel

    public java.lang.String getLabel()

### setLabel

    public void setLabel(java.lang.String label)

### isCancellable

    public boolean isCancellable()

### setCancellable

    public void setCancellable(boolean cancellable)

### cancel

    public void cancel()

  Cancel the task

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`