Package g3.project.playable
Class PlayerFactory
- java.lang.Object
-
- g3.project.playable.PlayerFactory
-
public final class PlayerFactory extends java.lang.Object
- Author:
- Group 3
-
-
Constructor Summary
Constructors Constructor Description PlayerFactory()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
free(Player pl)
Free a player object's native resources.void
freeAll()
Close all players and free resources.Player
newPlayer()
Make a new player.Player
newPlayer(java.lang.Double width, java.lang.Double height)
Get a new player.
-
-
-
Field Detail
-
playerMap
protected java.util.Map<java.lang.Integer,Player> playerMap
Created Players.
-
factory
protected uk.co.caprica.vlcj.factory.MediaPlayerFactory factory
Player Factory.
-
-
Method Detail
-
newPlayer
public Player newPlayer()
Make a new player.- Returns:
- Player.
-
newPlayer
public Player newPlayer(java.lang.Double width, java.lang.Double height)
Get a new player.- Parameters:
width
- Player target width.height
- Player target height.- Returns:
- player.
-
freeAll
public void freeAll()
Close all players and free resources.
-
free
public void free(Player pl) throws java.lang.IllegalStateException
Free a player object's native resources.- Parameters:
pl
- player to free.- Throws:
java.lang.IllegalStateException
- Couldn't find player in my map.
-
-