Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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

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

public class CallPeerRendererUtils
extends Object

An utility class that reassembles common methods used by different CallPeerRenderers.

Author:
Lubomir Marinov, Yana Stamcheva, Adam Netocny

Nested Class Summary
static class CallPeerRendererUtils.ExitFullScreenButton
          Full screen exit button.
 
Constructor Summary
CallPeerRendererUtils()
           
 
Method Summary
static void addKeyListener(Component component, KeyListener l)
          Adds the given KeyListener l to the given component.
static Component createButtonBar(boolean heavyweight, Component[] buttons)
          Creates a buttons bar from the given list of button components.
static Component createExitFullScreenButton(CallRenderer renderer)
          Creates a new Component through which the user would be able to exit the full screen mode.
static Frame getFrame(Component component)
          Gets the first Frame in the ancestor Component hierarchy of a specific Component.
static void setBackground(Component component, Color background)
          Sets the given background color to the given component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CallPeerRendererUtils

public CallPeerRendererUtils()
Method Detail

createExitFullScreenButton

public static Component createExitFullScreenButton(CallRenderer renderer)
Creates a new Component through which the user would be able to exit the full screen mode.

Parameters:
renderer - the renderer through which we exit the full screen mode
Returns:
the newly created component

setBackground

public static void setBackground(Component component,
                                 Color background)
Sets the given background color to the given component.

Parameters:
component - the component to which we set the background
background - the background color to set

addKeyListener

public static void addKeyListener(Component component,
                                  KeyListener l)
Adds the given KeyListener l to the given component.

Parameters:
component - the component to which we add l
l - the KeyListener to add

createButtonBar

public static Component createButtonBar(boolean heavyweight,
                                        Component[] buttons)
Creates a buttons bar from the given list of button components.

Parameters:
heavyweight - indicates if the created button bar should be heavy weight component (useful in full screen mode)
buttons - the list of buttons to add in the created button bar
Returns:
the created button bar

getFrame

public static Frame getFrame(Component component)
Gets the first Frame in the ancestor Component hierarchy of a specific Component.

The located Frame (if any) is often used as the owner of Dialogs opened by the specified Component in order to provide natural Frame ownership.

Parameters:
component - the Component which is to have its Component hierarchy examined for Frame
Returns:
the first Frame in the ancestor Component hierarchy of the specified Component; null, if no such Frame was located

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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