|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.SwingWorker<java.lang.Integer,java.lang.Void>
task.AddTracksTask
public class AddTracksTask
The AddTracksTask provides functionality for adding new tracks to iTunes. This is a accomplished by using the ITunesWin class for communication to and from iTunes, the Options class for reading user options, and the Exclusions class for files that may have been previously added to iTunes. The class itself extends the SwingWorker class to provide funcationality for gui based user interactions in the background.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.SwingWorker |
---|
javax.swing.SwingWorker.StateValue |
Field Summary | |
---|---|
static int |
AWAITING_ITUNES
The progress integer for when the task is awaiting iTunes to finish processing files. |
static int |
READING_XML
The progress integer for when the task is reading the XML file. |
Constructor Summary | |
---|---|
AddTracksTask(boolean monitorProgress)
Creates a new AddTracksTask that simply reads the Options object from the SysTrayMain object. |
|
AddTracksTask(Options options,
SongTable songTable,
boolean monitorProgress)
Creates a new AddTracksTask with the given set of options. |
|
AddTracksTask(SongTable table,
boolean monitorProgress)
Creates a new AddTracksTask object responsible for adding tracks not currently in the iTunes library or previously added to iTunes. |
Method Summary | |
---|---|
java.lang.Integer |
doInBackground()
This method first reads the options from the options file, if all of the necessary options have been set as determined by the isReady() method in the Options class, the method proceeds. |
void |
done()
Called when the SwingWorker method doInBackground is completed. |
java.util.ArrayList<java.io.File> |
findNewFiles(java.util.ArrayList<java.io.File> allPotentialNewFiles,
java.util.ArrayList<java.io.File> iTunesFiles,
OutputStringArrayList exclusions)
Identifies new files to be added to iTunes by examining all new potential files against the files in iTunes, and the exclusions list. |
void |
getITunesLibraryFilePaths()
Communicates with iTunes through the ITunesWin class to find the locations of all the files in the iTunes library. |
static void |
main(java.lang.String[] args)
|
Methods inherited from class javax.swing.SwingWorker |
---|
addPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, process, publish, removePropertyChangeListener, run, setProgress |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int READING_XML
public static final int AWAITING_ITUNES
Constructor Detail |
---|
public AddTracksTask(SongTable table, boolean monitorProgress)
table
- The table that displays to the user the new tracks that
have been added to iTunes.monitorProgress
- The boolean value for whether or not a progress
dialog should be shown to the user, while the AddTracksTask is running.public AddTracksTask(Options options, SongTable songTable, boolean monitorProgress)
monitorProgress
- The boolean value for whether or not a progress
dialog should be shown to the user, while the AddTracksTask is running.songTable
- The song table object to display new tracks that have
been added.options
- The given set of options.public AddTracksTask(boolean monitorProgress)
monitorProgress
- The boolean value for whether or not a progress
dialog should be shown to the user, while the AddTracksTask is running.Method Detail |
---|
public java.lang.Integer doInBackground()
doInBackground
in class javax.swing.SwingWorker<java.lang.Integer,java.lang.Void>
public void done()
done
in class javax.swing.SwingWorker<java.lang.Integer,java.lang.Void>
public void getITunesLibraryFilePaths()
public java.util.ArrayList<java.io.File> findNewFiles(java.util.ArrayList<java.io.File> allPotentialNewFiles, java.util.ArrayList<java.io.File> iTunesFiles, OutputStringArrayList exclusions)
allPotentialNewFiles
- All files to check against iTunes and the
exclusions list for new files.iTunesFiles
- All of the files in the iTunes library.exclusions
- The exclusions, or previously added files to the iTunes
library by iTunesDSM.
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |