All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.jmf.MultiPlayer.MultiPlayerBean

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----com.ibm.jmf.MultiPlayer.JMFPanel
                                   |
                                   +----com.ibm.jmf.MultiPlayer.MultiPlayerBean

public class MultiPlayerBean
extends JMFPanel
implements ActionListener, Serializable, ControllerListener
This class is to provide a bean to present multiple media files


Variable Index

 o buttonPanel
 o gifPanel
 o infoButton
 o numOfMGroups
 o scrollGif
 o utilPanel
 o videoPanel

Constructor Index

 o MultiPlayerBean()
MultiPlayerBean(): The default constructor is to create the transient variables.

Method Index

 o actionPerformed(ActionEvent)
actionPerformed(): This actionPerformed method must be defined in order to implement the java.media.ActionListener interface.
 o addControllerListener(ControllerListener)
addControllerListener(): method to add Controller Listeners to all the players
 o addLink(int, String, long, long)
addLink(): method to add a new related link to a media group
 o addMGroup(String, String)
addMGroup(): method to create a new Media Group and add it to the array of Media Groups
 o addPropertyChangeListener(PropertyChangeListener)
addPropertyChangeListener(): method to add property change listener
 o changeCurrentPlayer(JMFPlayer, int)
changeCurrentPlayer(): method to switch the current player to the new player selected
 o controllerUpdate(ControllerEvent)
controllerUpdate(): This controllerUpdate function must be defined in order to implement the java.media.ControllerListener interface.
 o deleteMGroup(int)
deleteMGroup(): method to delete a Media Group from the array of Media Groups and from the button panel
 o destroy()
destroy(): stop the vector of players, close the players, and release resources.
 o doDebug(String)
doDebug(): simple method to print out trace info
 o formButton(int)
formButton(): method to create a corresponding button for the mediaName
 o formButton(URL, int)
formButton(): method to create a corresponding button for the mediaName
 o getLinks()
getLinks(): method to get the entire index property links
 o getLinks(int)
getlinks(): method to get a single links from the index property links
 o getLinksString()
getLinks() method to get the links string from linksArray
 o getLoadOnInit()
getLoadOnInit(): method to get property loadOnInit value
 o getMediaNames()
getMediaNames(): method to get the entire index property mediaNames
 o getMediaNames(int)
getMediaNames(): method to get a single Media Name from the index property mediaNames
 o getMediaNamesString()
getMediaNames() method to get the mediaNames string from mediaNames Array
 o getMGroups()
getMGroups(): method to get the entire index property mGroups
 o getMGroups(int)
getMGroups(): method to get a single Media Group from the index property mGroups
 o getNumberOfMediaGroups()
getNumberOfMediaGroups() returns the number of Media Groups
 o getPreferredSize()
getPreferredSize(): method to get the preferred size for this bean
 o getURL(String)
getURL(): method to get the proper URL
 o isFitVideo()
isFitVideo(): method to set fitVideo property
 o isLooping()
isLooping(): method to check if players should loop
 o isPanelVisible()
isPanelVisible(): method to check property control panelVisible
 o isURLVisible()
isURLVisible(): method to check property URLVisible
 o moveDown(int)
moveDown(): method to move Media Group down the array and button panel
 o moveUp(int)
moveUp(): method to move a Media Group up the array and button panel
 o removeControllerListener(ControllerListener)
removeControllerListener(): method to remove Controller Listeners from all the players
 o removePropertyChangeListener(PropertyChangeListener)
removePropertyChangeListener(): method to remove property change listener
 o replaceMGroup(int, String, String)
replaceMGroup(): method to replace a Media Group from the array of Media Groups and from the button panel
 o setAppletContext(AppletContext)
setAppletContext(): method to set the AppletContext for this bean
 o setBounds(int, int, int, int)
setBounds(): method to set the Bounds of the players
 o setCodeBase(URL)
