sk.baka.ambient
Class PlaybackNotificator

java.lang.Object
  extended by sk.baka.ambient.PlaybackNotificator

public final class PlaybackNotificator
extends Object

Controls the notification shown when a track is being played.

Author:
Martin Vysny

Field Summary
static int ERROR_NOTIFICATION_ID
          The ID of the error notification.
static int NOTIFICATION_ID
          The ID of the notification.
 
Constructor Summary
PlaybackNotificator(AmbientApplication app)
          Creates new notification controller.
 
Method Summary
 void cancelNotifications()
          Cancels all notifications.
 void cancelPlaybackNotification()
          Cancels the playback notification.
(package private)  void destroy()
          Destroys the notificator, removing it from the bus.
 void notifyOnNextTrack(TrackMetadataBean bean, ConfigurationBean config)
          Forces the application to show a notification based on given configuration.
(package private)  void updateErrorNotification(int errorCount, ErrorHandler.ErrorInfo last)
          Updates the error notification.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOTIFICATION_ID

public static final int NOTIFICATION_ID
The ID of the notification.

See Also:
Constant Field Values

ERROR_NOTIFICATION_ID

public static final int ERROR_NOTIFICATION_ID
The ID of the error notification.

See Also:
Constant Field Values
Constructor Detail

PlaybackNotificator

PlaybackNotificator(AmbientApplication app)
Creates new notification controller.

Parameters:
app - the application instance.
Method Detail

cancelNotifications

public void cancelNotifications()
Cancels all notifications.


cancelPlaybackNotification

public void cancelPlaybackNotification()
Cancels the playback notification.


notifyOnNextTrack

public void notifyOnNextTrack(TrackMetadataBean bean,
                              ConfigurationBean config)
Forces the application to show a notification based on given configuration.

Parameters:
bean - the bean to format
config - the configuration to use

destroy

void destroy()
Destroys the notificator, removing it from the bus.


updateErrorNotification

void updateErrorNotification(int errorCount,
                             ErrorHandler.ErrorInfo last)
Updates the error notification.

Parameters:
errorCount - the error/warning count. If zero the notification is hidden.
last - last error/warning or null if no errors are present.


Copyright © 2007-2008. All Rights Reserved.