Module jEdit

Class Task

java.lang.Object
org.gjt.sp.util.Task
All Implemented Interfaces:
Runnable, ProgressObserver
Direct Known Subclasses:
CopyFileWorker, IoTask, LocalFileSaveTask, MarkersSaveRequest

public abstract class Task extends Object implements Runnable, ProgressObserver
A Task is a Runnable with progress.
Since:
jEdit 4.4pre1
Author:
Matthieu Casanova
  • Constructor Details

    • Task

      protected Task()
  • Method Details

    • run

      public final void run()
      Specified by:
      run in interface 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(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 String getStatus()
    • getMaximum

      public long getMaximum()
    • getState

      public SwingWorker.StateValue getState()
    • getLabel

      public String getLabel()
    • setLabel

      public void setLabel(String label)
    • isCancellable

      public boolean isCancellable()
    • setCancellable

      public void setCancellable(boolean cancellable)
    • cancel

      public void cancel()
      Cancel the task
    • toString

      public String toString()
      Overrides:
      toString in class Object