setCodeBase(): method to set the code base that this Bean is in
 o setFitVideo(boolean)
setFitVideo(): method to set property fitVideo
 o setLinks(int, String)
setLinks(): method to set an individual related link in the array links
 o setLinks(String[])
setLinks(): method to set index property links
 o setLinksString(String)
setLinks() method to set the links string, parsing it into linksArray
 o setLoadOnInit(boolean)
setLoadOnInit(): method to set property loadOnInit
 o setLooping(boolean)
setLooping(): method to set looping property
 o setMediaNames(int, String)
setmediaNames(): method to set an individual Media Names in the array mediaNames
 o setMediaNames(String[])
setMediaNames(): method to set index property mediaNames
 o setMediaNamesString(String)
setMediaNamesString() method to set the mediaNames string, parsing it into mediaNames
 o setMediaNamesString(String, Object)
 o setMGroups(int, MediaGroup)
setMGroups(): method to set an individual Media Group in the array mGroups
 o setMGroups(MediaGroup[])
setMGroups(): method to set index property mGroups
 o setPanelVisible(boolean)
setPanelVisible(): method to set property panelVisible
 o setURLVisible(boolean)
setURLVisible(): method to set property displayURL
 o start()
start(): used to check the list of media clips and instantiate players and buttons.
 o stop()
stop(): stop the array media groups and release resources.

Variables

 o buttonPanel
 transient Panel buttonPanel
 o gifPanel
 transient Panel gifPanel
 o scrollGif
 transient ScrollPane scrollGif
 o utilPanel
 transient Panel utilPanel
 o videoPanel
 transient Panel videoPanel
 o infoButton
 transient Button infoButton
 o numOfMGroups
 protected int numOfMGroups

Constructors

 o MultiPlayerBean
 public MultiPlayerBean()
MultiPlayerBean(): The default constructor is to create the transient variables. Panels, buttons. And to initialize the other variables.

Methods

 o start
 public void start()
start(): used to check the list of media clips and instantiate players and buttons. And to start the first player.

 o stop
 public void stop()
stop(): stop the array media groups and release resources.

 o destroy
 public void destroy()
destroy(): stop the vector of players, close the players, and release resources.

 o controllerUpdate
 public synchronized void controllerUpdate(ControllerEvent evt)
controllerUpdate(): This controllerUpdate function must be defined in order to implement the java.media.ControllerListener interface. This function will be called whenever there is a media event.

Parameters:
ControllerEvent - evt: the controller event that is happening
 o actionPerformed
 public void actionPerformed(ActionEvent e)
actionPerformed(): This actionPerformed method must be defined in order to implement the java.media.ActionListener interface. This method will be called whenever there is an action event.

Parameters:
java.awt.event.ActionEvent - e: the action event that is happening
 o getURL
 protected URL getURL(String filename)
getURL(): method to get the proper URL

Parameters:
String - filename: the filename to create the URL from
 o formButton
 protected ImageButton formButton(URL i,
                                  int index)
formButton(): method to create a corresponding button for the mediaName

Parameters:
ImageIcon - i: the image icon for the button
int - index: the index of the button in the arrays
Returns:
ImageButton: the Image Button formed
 o formButton
 protected ImageButton formButton(int index)
formButton(): method to create a corresponding button for the mediaName

Parameters:
int - index: the index of the button in the arrays
Returns:
ImageButton: the Image Button formed
 o changeCurrentPlayer
 public void changeCurrentPlayer(JMFPlayer newPB,
                                 int num)
changeCurrentPlayer(): method to switch the current player to the new player selected

Parameters:
PlayerBean - newPB: the new player to be current
int - num: the index of the new player
 o isLooping
 public boolean isLooping()
isLooping(): method to check if players should loop

 o setLooping
 public void setLooping(boolean l)
setLooping(): method to set looping property

Parameters:
boolean - l: new value for looping property
 o isPanelVisible
 public boolean isPanelVisible()
