bb.gui
Class Sounds

java.lang.Object
  extended by bb.gui.Sounds

public class Sounds
extends Object

Provides static utility methods which play various sounds.

This class is multithread safe: it is stateless.

Author:
Brent Boyer

Nested Class Summary
static class Sounds.UnitTest
          See the Overview page of the project's javadocs for a general description of this unit test class.
 
Field Summary
private static URL urlErrorMajor
           
private static URL urlErrorMinor
           
private static URL urlNotify
           
 
Constructor Summary
private Sounds()
          This sole private constructor suppresses the default (public) constructor, ensuring non-instantiability outside of this class.
 
Method Summary
static void playErrorMajor()
          Simply calls playErrorMajor(true).
static void playErrorMajor(boolean synchronous)
          Plays a major error sound.
static void playErrorMinor()
          Simply calls playErrorMinor(true).
static void playErrorMinor(boolean synchronous)
          Plays a minor error sound.
static void playNotify()
          Simply calls playNotify(true).
static void playNotify(boolean synchronous)
          Plays a notify sound.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

urlErrorMajor

private static final URL urlErrorMajor

urlErrorMinor

private static final URL urlErrorMinor

urlNotify

private static final URL urlNotify
Constructor Detail

Sounds

private Sounds()
This sole private constructor suppresses the default (public) constructor, ensuring non-instantiability outside of this class.

Method Detail

playErrorMajor

public static void playErrorMajor()
Simply calls playErrorMajor(true).


playErrorMajor

public static void playErrorMajor(boolean synchronous)
Plays a major error sound.

Parameters:
synchronous - if true, then this method executes synchronously (i.e. does not return until the sound is finished playing) if false, then this method executes asynchronously (i.e. soon returns, while another thread plays the sound)

playErrorMinor

public static void playErrorMinor()
Simply calls playErrorMinor(true).


playErrorMinor

public static void playErrorMinor(boolean synchronous)
Plays a minor error sound.

Parameters:
synchronous - if true, then this method executes synchronously (i.e. does not return until the sound is finished playing) if false, then this method executes asynchronously (i.e. soon returns, while another thread plays the sound)

playNotify

public static void playNotify()
Simply calls playNotify(true).


playNotify

public static void playNotify(boolean synchronous)
Plays a notify sound.

Parameters:
synchronous - if true, then this method executes synchronously (i.e. does not return until the sound is finished playing) if false, then this method executes asynchronously (i.e. soon returns, while another thread plays the sound)