core.background
Class BackgroundMonitorStatusEvent

java.lang.Object
  extended by java.util.EventObject
      extended by core.background.BackgroundMonitorStatusEvent
All Implemented Interfaces:
java.io.Serializable

public class BackgroundMonitorStatusEvent
extends java.util.EventObject

This class provides the events that are triggered by a Background Monitor object.

See Also:
Serialized Form

Field Summary
static int CHECKING_NEW_TRACKS
          The event type when the Background Monitor object is checking for changed folders using a new AddTracksTask.
static int NON_PROGRESS_EVENT
          The value for a background monitor listener when the background monitor status has changed but it is not a progressed event, i.e.
static int RUNNING
          The event type when the Background Monitor object is running.
static int STARTED
          The event type when the Background Monitor object has started.
static int STOPPED
          The event type when the Background Monitor object has stopped.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
BackgroundMonitorStatusEvent(java.lang.Object source, int statusEvent, int progress, java.util.Date nextRun)
          Creates a new BackgroundMonitorStatusEvent object that is passed to the background monitor status listeners.
 
Method Summary
 int getEventType()
          Returns the event type.
 java.util.Date getNextRun()
          Returns the given date the next Add Tracks Task will be run.
 int getProgress()
          Returns the reported progress as sent by the BackgroundMonitor object event.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RUNNING

public static final int RUNNING
The event type when the Background Monitor object is running.

See Also:
Constant Field Values

STARTED

public static final int STARTED
The event type when the Background Monitor object has started.

See Also:
Constant Field Values

STOPPED

public static final int STOPPED
The event type when the Background Monitor object has stopped.

See Also:
Constant Field Values

CHECKING_NEW_TRACKS

public static final int CHECKING_NEW_TRACKS
The event type when the Background Monitor object is checking for changed folders using a new AddTracksTask.

See Also:
Constant Field Values

NON_PROGRESS_EVENT

public static final int NON_PROGRESS_EVENT
The value for a background monitor listener when the background monitor status has changed but it is not a progressed event, i.e. The background monitor is now enabled or disabled.

See Also:
Constant Field Values
Constructor Detail

BackgroundMonitorStatusEvent

public BackgroundMonitorStatusEvent(java.lang.Object source,
                                    int statusEvent,
                                    int progress,
                                    java.util.Date nextRun)
Creates a new BackgroundMonitorStatusEvent object that is passed to the background monitor status listeners.

Parameters:
source - The source object triggering the event.
statusEvent - The status event type.
progress - The progress of the event that has occured. If the progress is not used a NON_PROGRESS_EVENT integer can be used.
nextRun - The date for when the next Add Tracks Task swingworker thread will execute. This is a rough estimate as the Background Monitor thread simply sleeps until the given Date.
Method Detail

getEventType

public int getEventType()
Returns the event type.

Returns:
The event type.

getProgress

public int getProgress()
Returns the reported progress as sent by the BackgroundMonitor object event.

Returns:
The reported progress of the background monitor object.

getNextRun

public java.util.Date getNextRun()
Returns the given date the next Add Tracks Task will be run.

Returns:
The date of the next add tracks task execution.