Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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

java.lang.Object
  extended by net.java.sip.communicator.impl.gui.main.call.UIVideoHandler

public class UIVideoHandler
extends Object

The UIVideoHandler is meant to handle all video related events.

Author:
Yana Stamcheva, Lyubomir Marinov

Constructor Summary
UIVideoHandler(CallRenderer callRenderer, List<Container> videoContainers)
          Constructor.
 
Method Summary
 void addMouseAndKeyListeners()
          Add KeyListener, MouseListener, MouseWheelListener and MouseMotionListener to remote video component.
 OperationSetDesktopSharingClient addRemoteControlListener(CallPeer callPeer)
          Sets up listening to remote-control notifications (granted or revoked).
 OperationSetVideoTelephony addVideoListener(CallPeer callPeer)
          Sets up listening to notifications about adding or removing video for the CallPeer this panel depicts and displays the video in question in the last-known of videoContainers (because the video is represented by a Component and it cannot be displayed in multiple Containers at one and the same time) as soon as it arrives.
 void addVideoToolbar(CallPeer callPeer, Component videoToolbar)
           
 void addVideoToolbar(ConferenceMember conferenceMember, Component videoToolbar)
           
 Component getLocalVideoComponent()
          Get the local video Component.
 Component getRemoteVideoComponent()
          Deprecated. 
 void handleVideoEvent(Call call, VideoEvent event)
          When a video is added or removed for the callPeer, makes sure to display or hide it respectively.
 boolean isLocalVideoVisible()
          Indicates if the local video component is currently visible.
 void removeMouseAndKeyListeners()
          Remove KeyListener, MouseListener, MouseWheelListener and MouseMotionListener to remote video component.
 void removeRemoteControlListener(CallPeer callPeer)
          Removes the setup for listening to remote-control notifications (granted or revoked).
 void removeVideoListener(CallPeer callPeer, net.java.sip.communicator.impl.gui.main.call.UIVideoHandler.VideoTelephonyListener videoTelephonyListener)
          Removes the video listener
 void removeVideoToolbar(CallPeer callPeer)
           
 void removeVideoToolbar(ConferenceMember conferenceMember)
           
 void setCallRenderer(CallRenderer callRenderer)
           
 void setLocalVideoToolbar(Component videoToolbar)
           
 void setLocalVideoVisible(boolean isVisible)
          Shows/hides the local video component.
 void setVideoContainersList(List<Container> videoContainers)
          Set the video cotnainers list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UIVideoHandler

public UIVideoHandler(CallRenderer callRenderer,
                      List<Container> videoContainers)
Constructor.

Parameters:
callRenderer - ther CallRenderer
videoContainers - the video Container
Method Detail

setVideoContainersList

public void setVideoContainersList(List<Container> videoContainers)
Set the video cotnainers list.

Parameters:
videoContainers - the video Container list

setCallRenderer

public void setCallRenderer(CallRenderer callRenderer)

addVideoToolbar

public void addVideoToolbar(CallPeer callPeer,
                            Component videoToolbar)

addVideoToolbar

public void addVideoToolbar(ConferenceMember conferenceMember,
                            Component videoToolbar)

removeVideoToolbar

public void removeVideoToolbar(CallPeer callPeer)

removeVideoToolbar

public void removeVideoToolbar(ConferenceMember conferenceMember)

setLocalVideoToolbar

public void setLocalVideoToolbar(Component videoToolbar)

addVideoListener

public OperationSetVideoTelephony addVideoListener(CallPeer callPeer)
Sets up listening to notifications about adding or removing video for the CallPeer this panel depicts and displays the video in question in the last-known of videoContainers (because the video is represented by a Component and it cannot be displayed in multiple Containers at one and the same time) as soon as it arrives.

Returns:
the video telephony operation set, where the video listener was added

removeVideoListener

public void removeVideoListener(CallPeer callPeer,
                                net.java.sip.communicator.impl.gui.main.call.UIVideoHandler.VideoTelephonyListener videoTelephonyListener)
Removes the video listener


handleVideoEvent

public void handleVideoEvent(Call call,
                             VideoEvent event)
When a video is added or removed for the callPeer, makes sure to display or hide it respectively.

Parameters:
event - a VideoEvent describing the added visual Component representing video and the provider it was added into or null if such information is not available

addMouseAndKeyListeners

public void addMouseAndKeyListeners()
Add KeyListener, MouseListener, MouseWheelListener and MouseMotionListener to remote video component.


removeMouseAndKeyListeners

public void removeMouseAndKeyListeners()
Remove KeyListener, MouseListener, MouseWheelListener and MouseMotionListener to remote video component.


addRemoteControlListener

public OperationSetDesktopSharingClient addRemoteControlListener(CallPeer callPeer)
Sets up listening to remote-control notifications (granted or revoked).

Returns:
reference to OperationSetDesktopSharingClient

removeRemoteControlListener

public void removeRemoteControlListener(CallPeer callPeer)
Removes the setup for listening to remote-control notifications (granted or revoked).


setLocalVideoVisible

public void setLocalVideoVisible(boolean isVisible)
Shows/hides the local video component.

Parameters:
isVisible - true to show the local video, false - otherwise

isLocalVideoVisible

public boolean isLocalVideoVisible()
Indicates if the local video component is currently visible.

Returns:
true if the local video component is currently visible, false - otherwise

getLocalVideoComponent

public Component getLocalVideoComponent()
Get the local video Component.

Returns:
the local video Component

getRemoteVideoComponent

@Deprecated
public Component getRemoteVideoComponent()
Deprecated. 

Get the remote video Component.

Returns:
the remote video Component.

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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