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

Constructor Summary
UIVideoHandler(CallPeer callPeer, CallRenderer callRenderer, List<Container> videoContainers)
          Constructor.
 
Method Summary
 void addMouseAndKeyListeners()
          Add KeyListener, MouseListener, MouseWheelListener and MouseMotionListener to remote video component.
 OperationSetDesktopSharingClient addRemoteControlListener()
          Sets up listening to remote-control notifications (granted or revoked).
 OperationSetVideoTelephony addVideoListener()
          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.
 Component getLocalVideoComponent()
          Get the local video Component.
 Component getRemoteVideoComponent()
          Deprecated. 
 void handleVideoEvent(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()
          Removes the setup for listening to remote-control notifications (granted or revoked).
 void removeVideoListener()
          Removes the video listener
 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(CallPeer callPeer,
                      CallRenderer callRenderer,
                      List<Container> videoContainers)
Constructor.

Parameters:
callPeer - the CallPeer
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

addVideoListener

public OperationSetVideoTelephony addVideoListener()
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()
Removes the video listener


handleVideoEvent

public void handleVideoEvent(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()
Sets up listening to remote-control notifications (granted or revoked).

Returns:
reference to OperationSetDesktopSharingClient

removeRemoteControlListener

public void removeRemoteControlListener()
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.