com.melloware.jukes.gui.view.tasks
Class LongTask

java.lang.Object
  extended by com.melloware.jukes.gui.view.tasks.LongTask
Direct Known Subclasses:
LoadDisclistTask, LoadPlaylistTask, UpdateTagsTask

public abstract class LongTask
extends Object

Abstract class that uses a SwingWorker to perform a time-consuming task.

Copyright (c) 1999-2007 Melloware, Inc.

Version:
4.0 2010 AZ Development
Author:
Emil A. Lefkof III

Field Summary
protected  boolean canceled
           
protected  int current
           
protected  boolean done
           
protected  int lengthOfTask
           
protected  String statMessage
           
protected  boolean warning
           
 
Constructor Summary
LongTask()
          Constructor that needs a config object and a filename to work on.
 
Method Summary
 int getCurrent()
          Called to find out how much has been done.
 int getLengthOfTask()
          Called to find out how much work needs to be done.
 String getMessage()
          Returns the most recent status message, or null if there is no current status message.
abstract  void go()
          Called to start the task.
 boolean hasWarning()
          AZ Called to find out if the task has completed with errors or warnings.
 boolean isCancelled()
          Called to find out if the task has been canceled.
 boolean isDone()
          Called to find out if the task has completed.
 void stop()
          Stops the current long task.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

canceled

protected boolean canceled

done

protected boolean done

warning

protected boolean warning

current

protected int current

lengthOfTask

protected int lengthOfTask

statMessage

protected String statMessage
Constructor Detail

LongTask

public LongTask()
Constructor that needs a config object and a filename to work on.

Method Detail

go

public abstract void go()
Called to start the task.


getCurrent

public int getCurrent()
Called to find out how much has been done.


getLengthOfTask

public int getLengthOfTask()
Called to find out how much work needs to be done.


getMessage

public String getMessage()
Returns the most recent status message, or null if there is no current status message.


isCancelled

public boolean isCancelled()
Called to find out if the task has been canceled.


isDone

public boolean isDone()
Called to find out if the task has completed.


stop

public void stop()
Stops the current long task.


hasWarning

public boolean hasWarning()
AZ Called to find out if the task has completed with errors or warnings.



Copyright © 1999-2010 Melloware Inc. All Rights Reserved.