isPanelVisible(): method to check property control panelVisible

 o setPanelVisible
 public void setPanelVisible(boolean val)
setPanelVisible(): method to set property panelVisible

Parameters:
boolean - val: new value for property panelVisible
 o isURLVisible
 public boolean isURLVisible()
isURLVisible(): method to check property URLVisible

 o setURLVisible
 public void setURLVisible(boolean val)
setURLVisible(): method to set property displayURL

Parameters:
boolean - val: new value for property displayURL
 o isFitVideo
 public boolean isFitVideo()
isFitVideo(): method to set fitVideo property

Returns:
boolean value for property fitVideo
 o setFitVideo
 public void setFitVideo(boolean f)
setFitVideo(): method to set property fitVideo

Parameters:
boolean - f: new value for property fitVideo
 o getLoadOnInit
 public boolean getLoadOnInit()
getLoadOnInit(): method to get property loadOnInit value

Returns:
boolean value for property loadOnInit
 o setLoadOnInit
 public void setLoadOnInit(boolean b)
setLoadOnInit(): method to set property loadOnInit

Parameters:
boolean - b: new value for property loadOnInit
 o moveUp
 public void moveUp(int index)
moveUp(): method to move a Media Group up the array and button panel

Parameters:
int - index: index of the Media Group to move up
 o moveDown
 public void moveDown(int index)
moveDown(): method to move Media Group down the array and button panel

Parameters:
int - index: the index of the Media Group in the array to move
 o addMGroup
 public void addMGroup(String mediaName,
                       String buttonGif)
addMGroup(): method to create a new Media Group and add it to the array of Media Groups

Parameters:
String - mediaName: the media clip URL value
String - buttonGif: the URL for the button image
 o deleteMGroup
 public void deleteMGroup(int i)
deleteMGroup(): method to delete a Media Group from the array of Media Groups and from the button panel

Parameters:
int - i: index of the Media Group in the array
 o replaceMGroup
 public void replaceMGroup(int i,
                           String mName,
                           String gName)
replaceMGroup(): method to replace a Media Group from the array of Media Groups and from the button panel

Parameters:
int - i: index of the Media Group in the array
 o addLink
 public boolean addLink(int index,
                        String l,
                        long start,
                        long end)
addLink(): method to add a new related link to a media group

Parameters:
int - index: index of the Media Group in the array
String - l: URL for the related link
long - start: start time of when this link is relevent
long - stop: stop time of when this link is relevent (0 means always relevent)
Returns:
boolean : true if the add was successful
 o setMGroups
 public void setMGroups(MediaGroup indexprop[])
setMGroups(): method to set index property mGroups

Parameters:
MediaGroup[] - indexprop: new value for index property mGroups
 o setMGroups
 public void setMGroups(int index,
                        MediaGroup indexprop)
setMGroups(): method to set an individual Media Group in the array mGroups

Parameters:
int - index: index of the Media Group to set in the array
MediaGroup - indexprop: new Media Group to be set
 o getMGroups
 public MediaGroup[] getMGroups()
getMGroups(): method to get the entire index property mGroups

Returns:
MediaGroup[] : array value for index property mGroups
 o getMGroups
 public MediaGroup getMGroups(int index)
getMGroups(): method to get a single Media Group from the index property mGroups

Parameters:
int - index: index of the Media Group to get from the array
Returns:
Media Group
 o setMediaNamesString
 public void setMediaNamesString(String mediaString)
setMediaNamesString() method to set the mediaNames string, parsing it into mediaNames

Parameters:
String - : "mediaName1,gifName1,mediaName2,gifName2,..."
 o setMediaNamesString
 public void setMediaNamesString(String mediaString,
                                 Object t)
 o getMediaNamesString
 public String getMediaNamesString()
getMediaNames() method to get the mediaNames string from mediaNames Array

