Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.systray
Interface PopupMessageHandler

All Known Implementing Classes:
AbstractPopupMessageHandler, GalagoPopupMessageHandler, GrowlNotificationServiceImpl, PopupMessageHandlerSwingImpl, PopupMessageHandlerTrayIconImpl

public interface PopupMessageHandler

The PopupMessageHandler role is to give different methods to display PopupMessage and listen for events (user click) coming from that popup.

Author:
Symphorien Wanko

Method Summary
 void addPopupMessageListener(SystrayPopupMessageListener listener)
          Registers a listener to be informed of systray popup events.
 int getPreferenceIndex()
          Returns a preference index, which indicates how many features the handler implements.
 void removePopupMessageListener(SystrayPopupMessageListener listener)
          Removes a listener previously added with addPopupMessageListener.
 void showPopupMessage(PopupMessage popupMessage)
          Shows the given PopupMessage.
 String toString()
          Returns a readable localized description of this popup handler.
 

Method Detail

addPopupMessageListener

void addPopupMessageListener(SystrayPopupMessageListener listener)
Registers a listener to be informed of systray popup events.

Parameters:
listener - the listened which will be informed of systray popup events

removePopupMessageListener

void removePopupMessageListener(SystrayPopupMessageListener listener)
Removes a listener previously added with addPopupMessageListener.

Parameters:
listener - the listener to remove

showPopupMessage

void showPopupMessage(PopupMessage popupMessage)
Shows the given PopupMessage. Any given PopupMessage will provide a minimum of two values: a message title and a message body. These two values are respectively available via PopupMessage#getMessageTitle() and PopupMessage#getMessage()

Parameters:
popupMessage - the message to show

getPreferenceIndex

int getPreferenceIndex()
Returns a preference index, which indicates how many features the handler implements. Implementer should calculate preference index by adding "1" for each of the the following features that the implementation supports: 1) showing images 2) detecting clicks 3) being able to match a click to a message 4) using a native popup mechanism

Returns:
an integer representing preference index of this popup handler

toString

String toString()
Returns a readable localized description of this popup handler.

Overrides:
toString in class Object
Returns:
a string describing this popup handler

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.