All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ejmf.toolkit.gui.ViewingPanel

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----com.sun.java.swing.JComponent
                           |
                           +----com.sun.java.swing.JPanel
                                   |
                                   +----ejmf.toolkit.gui.ViewingPanel

public class ViewingPanel
extends JPanel
ViewingPanel provides a JDesktopPane in which can be displayed any number of screen for viewing a Player. Screens are added with addScreen. Screens are removed from the desktop using removeScreen.

See Also:
JLayeredPane, JDesktopPane, Player

Variable Index

 o DISPLAY_BOTH
A convenience value used to display both visual and control component of a Player when adding to ViewingPanel.
 o DISPLAY_CONTROL
This value is OR'd into third argument to addScreen if the screen should display the Player control component.
 o DISPLAY_VISUAL
This value is OR'd into third argument to addScreen if the screen should display the Player visual component.

Constructor Index

 o ViewingPanel(String)
Create a panel in which a JDesktopPane is used to to display screens for viewing a Player.

Method Index

 o addScreen(String, Player)
Create a JInternalFrame and add it to the desktop.
 o addScreen(String, Player, int)
Create a JInternalFrame and add it to the desktop.
 o getPreferredSize()
Returns the preferred dimensions for the desktop.
 o removeScreen(Player)
Remove a viewing screen from the desktop.

Variables

 o DISPLAY_VISUAL
 public static final int DISPLAY_VISUAL
This value is OR'd into third argument to addScreen if the screen should display the Player visual component.

 o DISPLAY_CONTROL
 public static final int DISPLAY_CONTROL
This value is OR'd into third argument to addScreen if the screen should display the Player control component.

 o DISPLAY_BOTH
 public static final int DISPLAY_BOTH
A convenience value used to display both visual and control component of a Player when adding to ViewingPanel.

Constructors

 o ViewingPanel
 public ViewingPanel(String title)
Create a panel in which a JDesktopPane is used to to display screens for viewing a Player.

Parameters:
title - Title displayed in border of JDesktopPane

Methods

 o getPreferredSize
 public Dimension getPreferredSize()
Returns the preferred dimensions for the desktop.

Returns:
java.awt.Dimension
Overrides:
getPreferredSize in class JComponent
 o addScreen
 public void addScreen(String title,
                       Player player)
Create a JInternalFrame and add it to the desktop. The video component of Player is displayed in this JInternalFrame. The control panel component is not displayed. Use addScreen(String, Player, true) if control panel should be displayed. Player must be in Realized state so that visual and control components can be retieved.

Parameters:
title - Title displayed in JInternalFrame border.
player - A Player in the Realized state.
 o addScreen
 public void addScreen(String title,
                       Player player,
                       int displayFlags)
Create a JInternalFrame and add it to the desktop. The video component of Player is always displayed in this JInternalFrame if displayFlags & DISPLAY_VISUAL is true. The control panel component is displayed if displayFlags & DISPLAY_CONTROL is true. Player must be in Realized state so that visual and control components can be retieved.

Parameters:
title - Title displayed in JInternalFrame border.
player - A Player in the Realized state.
displayFlags - Flag which determines which AWT components associated with Player are diplayed.
 o removeScreen
 public void removeScreen(Player player)
Remove a viewing screen from the desktop.

Parameters:
player - The Player whose screen is to be removed.

All Packages  Class Hierarchy  This Package  Previous  Next  Index