JavaTron
Interface AudioTronListener

All Known Implementing Classes:
AudioTronUI

public interface AudioTronListener

AudioTronListener interface describes a notification mechanism for state changes.


Field Summary
static int STATE_PAUSED
           
static int STATE_PLAYING
           
static int STATE_STOPPED
           
static int STATE_UNKNOWN
           
 
Method Summary
 void currentSong(JavaTron.AudioTronSong song)
          Notification of the details of the current song playing
 void mute(boolean muted)
          Notification of mute state
 void newSongQueue(java.util.Enumeration songQueue)
          Notification that a new song queue is available
 void nextSong(JavaTron.AudioTronSong song)
          Notification of the details of the next song to be played
 void random(boolean random)
          Notification of random state
 void repeat(boolean repeat)
          Notification of repeat state
 void songAdded(JavaTron.AudioTronSong song)
          Notification that a song has been added to the end of the playlist
 void songUpdated(JavaTron.AudioTronSong song)
          Notification that information about a particular song has been updated
 void state(int state)
          Notification of playing state.
 void status(java.lang.String status, boolean longRunning)
          Notification of the AudioTron "controller enginer" status.
 void version(java.lang.String version)
          Notification of AudioTron version
 

Field Detail

STATE_UNKNOWN

public static final int STATE_UNKNOWN
See Also:
Constant Field Values

STATE_PLAYING

public static final int STATE_PLAYING
See Also:
Constant Field Values

STATE_PAUSED

public static final int STATE_PAUSED
See Also:
Constant Field Values

STATE_STOPPED

public static final int STATE_STOPPED
See Also:
Constant Field Values
Method Detail

mute

public void mute(boolean muted)
Notification of mute state

Parameters:
muted - true if muted, false otherwise

repeat

public void repeat(boolean repeat)
Notification of repeat state

Parameters:
repeat - true if repeat is set, false otherwise

random

public void random(boolean random)
Notification of random state

Parameters:
random - true if random is set, false otherwise

state

public void state(int state)
Notification of playing state.

Parameters:
state - can be one of STATE_UNKNOWN, STATE_PLAYING, STATE_PAUSED, STATE_STOPPED

version

public void version(java.lang.String version)
Notification of AudioTron version

Parameters:
version - The AudioTron version as reported by the AudioTron webpage

newSongQueue

public void newSongQueue(java.util.Enumeration songQueue)
Notification that a new song queue is available


songAdded

public void songAdded(JavaTron.AudioTronSong song)
Notification that a song has been added to the end of the playlist

Parameters:
song - the song that was added

currentSong

public void currentSong(JavaTron.AudioTronSong song)
Notification of the details of the current song playing

Parameters:
song - the current song playing

nextSong

public void nextSong(JavaTron.AudioTronSong song)
Notification of the details of the next song to be played

Parameters:
song - the next song to play

songUpdated

public void songUpdated(JavaTron.AudioTronSong song)
Notification that information about a particular song has been updated

Parameters:
song - the song that is being updated (it is gauranteed to have the title and index information filled in

status

public void status(java.lang.String status,
                   boolean longRunning)
Notification of the AudioTron "controller enginer" status. This value is suitable for display to the user.

Parameters:
status - a string that indicates what the "engine" is doing
longRunning - this value is set if the current operation is long running. In the case that it is long running, status will be called repeatedly (likely with the same value) during the long running operation.