Parameters:
String - : "mediaName1,gifName1,mediaName2,gifName2,..."
 o setLinksString
 public void setLinksString(String lString)
setLinks() method to set the links string, parsing it into linksArray

Parameters:
String - : "link1,start1,stop1,link2,..."
 o getLinksString
 public String getLinksString()
getLinks() method to get the links string from linksArray

Parameters:
String - : "link1,start1,stop1,link2,..."
 o setMediaNames
 public void setMediaNames(String indexprop[])
setMediaNames(): method to set index property mediaNames

Parameters:
String[] - indexprop: new value for index property mediaNames
 o setMediaNames
 public void setMediaNames(int index,
                           String indexprop)
setmediaNames(): method to set an individual Media Names in the array mediaNames

Parameters:
int - index: index of the Media Names to set in the array
String - indexprop: new Media Group to be set
 o getMediaNames
 public String[] getMediaNames()
getMediaNames(): method to get the entire index property mediaNames

Returns:
String[] : array value for index property mediaNames
 o getMediaNames
 public String getMediaNames(int index)
getMediaNames(): method to get a single Media Name from the index property mediaNames

Parameters:
int - index: index of the Media Name to get from the array
Returns:
Media Group
 o setLinks
 public void setLinks(String indexprop[])
setLinks(): method to set index property links

Parameters:
String[] - indexprop: new value for index property links
 o setLinks
 public void setLinks(int index,
                      String indexprop)
setLinks(): method to set an individual related link in the array links

Parameters:
int - index: index of the Links to set in the array
String - indexprop: new link to be set
 o getLinks
 public String[] getLinks()
getLinks(): method to get the entire index property links

Returns:
String[] : array value for index property links
 o getLinks
 public String getLinks(int index)
getlinks(): method to get a single links from the index property links

Parameters:
int - index: index of the links to get from the array
Returns:
links
 o setAppletContext
 public void setAppletContext(AppletContext ac)
setAppletContext(): method to set the AppletContext for this bean

Parameters:
AppletContext - ac: AppletContext that this bean is in.
 o setCodeBase
 public void setCodeBase(URL cb)
setCodeBase(): method to set the code base that this Bean is in

Parameters:
URL - cb: code base of the applet containing this bean
 o addControllerListener
 public void addControllerListener(ControllerListener listener)
addControllerListener(): method to add Controller Listeners to all the players

Parameters:
ControllerListener - listener: new listener to the players controllers
 o removeControllerListener
 public void removeControllerListener(ControllerListener listener)
removeControllerListener(): method to remove Controller Listeners from all the players

Parameters:
ControllerListener - listener: listener to remove
 o getNumberOfMediaGroups
 public int getNumberOfMediaGroups()
getNumberOfMediaGroups() returns the number of Media Groups

Returns:
int mg: number of media groups
 o setBounds
 public void setBounds(int x,
                       int y,
                       int w,
                       int h)
setBounds(): method to set the Bounds of the players

Parameters:
int - x: the upper left corner x value
int - y: the upper left corner y value
int - w: the width
int - h: the height
Overrides:
setBounds in class Component
 o getPreferredSize
 public Dimension getPreferredSize()
getPreferredSize(): method to get the preferred size for this bean

Returns:
Dimension
Overrides:
getPreferredSize in class Container
 o addPropertyChangeListener
 public void addPropertyChangeListener(PropertyChangeListener c)
addPropertyChangeListener(): method to add property change listener

Parameters:
PropertyChangeListener - c: new property change listener
 o removePropertyChangeListener
 public void removePropertyChangeListener(PropertyChangeListener c)
removePropertyChangeListener(): method to remove property change listener

Parameters:
PropertyChangeListener - c: property change listener to remove
 o doDebug
 protected void doDebug(String s)
doDebug(): simple method to print out trace info

Parameters:
String - s: string to be printed

All Packages  Class Hierarchy  This Package  Previous  Next  Index