Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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

java.lang.Object
  extended by net.java.sip.communicator.impl.osdependent.jdic.StatusSubMenu
All Implemented Interfaces:
EventListener, ProviderPresenceStatusListener, RegistrationStateChangeListener

public class StatusSubMenu
extends Object
implements ProviderPresenceStatusListener, RegistrationStateChangeListener

The StatusSubMenu provides a menu which allow to select the status for each of the protocol providers registered when the menu appears

Author:
Nicolas Chamouard, Lubomir Marinov

Field Summary
 
Fields inherited from interface net.java.sip.communicator.service.protocol.event.ProviderPresenceStatusListener
STATUS_MESSAGE
 
Constructor Summary
StatusSubMenu(SystrayServiceJdicImpl tray, boolean swing)
          Creates an instance of StatusSubMenu.
 
Method Summary
(package private) static void addMenuItem(Object menu, Object menuItem)
           
 Object getMenu()
           
 void providerStatusChanged(ProviderPresenceStatusChangeEvent evt)
          Fired when an account has changed its status.
 void providerStatusMessageChanged(PropertyChangeEvent evt)
          The method is called by a ProtocolProvider implementation whenever a change in the status message of the corresponding provider has occurred and has been confirmed by the server.
 void registrationStateChanged(RegistrationStateChangeEvent evt)
          The method is called by a ProtocolProviderService implementation whenever a change in the registration state of the corresponding provider had occurred.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatusSubMenu

public StatusSubMenu(SystrayServiceJdicImpl tray,
                     boolean swing)
Creates an instance of StatusSubMenu.

Parameters:
tray - a reference of the parent Systray
swing - true to represent this instance with a Swing JMenu; false to use an AWT Menu
Method Detail

getMenu

public Object getMenu()

addMenuItem

static void addMenuItem(Object menu,
                        Object menuItem)

providerStatusChanged

public void providerStatusChanged(ProviderPresenceStatusChangeEvent evt)
Fired when an account has changed its status. We update the icon in the menu.

Specified by:
providerStatusChanged in interface ProviderPresenceStatusListener
Parameters:
evt -

providerStatusMessageChanged

public void providerStatusMessageChanged(PropertyChangeEvent evt)
Description copied from interface: ProviderPresenceStatusListener
The method is called by a ProtocolProvider implementation whenever a change in the status message of the corresponding provider has occurred and has been confirmed by the server.

Specified by:
providerStatusMessageChanged in interface ProviderPresenceStatusListener
Parameters:
evt - a PropertyChangeEvent with a STATUS_MESSAGE property name, containing the old and new status messages.

registrationStateChanged

public void registrationStateChanged(RegistrationStateChangeEvent evt)
Description copied from interface: RegistrationStateChangeListener
The method is called by a ProtocolProviderService implementation whenever a change in the registration state of the corresponding provider had occurred.

Specified by:
registrationStateChanged in interface RegistrationStateChangeListener
Parameters:
evt - the event describing the status change.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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