Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.util.swing
Class VideoLayout

java.lang.Object
  extended by net.java.sip.communicator.util.swing.FitLayout
      extended by net.java.sip.communicator.util.swing.VideoLayout
All Implemented Interfaces:
LayoutManager

public class VideoLayout
extends FitLayout

Implements the LayoutManager which lays out the local and remote videos in a video Call.

Author:
Lyubomir Marinov, Yana Stamcheva

Field Summary
static String CANVAS
          The video canvas constraint.
static String CENTER_REMOTE
          The center remote video constraint.
static String CLOSE_LOCAL_BUTTON
          The close local video constraint.
static String EAST_REMOTE
          The east remote video constraint.
static String LOCAL
          The local video constraint.
 
Constructor Summary
VideoLayout()
           
 
Method Summary
 void addLayoutComponent(String name, Component comp)
          Adds the given component in this layout on the specified by name position.
protected  Component getComponent(Container parent)
          Returns the remote video component.
 Object getComponentConstraints(Component c)
          Returns the constraints for the given component.
 Component getLocal()
          Returns the local video component.
 Component getLocalCloseButton()
          Returns the local video close button.
 void layoutContainer(Container parent)
          Lays out this given container.
 Dimension minimumLayoutSize(Container parent)
          Returns the minimum layout size for the given container.
 Dimension preferredLayoutSize(Container parent)
          Returns the preferred layout size for the given container.
 void removeLayoutComponent(Component comp)
          Removes the given component from this layout.
 
Methods inherited from class net.java.sip.communicator.util.swing.FitLayout
layoutComponent, layoutContainer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CANVAS

public static final String CANVAS
The video canvas constraint.

See Also:
Constant Field Values

CENTER_REMOTE

public static final String CENTER_REMOTE
The center remote video constraint.

See Also:
Constant Field Values

CLOSE_LOCAL_BUTTON

public static final String CLOSE_LOCAL_BUTTON
The close local video constraint.

See Also:
Constant Field Values

EAST_REMOTE

public static final String EAST_REMOTE
The east remote video constraint.

See Also:
Constant Field Values

LOCAL

public static final String LOCAL
The local video constraint.

See Also:
Constant Field Values
Constructor Detail

VideoLayout

public VideoLayout()
Method Detail

addLayoutComponent

public void addLayoutComponent(String name,
                               Component comp)
Adds the given component in this layout on the specified by name position.

Specified by:
addLayoutComponent in interface LayoutManager
Overrides:
addLayoutComponent in class FitLayout
Parameters:
name - the constraint giving the position of the component in this layout
comp - the component to add

getComponent

protected Component getComponent(Container parent)
Returns the remote video component.

Overrides:
getComponent in class FitLayout
Parameters:
parent - the Container to retrieve the first Component of
Returns:
the remote video component

getComponentConstraints

public Object getComponentConstraints(Component c)
Returns the constraints for the given component.

Parameters:
c - the component for which constraints we're looking for
Returns:
the constraints for the given component

getLocal

public Component getLocal()
Returns the local video component.

Returns:
the local video component

getLocalCloseButton

public Component getLocalCloseButton()
Returns the local video close button.

Returns:
the local video close button

layoutContainer

public void layoutContainer(Container parent)
Lays out this given container.

Specified by:
layoutContainer in interface LayoutManager
Overrides:
layoutContainer in class FitLayout
Parameters:
parent - the container to lay out

minimumLayoutSize

public Dimension minimumLayoutSize(Container parent)
Returns the minimum layout size for the given container.

Specified by:
minimumLayoutSize in interface LayoutManager
Overrides:
minimumLayoutSize in class FitLayout
Parameters:
parent - the container which minimum layout size we're looking for
Returns:
a Dimension containing, the minimum layout size for the given container

preferredLayoutSize

public Dimension preferredLayoutSize(Container parent)
Returns the preferred layout size for the given container.

Specified by:
preferredLayoutSize in interface LayoutManager
Overrides:
preferredLayoutSize in class FitLayout
Parameters:
parent - the container which preferred layout size we're looking for
Returns:
a Dimension containing, the preferred layout size for the given container

removeLayoutComponent

public void removeLayoutComponent(Component comp)
Removes the given component from this layout.

Specified by:
removeLayoutComponent in interface LayoutManager
Overrides:
removeLayoutComponent in class FitLayout
Parameters:
comp - the component to remove from the layout

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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