public abstract class AbstractSystrayService extends java.lang.Object implements SystrayService
SystrayService
. Manages
PopupMessageHandlers and SystrayPopupMessageListeners.ERROR_MESSAGE_TYPE, INFORMATION_MESSAGE_TYPE, NONE_MESSAGE_TYPE, PNMAE_TRAY_MODE, SC_IMG_AWAY_TYPE, SC_IMG_DND_TYPE, SC_IMG_EXTENDED_AWAY_TYPE, SC_IMG_FFC_TYPE, SC_IMG_OFFLINE_TYPE, SC_IMG_TYPE, WARNING_MESSAGE_TYPE
Constructor and Description |
---|
AbstractSystrayService(org.osgi.framework.BundleContext bundleContext)
Creates new instance of AbstractSystrayService.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addPopupHandler(PopupMessageHandler handler)
Registers given PopupMessageHandler.
|
void |
addPopupMessageListener(SystrayPopupMessageListener listener)
Implements the SystrayService.addPopupMessageListener method.
|
protected boolean |
containsHandler(java.lang.String handlerClass)
Checks if given handlerClass is registered as a handler.
|
protected PopupMessageHandler |
getActivePopupHandler()
Returns active PopupMessageHandler.
|
PopupMessageHandler |
getActivePopupMessageHandler()
Get the handler currently used by this implementation to popup message
|
protected void |
initHandlers()
Initializes popup handler by searching registered services for class
PopupMessageHandler.
|
protected void |
removePopupHandler(PopupMessageHandler handler)
Removes given PopupMessageHandler.
|
void |
removePopupMessageListener(SystrayPopupMessageListener listener)
Implements the SystrayService.removePopupMessageListener method.
|
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 |
setNotificationCount(int count)
Stub method that does nothing.
|
void |
showPopupMessage(PopupMessage popupMessage)
Implements SystraService#showPopupMessage()
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkInitialized, getActiveSystrayMode, getSystrayModes, setSystrayIcon
public AbstractSystrayService(org.osgi.framework.BundleContext bundleContext)
bundleContext
- OSGI bundle context that will be used by this
instanceprotected void addPopupHandler(PopupMessageHandler handler)
handler
- the PopupMessageHandler to be registered.protected void removePopupHandler(PopupMessageHandler handler)
handler
- the PopupMessageHandler to be removed.protected boolean containsHandler(java.lang.String handlerClass)
handlerClass
- the class name to be checked.protected PopupMessageHandler getActivePopupHandler()
public void showPopupMessage(PopupMessage popupMessage)
showPopupMessage
in interface SystrayService
popupMessage
- the message we will showpublic void setNotificationCount(int count)
setNotificationCount
in interface SystrayService
count
- ignoredpublic void addPopupMessageListener(SystrayPopupMessageListener listener)
addPopupMessageListener
in interface SystrayService
listener
- the listener to addpublic void removePopupMessageListener(SystrayPopupMessageListener listener)
removePopupMessageListener
in interface SystrayService
listener
- the listener to removepublic PopupMessageHandler setActivePopupMessageHandler(PopupMessageHandler newHandler)
setActivePopupMessageHandler
in interface SystrayService
newHandler
- the handler to set. providing a null handler is like
disabling popup.public PopupMessageHandler getActivePopupMessageHandler()
getActivePopupMessageHandler
in interface SystrayService
public void selectBestPopupMessageHandler()
selectBestPopupMessageHandler
in interface SystrayService
protected void initHandlers()
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.