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
-
buttonPanel
-
-
gifPanel
-
-
infoButton
-
-
numOfMGroups
-
-
scrollGif
-
-
utilPanel
-
-
videoPanel
-
-
MultiPlayerBean()
-
MultiPlayerBean():
The default constructor is to create the transient variables.
-
actionPerformed(ActionEvent)
-
actionPerformed():
This actionPerformed method must be defined in
order to implement the java.media.ActionListener interface.
-
addControllerListener(ControllerListener)
-
addControllerListener():
method to add Controller Listeners to all the players
-
addLink(int, String, long, long)
-
addLink():
method to add a new related link to a media group
-
addMGroup(String, String)
-
addMGroup():
method to create a new Media Group and
add it to the array of Media Groups
-
addPropertyChangeListener(PropertyChangeListener)
-
addPropertyChangeListener():
method to add property change listener
-
changeCurrentPlayer(JMFPlayer, int)
-
changeCurrentPlayer():
method to switch the current player to the new player selected
-
controllerUpdate(ControllerEvent)
-
controllerUpdate():
This controllerUpdate function must be defined in
order to implement the java.media.ControllerListener interface.
-
deleteMGroup(int)
-
deleteMGroup():
method to delete a Media Group from the array of Media Groups
and from the button panel
-
destroy()
-
destroy():
stop the vector of players, close the players, and release resources.
-
doDebug(String)
-
doDebug():
simple method to print out trace info
-
formButton(int)
-
formButton():
method to create a corresponding button for the mediaName
-
formButton(URL, int)
-
formButton():
method to create a corresponding button for the mediaName
-
getLinks()
-
getLinks():
method to get the entire index property links
-
getLinks(int)
-
getlinks():
method to get a single links from the index property links
-
getLinksString()
- getLinks()
method to get the links string from
linksArray
-
getLoadOnInit()
-
getLoadOnInit():
method to get property loadOnInit value
-
getMediaNames()
-
getMediaNames():
method to get the entire index property mediaNames
-
getMediaNames(int)
-
getMediaNames():
method to get a single Media Name from the index property mediaNames
-
getMediaNamesString()
- getMediaNames()
method to get the mediaNames string from
mediaNames Array
-
getMGroups()
-
getMGroups():
method to get the entire index property mGroups
-
getMGroups(int)
-
getMGroups():
method to get a single Media Group from the index property mGroups
-
getNumberOfMediaGroups()
- getNumberOfMediaGroups()
returns the number of Media Groups
-
getPreferredSize()
-
getPreferredSize():
method to get the preferred size for this bean
-
getURL(String)
-
getURL():
method to get the proper URL
-
isFitVideo()
-
isFitVideo():
method to set fitVideo property
-
isLooping()
-
isLooping():
method to check if players should loop
-
isPanelVisible()
-
isPanelVisible():
method to check property control panelVisible
-
isURLVisible()
-
isURLVisible():
method to check property URLVisible
-
moveDown(int)
-
moveDown():
method to move Media Group down the array
and button panel
-
moveUp(int)
-
moveUp():
method to move a Media Group up the array and
button panel
-
removeControllerListener(ControllerListener)
-
removeControllerListener():
method to remove Controller Listeners from all the players
-
removePropertyChangeListener(PropertyChangeListener)
-
removePropertyChangeListener():
method to remove property change listener
-
replaceMGroup(int, String, String)
-
replaceMGroup():
method to replace a Media Group from the array of Media Groups
and from the button panel
-
setAppletContext(AppletContext)
-
setAppletContext():
method to set the AppletContext for this bean
-
setBounds(int, int, int, int)
-
setBounds():
method to set the Bounds of the players
-
setCodeBase(URL)
-
setCodeBase():
method to set the code base that this Bean is in
-
setFitVideo(boolean)
-
setFitVideo():
method to set property fitVideo
-
setLinks(int, String)
-
setLinks():
method to set an individual related link in the array links
-
setLinks(String[])
-
setLinks():
method to set index property links
-
setLinksString(String)
- setLinks()
method to set the links string, parsing it into
linksArray
-
setLoadOnInit(boolean)
-
setLoadOnInit():
method to set property loadOnInit
-
setLooping(boolean)
-
setLooping():
method to set looping property
-
setMediaNames(int, String)
-
setmediaNames():
method to set an individual Media Names in the array mediaNames
-
setMediaNames(String[])
-
setMediaNames():
method to set index property mediaNames
-
setMediaNamesString(String)
- setMediaNamesString()
method to set the mediaNames string, parsing it into
mediaNames
-
setMediaNamesString(String, Object)
-
-
setMGroups(int, MediaGroup)
-
setMGroups():
method to set an individual Media Group in the array mGroups
-
setMGroups(MediaGroup[])
-
setMGroups():
method to set index property mGroups
-
setPanelVisible(boolean)
-
setPanelVisible():
method to set property panelVisible
-
setURLVisible(boolean)
-
setURLVisible():
method to set property displayURL
-
start()
-
start():
used to check the list of media clips and instantiate players
and buttons.
-
stop()
-
stop():
stop the array media groups and release resources.
buttonPanel
transient Panel buttonPanel
gifPanel
transient Panel gifPanel
scrollGif
transient ScrollPane scrollGif
utilPanel
transient Panel utilPanel
videoPanel
transient Panel videoPanel
infoButton
transient Button infoButton
numOfMGroups
protected int numOfMGroups
MultiPlayerBean
public MultiPlayerBean()
- MultiPlayerBean():
The default constructor is to create the transient variables.
Panels, buttons. And to initialize the other variables.
start
public void start()
- start():
used to check the list of media clips and instantiate players
and buttons. And to start the first player.
stop
public void stop()
- stop():
stop the array media groups and release resources.
destroy
public void destroy()
- destroy():
stop the vector of players, close the players, and release resources.
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
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
getURL
protected URL getURL(String filename)
- getURL():
method to get the proper URL
- Parameters:
- String - filename: the filename to create the URL from
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
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
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
isLooping
public boolean isLooping()
- isLooping():
method to check if players should loop
setLooping
public void setLooping(boolean l)
- setLooping():
method to set looping property
- Parameters:
- boolean - l: new value for looping property
isPanelVisible
public boolean isPanelVisible()
- isPanelVisible():
method to check property control panelVisible
setPanelVisible
public void setPanelVisible(boolean val)
- setPanelVisible():
method to set property panelVisible
- Parameters:
- boolean - val: new value for property panelVisible
isURLVisible
public boolean isURLVisible()
- isURLVisible():
method to check property URLVisible
setURLVisible
public void setURLVisible(boolean val)
- setURLVisible():
method to set property displayURL
- Parameters:
- boolean - val: new value for property displayURL
isFitVideo
public boolean isFitVideo()
- isFitVideo():
method to set fitVideo property
- Returns:
- boolean value for property fitVideo
setFitVideo
public void setFitVideo(boolean f)
- setFitVideo():
method to set property fitVideo
- Parameters:
- boolean - f: new value for property fitVideo
getLoadOnInit
public boolean getLoadOnInit()
- getLoadOnInit():
method to get property loadOnInit value
- Returns:
- boolean value for property loadOnInit
setLoadOnInit
public void setLoadOnInit(boolean b)
- setLoadOnInit():
method to set property loadOnInit
- Parameters:
- boolean - b: new value for property loadOnInit
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
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
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
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
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
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
setMGroups
public void setMGroups(MediaGroup indexprop[])
- setMGroups():
method to set index property mGroups
- Parameters:
- MediaGroup[] - indexprop: new value for index property mGroups
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
getMGroups
public MediaGroup[] getMGroups()
- getMGroups():
method to get the entire index property mGroups
- Returns:
- MediaGroup[] : array value for index property mGroups
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
setMediaNamesString
public void setMediaNamesString(String mediaString)
- setMediaNamesString()
method to set the mediaNames string, parsing it into
mediaNames
- Parameters:
- String - : "mediaName1,gifName1,mediaName2,gifName2,..."
setMediaNamesString
public void setMediaNamesString(String mediaString,
Object t)
getMediaNamesString
public String getMediaNamesString()
- getMediaNames()
method to get the mediaNames string from
mediaNames Array
- Parameters:
- String - : "mediaName1,gifName1,mediaName2,gifName2,..."
setLinksString
public void setLinksString(String lString)
- setLinks()
method to set the links string, parsing it into
linksArray
- Parameters:
- String - : "link1,start1,stop1,link2,..."
getLinksString
public String getLinksString()
- getLinks()
method to get the links string from
linksArray
- Parameters:
- String - : "link1,start1,stop1,link2,..."
setMediaNames
public void setMediaNames(String indexprop[])
- setMediaNames():
method to set index property mediaNames
- Parameters:
- String[] - indexprop: new value for index property mediaNames
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
getMediaNames
public String[] getMediaNames()
- getMediaNames():
method to get the entire index property mediaNames
- Returns:
- String[] : array value for index property mediaNames
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
setLinks
public void setLinks(String indexprop[])
- setLinks():
method to set index property links
- Parameters:
- String[] - indexprop: new value for index property links
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
getLinks
public String[] getLinks()
- getLinks():
method to get the entire index property links
- Returns:
- String[] : array value for index property links
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
setAppletContext
public void setAppletContext(AppletContext ac)
- setAppletContext():
method to set the AppletContext for this bean
- Parameters:
- AppletContext - ac: AppletContext that this bean is in.
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
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
removeControllerListener
public void removeControllerListener(ControllerListener listener)
- removeControllerListener():
method to remove Controller Listeners from all the players
- Parameters:
- ControllerListener - listener: listener to remove
getNumberOfMediaGroups
public int getNumberOfMediaGroups()
- getNumberOfMediaGroups()
returns the number of Media Groups
- Returns:
- int mg: number of media groups
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
getPreferredSize
public Dimension getPreferredSize()
- getPreferredSize():
method to get the preferred size for this bean
- Returns:
- Dimension
- Overrides:
- getPreferredSize in class Container
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener c)
- addPropertyChangeListener():
method to add property change listener
- Parameters:
- PropertyChangeListener - c: new property change listener
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener c)
- removePropertyChangeListener():
method to remove property change listener
- Parameters:
- PropertyChangeListener - c: property change listener to remove
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