All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ejmf.toolkit.gui.NPlayerPanel

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

public class NPlayerPanel
extends JPanel
Display the visual components from multiple Players from one of the following sources: The Player's media is displayed within a JPanel using a GridLayout as the default. The grid is made as square as possible. To change the layout manager, override the createLayout method. Each visual component is bordered by a etched and titled border. To change the border drawn around the media, override the createBorder method.


Constructor Index

 o NPlayerPanel(int, MediaLocator)
Create an NPlayerPanel that displays a single media source multiple times.
 o NPlayerPanel(MediaLocator[])
Create an NPlayerPanel from a array of MediaLocators.
 o NPlayerPanel(MixFileData)
Create an NPlayerPanel from a MixFileData object For each element a Player is created and its visual component displayed.
 o NPlayerPanel(MultiPlayer)
Create an NPlayerPanel from a MultiPlayer.
 o NPlayerPanel(Player[])
Create an NPlayerPanel from an array of Players.
 o NPlayerPanel(String[])
Create an NPlayerPanel from an array of media file names For each file named in the array a MediaLocator is constructed.

Method Index

 o createBorder(MediaLocator)
Create an etched and titled border based on a Player MediaLocator.
 o createLayout(int)
Create the LayoutManager for the NPlayerPanel The default layout is a GridLayout with a 10 pixel horizontal and vertical gaps.
 o getPlayers()
Return an array of Player references naming Players displayed in NPlayerPanel.

Constructors

 o NPlayerPanel
 public NPlayerPanel(MediaLocator mls[]) throws NoPlayerException, IOException
Create an NPlayerPanel from a array of MediaLocators. The MediaLocators are used to construct the Players.

Parameters:
mls - An array of MediaLocators.
Throws: NoPlayerException
if Player can not be constructed.
Throws: IOException
if DataSource can not be connected to.
 o NPlayerPanel
 public NPlayerPanel(MultiPlayer mp)
Create an NPlayerPanel from a MultiPlayer. In this case, Players are already constructed. Players are moved to prefetch state.

 o NPlayerPanel
 public NPlayerPanel(Player players[])
Create an NPlayerPanel from an array of Players. In this case, Players are already constructed. Players are moved to prefetch state.

 o NPlayerPanel
 public NPlayerPanel(MixFileData mixList) throws NoPlayerException, IOException
Create an NPlayerPanel from a MixFileData object For each element a Player is created and its visual component displayed.

Parameters:
mixList - a MixFileData object
Throws: NoPlayerException
if Player can not be constructed.
Throws: IOException
if DataSource can not be connected to.
See Also:
MixTrackData, MixFileData
 o NPlayerPanel
 public NPlayerPanel(String mediaFiles[]) throws NoPlayerException, IOException
Create an NPlayerPanel from an array of media file names For each file named in the array a MediaLocator is constructed. From each MediaLocator a Player is created and its visual component displayed.

Parameters:
mediaFiles - An array of Strings which
Throws: NoPlayerException
if Player can not be constructed.
Throws: IOException
if DataSource can not be connected to.
 o NPlayerPanel
 public NPlayerPanel(int nPlayers,
                     MediaLocator media) throws NoPlayerException, IOException
Create an NPlayerPanel that displays a single media source multiple times.

Parameters:
nPlayers - the number of Players to create
media - A MediaLocator.
Throws: NoPlayerException
if Player can not be constructed.
Throws: IOException
if DataSource can not be connected to.

Methods

 o createBorder
 protected Border createBorder(MediaLocator ml)
Create an etched and titled border based on a Player MediaLocator. Default implementation creates an EtchedBorder with the title displayed at top left. If no title is provided, a simple EtchedBorder is drawn. Subclasses should over-ride this method to create a custom border.

Parameters:
ml - A javax.media.MediaLocator associated with a Player
Returns:
a com.sun.java.swing.border.Border
 o createLayout
 protected LayoutManager createLayout(int n)
Create the LayoutManager for the NPlayerPanel The default layout is a GridLayout with a 10 pixel horizontal and vertical gaps. Subclasses over-ride this method to provide their layout.

Parameters:
n - the number of Players to be dispalyed.
Returns:
java.awt.LayoutManager
 o getPlayers
 public Player[] getPlayers()
Return an array of Player references naming Players displayed in NPlayerPanel.

Returns:
An array of Players.

All Packages  Class Hierarchy  This Package  Previous  Next  Index