Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.osdependent.jdic
Class SystrayServiceJdicImpl

java.lang.Object
  extended by net.java.sip.communicator.impl.osdependent.jdic.SystrayServiceJdicImpl
All Implemented Interfaces:
SystrayService

public class SystrayServiceJdicImpl
extends Object
implements SystrayService

The Systray provides a Icon and the associated TrayMenu in the system tray using the Jdic library.

Author:
Nicolas Chamouard, Yana Stamcheva, Lubomir Marinov, Symphorien Wanko

Field Summary
 
Fields inherited from interface net.java.sip.communicator.service.systray.SystrayService
ENVELOPE_IMG_TYPE, ERROR_MESSAGE_TYPE, INFORMATION_MESSAGE_TYPE, NONE_MESSAGE_TYPE, SC_IMG_AWAY_TYPE, SC_IMG_DND_TYPE, SC_IMG_FFC_TYPE, SC_IMG_OFFLINE_TYPE, SC_IMG_TYPE, WARNING_MESSAGE_TYPE
 
Constructor Summary
SystrayServiceJdicImpl()
          Creates an instance of Systray.
 
Method Summary
 void addPopupMessageListener(SystrayPopupMessageListener listener)
          Implements the SystrayService.addPopupMessageListener method.
 PopupMessageHandler getActivePopupMessageHandler()
          Get the handler currently used by this implementation to popup message
 TrayIcon getTrayIcon()
           
 void removePopupMessageListener(SystrayPopupMessageListener listener)
          Implements the SystrayService.removePopupMessageListener method.
 void saveStatusInformation(ProtocolProviderService protocolProvider, String statusName)
          Saves the last status for all accounts.
 void selectBestPopupMessageHandler()
          Sets activePopupHandler to be the one with the highest preference index.
 PopupMessageHandler setActivePopupMessageHandler(PopupMessageHandler newHandler)
          Set the handler which will be used for popup message
 void setSystrayIcon(int imageType)
          Sets a new Systray icon.
 void showPopupMessage(PopupMessage popupMessage)
          Implements SystraService#showPopupMessage()
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystrayServiceJdicImpl

public SystrayServiceJdicImpl()
Creates an instance of Systray.

Method Detail

saveStatusInformation

public void saveStatusInformation(ProtocolProviderService protocolProvider,
                                  String statusName)
Saves the last status for all accounts. This information is used on logging. Each time user logs in he's logged with the same status as he was the last time before closing the application.

Parameters:
protocolProvider - the protocol provider for which we save the last selected status
statusName - the status name to save

showPopupMessage

public void showPopupMessage(PopupMessage popupMessage)
Implements SystraService#showPopupMessage()

Specified by:
showPopupMessage in interface SystrayService
Parameters:
popupMessage - the message we will show

addPopupMessageListener

public void addPopupMessageListener(SystrayPopupMessageListener listener)
Implements the SystrayService.addPopupMessageListener method.

Specified by:
addPopupMessageListener in interface SystrayService
Parameters:
listener - the listener to add

removePopupMessageListener

public void removePopupMessageListener(SystrayPopupMessageListener listener)
Implements the SystrayService.removePopupMessageListener method.

Specified by:
removePopupMessageListener in interface SystrayService
Parameters:
listener - the listener to remove

setSystrayIcon

public void setSystrayIcon(int imageType)
Sets a new Systray icon.

Specified by:
setSystrayIcon in interface SystrayService
Parameters:
imageType - the type of the image to set.

getTrayIcon

public TrayIcon getTrayIcon()
Returns:
the trayIcon

setActivePopupMessageHandler

public PopupMessageHandler setActivePopupMessageHandler(PopupMessageHandler newHandler)
Set the handler which will be used for popup message

Specified by:
setActivePopupMessageHandler in interface SystrayService
Parameters:
newHandler - the handler to set. providing a null handler is like disabling popup.
Returns:
the previously used popup handler

getActivePopupMessageHandler

public PopupMessageHandler getActivePopupMessageHandler()
Get the handler currently used by this implementation to popup message

Specified by:
getActivePopupMessageHandler in interface SystrayService
Returns:
the current handler

selectBestPopupMessageHandler

public void selectBestPopupMessageHandler()
Sets activePopupHandler to be the one with the highest preference index.

Specified by:
selectBestPopupMessageHandler in interface SystrayService

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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