org.bff.javampd.events
Class PlaylistBasicChangeEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.bff.javampd.events.PlaylistBasicChangeEvent
All Implemented Interfaces:
java.io.Serializable

public class PlaylistBasicChangeEvent
extends java.util.EventObject

Represents a change in the status of a MPD music playlist.

See Also:
Serialized Form

Field Summary
static int PLAYLIST_CHANGED
          the playlist version was changed
static int PLAYLIST_ENDED
          the end of the playlist is reached and the player has stopped
static int SONG_ADDED
          a song was added
static int SONG_CHANGED
          a song was changed
static int SONG_DELETED
          a song was deleted
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
PlaylistBasicChangeEvent(java.lang.Object source, int id)
          Creates a new instance of PlayListBasicChangeEvent
PlaylistBasicChangeEvent(java.lang.Object source, int id, java.lang.String msg)
          Creates a new instance of PlayListBasicChangeEvent
 
Method Summary
 int getId()
          Returns specific id of the event that occurred.
 java.lang.String getMsg()
          Returns the message attached to this event.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SONG_ADDED

public static final int SONG_ADDED
a song was added

See Also:
Constant Field Values

SONG_DELETED

public static final int SONG_DELETED
a song was deleted

See Also:
Constant Field Values

SONG_CHANGED

public static final int SONG_CHANGED
a song was changed

See Also:
Constant Field Values

PLAYLIST_CHANGED

public static final int PLAYLIST_CHANGED
the playlist version was changed

See Also:
Constant Field Values

PLAYLIST_ENDED

public static final int PLAYLIST_ENDED
the end of the playlist is reached and the player has stopped

See Also:
Constant Field Values
Constructor Detail

PlaylistBasicChangeEvent

public PlaylistBasicChangeEvent(java.lang.Object source,
                                int id)
Creates a new instance of PlayListBasicChangeEvent

Parameters:
source - the object on which the Event initially occurred
id - the specific event that occurred

PlaylistBasicChangeEvent

public PlaylistBasicChangeEvent(java.lang.Object source,
                                int id,
                                java.lang.String msg)
Creates a new instance of PlayListBasicChangeEvent

Parameters:
source - the object on which the Event initially occurred
id - the specific event that occurred
msg - an optional message
Method Detail

getId

public int getId()
Returns specific id of the event that occurred. The ids are public static fields in the class.

Returns:
the specific id

getMsg

public java.lang.String getMsg()
Returns the message attached to this event. If there is no message null is returned.

Returns:
the optional message