as.clynx.audio.rep
Class AudioFileList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<AudioFile>
              extended by as.clynx.audio.rep.AudioFileList
All Implemented Interfaces:
IAudioFileCollection, java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<AudioFile>, java.util.Collection<AudioFile>, java.util.List<AudioFile>, java.util.RandomAccess

public class AudioFileList
extends java.util.ArrayList<AudioFile>
implements IAudioFileCollection

The class AudioFileList.java contains all loaded audiofiles.

Version:
cLynx v.1.2, JDK 6.0: 12.10.2007
Author:
Andreas Senfter - andreas@senfters.com
See Also:
Serialized Form

Constructor Summary
AudioFileList(AbstractDecoder enc, ListContentProvider provider)
          Constructor
 
Method Summary
 boolean add(AudioFile obj)
          adds a audiofile to the list and stores the normalizing values
 javax.sound.sampled.AudioInputStream decode(AudioFile af)
          returns the decoded audioinputstream for the passed audiofile
 AudioFile get(int i)
           
 javax.sound.sampled.AudioFormat getDecodedFormat()
          returns the decoded format
 int getGlobalBotBound()
          returns the global lower boundary for the normalizer
 int getGlobalTopBound()
          returns the global upper boundary for the normalizer
 int getNextIndex()
          returns the index of the file which should played next.
 SettingControl getSettings()
          returns the settingControl
 int getSupportedBotRange()
          returns the supported lower boundary
 int getSupportedTopRange()
          returns the supported upper boundary
 boolean nextExists()
          returns true when a file was defined which should be played next.
 void setNext(AudioFile key)
          sets the audiofile wich should be played next.
 void setNormalizer()
          sets the normalizer to all containing files
 void stateChangedOf(AudioFile track)
          awakes when the finished or active flag of a track changes.
 
Methods inherited from class java.util.ArrayList
add, addAll, addAll, clear, clone, contains, ensureCapacity, indexOf, isEmpty, lastIndexOf, remove, remove, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 

Constructor Detail

AudioFileList

public AudioFileList(AbstractDecoder enc,
                     ListContentProvider provider)
Constructor

Parameters:
enc -
provider -
Method Detail

setNormalizer

public void setNormalizer()
sets the normalizer to all containing files

Specified by:
setNormalizer in interface IAudioFileCollection

add

public boolean add(AudioFile obj)
adds a audiofile to the list and stores the normalizing values

Specified by:
add in interface java.util.Collection<AudioFile>
Specified by:
add in interface java.util.List<AudioFile>
Overrides:
add in class java.util.ArrayList<AudioFile>

get

public AudioFile get(int i)
Specified by:
get in interface java.util.List<AudioFile>
Overrides:
get in class java.util.ArrayList<AudioFile>

getGlobalBotBound

public int getGlobalBotBound()
Description copied from interface: IAudioFileCollection
returns the global lower boundary for the normalizer

Specified by:
getGlobalBotBound in interface IAudioFileCollection
Returns:
the lower boundary for the normalizer

getGlobalTopBound

public int getGlobalTopBound()
Description copied from interface: IAudioFileCollection
returns the global upper boundary for the normalizer

Specified by:
getGlobalTopBound in interface IAudioFileCollection
Returns:
the upper boundary for the normalizer

getSupportedTopRange

public int getSupportedTopRange()
Description copied from interface: IAudioFileCollection
returns the supported upper boundary

Specified by:
getSupportedTopRange in interface IAudioFileCollection
Returns:
the supported upper boundary

getSupportedBotRange

public int getSupportedBotRange()
Description copied from interface: IAudioFileCollection
returns the supported lower boundary

Specified by:
getSupportedBotRange in interface IAudioFileCollection
Returns:
the supported lower boundary

decode

public javax.sound.sampled.AudioInputStream decode(AudioFile af)
                                            throws javax.sound.sampled.UnsupportedAudioFileException,
                                                   java.io.IOException
Description copied from interface: IAudioFileCollection
returns the decoded audioinputstream for the passed audiofile

Specified by:
decode in interface IAudioFileCollection
Returns:
the decoded audioinputstream for the passed audiofile
Throws:
javax.sound.sampled.UnsupportedAudioFileException
java.io.IOException

getDecodedFormat

public javax.sound.sampled.AudioFormat getDecodedFormat()
Description copied from interface: IAudioFileCollection
returns the decoded format

Specified by:
getDecodedFormat in interface IAudioFileCollection
Returns:
the decoded format

getSettings

public SettingControl getSettings()
Description copied from interface: IAudioFileCollection
returns the settingControl

Specified by:
getSettings in interface IAudioFileCollection
Returns:
the settingControl

stateChangedOf

public void stateChangedOf(AudioFile track)
Description copied from interface: IAudioFileCollection
awakes when the finished or active flag of a track changes.

Specified by:
stateChangedOf in interface IAudioFileCollection

setNext

public void setNext(AudioFile key)
Description copied from interface: IAudioFileCollection
sets the audiofile wich should be played next.

Specified by:
setNext in interface IAudioFileCollection

nextExists

public boolean nextExists()
Description copied from interface: IAudioFileCollection
returns true when a file was defined which should be played next.

Specified by:
nextExists in interface IAudioFileCollection
Returns:
true when a file was defined which should be played next.

getNextIndex

public int getNextIndex()
Description copied from interface: IAudioFileCollection
returns the index of the file which should played next.

Specified by:
getNextIndex in interface IAudioFileCollection
Returns:
the index of the file which should played next.