Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.gui.main.call
Class CallPeerAdapter

java.lang.Object
  extended by net.java.sip.communicator.service.protocol.event.CallPeerAdapter
      extended by net.java.sip.communicator.impl.gui.main.call.CallPeerAdapter
All Implemented Interfaces:
PropertyChangeListener, EventListener, CallPeerConferenceListener, CallPeerListener, CallPeerSecurityListener

public class CallPeerAdapter
extends CallPeerAdapter
implements PropertyChangeListener, CallPeerSecurityListener, CallPeerConferenceListener

The CallPeerAdapter is an adapter that implements all common CallPeer related listeners in order to facilitate the task of different CallPeerRenderers when implementing peer functionalities.

Author:
Yana Stamcheva, Lubomir Marinov

Constructor Summary
CallPeerAdapter(CallPeer callPeer, CallPeerRenderer renderer)
          Creates a CallPeerAdapter by specifying the corresponding callPeer and corresponding renderer.
 
Method Summary
 void conferenceFocusChanged(CallPeerConferenceEvent conferenceEvent)
          Enables or disables the conference focus UI depending on the change.
 void conferenceMemberAdded(CallPeerConferenceEvent conferenceEvent)
          Adds a ConferenceMemberPanel to this container when a ConferenceMember has been added to the corresponding conference.
 void conferenceMemberRemoved(CallPeerConferenceEvent conferenceEvent)
          Removes the corresponding ConferenceMemberPanel from this container when a ConferenceMember has been removed from the corresponding conference.
 void peerDisplayNameChanged(CallPeerChangeEvent evt)
          Fired when peer's display name is changed
 void peerImageChanged(CallPeerChangeEvent evt)
          Fired when peer's image is changed
 void peerStateChanged(CallPeerChangeEvent evt)
          Fired when peer's state is changed
 void propertyChange(PropertyChangeEvent evt)
          Fired when a change in property happened.
 void securityMessageRecieved(CallPeerSecurityMessageEvent event)
          Does nothing.
 void securityOff(CallPeerSecurityOffEvent securityOffEvent)
          Indicates the new state through the security indicator components.
 void securityOn(CallPeerSecurityOnEvent evt)
          Creates the security panel, when a securityOnEvent is received.
 
Methods inherited from class net.java.sip.communicator.service.protocol.event.CallPeerAdapter
peerAddressChanged, peerTransportAddressChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CallPeerAdapter

public CallPeerAdapter(CallPeer callPeer,
                       CallPeerRenderer renderer)
Creates a CallPeerAdapter by specifying the corresponding callPeer and corresponding renderer.

Parameters:
callPeer - the underlying peer
renderer - the component we're using to render the given callPeer
Method Detail

peerStateChanged

public void peerStateChanged(CallPeerChangeEvent evt)
Fired when peer's state is changed

Specified by:
peerStateChanged in interface CallPeerListener
Overrides:
peerStateChanged in class CallPeerAdapter
Parameters:
evt - fired CallPeerEvent

peerDisplayNameChanged

public void peerDisplayNameChanged(CallPeerChangeEvent evt)
Fired when peer's display name is changed

Specified by:
peerDisplayNameChanged in interface CallPeerListener
Overrides:
peerDisplayNameChanged in class CallPeerAdapter
Parameters:
evt - fired CallPeerEvent

peerImageChanged

public void peerImageChanged(CallPeerChangeEvent evt)
Fired when peer's image is changed

Specified by:
peerImageChanged in interface CallPeerListener
Overrides:
peerImageChanged in class CallPeerAdapter
Parameters:
evt - fired CallPeerEvent

propertyChange

public void propertyChange(PropertyChangeEvent evt)
Fired when a change in property happened.

Specified by:
propertyChange in interface PropertyChangeListener
Parameters:
evt - fired PropertyChangeEvent

securityMessageRecieved

public void securityMessageRecieved(CallPeerSecurityMessageEvent event)
Does nothing.

Specified by:
securityMessageRecieved in interface CallPeerSecurityListener
Parameters:
event - the event we received

securityOn

public void securityOn(CallPeerSecurityOnEvent evt)
Creates the security panel, when a securityOnEvent is received.

Specified by:
securityOn in interface CallPeerSecurityListener
Parameters:
evt - the event we received

securityOff

public void securityOff(CallPeerSecurityOffEvent securityOffEvent)
Indicates the new state through the security indicator components.

Specified by:
securityOff in interface CallPeerSecurityListener
Parameters:
securityOffEvent - the event we received

conferenceMemberAdded

public void conferenceMemberAdded(CallPeerConferenceEvent conferenceEvent)
Adds a ConferenceMemberPanel to this container when a ConferenceMember has been added to the corresponding conference.

Specified by:
conferenceMemberAdded in interface CallPeerConferenceListener
Parameters:
conferenceEvent - the CallPeerConferenceEvent that has been triggered

conferenceMemberRemoved

public void conferenceMemberRemoved(CallPeerConferenceEvent conferenceEvent)
Removes the corresponding ConferenceMemberPanel from this container when a ConferenceMember has been removed from the corresponding conference.

Specified by:
conferenceMemberRemoved in interface CallPeerConferenceListener
Parameters:
conferenceEvent - the CallPeerConferenceEvent that has been triggered

conferenceFocusChanged

public void conferenceFocusChanged(CallPeerConferenceEvent conferenceEvent)
Enables or disables the conference focus UI depending on the change. When a peer changes its status from focus to not focus or the reverse. we must change its listeners. If the peer is focus we use conference member lister, cause we will receive its status and the statuses of its conference members. And if it is not a focus we must listen with stream sound level listener

Specified by:
conferenceFocusChanged in interface CallPeerConferenceListener
Parameters:
conferenceEvent - the conference event

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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