net.sf.freecol.client.gui.sound
Class SoundLibrary

java.lang.Object
  extended by net.sf.freecol.client.gui.sound.SoundLibrary
Direct Known Subclasses:
MusicLibrary, SfxLibrary

public class SoundLibrary
extends java.lang.Object

A SoundLibrary stores a number of playlists.


Nested Class Summary
static class SoundLibrary.SoundEffect
           
 
Field Summary
private  java.util.Map<java.lang.String,Playlist> playlists
          This array contains the playlists.
private static java.io.FileFilter soundFileFilter
           
 
Constructor Summary
SoundLibrary(java.io.File dir)
          The constructor.
 
Method Summary
 Playlist get(SoundLibrary.SoundEffect effect)
          Returns a playlist identified by id.
 Playlist get(java.lang.String string)
          Returns a playlist associated with a Nation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

playlists

private java.util.Map<java.lang.String,Playlist> playlists
This array contains the playlists.


soundFileFilter

private static final java.io.FileFilter soundFileFilter
Constructor Detail

SoundLibrary

public SoundLibrary(java.io.File dir)
             throws FreeColException
The constructor. Load the directory spesified by file.

Parameters:
dir - A directory containing the sound-files.
Throws:
FreeColException - If the file spesified is not a directory.
Method Detail

get

public Playlist get(java.lang.String string)
Returns a playlist associated with a Nation.

Parameters:
string - The key to look up a Playlist.
Returns:
The PlayList specified by the ID.

get

public Playlist get(SoundLibrary.SoundEffect effect)
Returns a playlist identified by id.

Parameters:
effect - The sound effect.
Returns:
The Playlist specified by the ID.