Package com.tagtraum.beatunes
Class ITunesPlayerComponent
- java.lang.Object
-
- com.tagtraum.beatunes.ITunesPlayerComponent
-
- All Implemented Interfaces:
AudioPlayer,PlayListPlayer,ApplicationComponent<BeaTunes>
@Deprecated public class ITunesPlayerComponent extends Object implements ApplicationComponent<BeaTunes>, PlayListPlayer
Deprecated.ITunesPlayerComponent.- Author:
- Hendrik Schreiber
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.tagtraum.audiokern.PlayListPlayer
PlayListPlayer.RepeatMode, PlayListPlayer.ScanMode
-
-
Constructor Summary
Constructors Constructor Description ITunesPlayerComponent()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddAudioPlayerListener(AudioPlayerListener listener)Deprecated.voidaddPlayListPlayerInterceptor(PlayListPlayerInterceptor interceptor)Deprecated.Adds aPlayListPlayerInterceptor.voidaddPropertyChangeListener(PropertyChangeListener propertyChangeListener)Deprecated.voidaddPropertyChangeListener(String propertyName, PropertyChangeListener propertyChangeListener)Deprecated.voidclose()Deprecated.Closes the audio file and associated player resources.intcurrentIndex()Deprecated.Filtered index of the current song in the played list/component.voidfastForward()Deprecated.Plays the file forward at accelerated speed.BeaTunesgetApplication()Deprecated.Returns the main application component.AudioDevicegetAudioDevice()Deprecated.Current audio device.JComponentgetComponent()Deprecated.Main display component for the currently active playlist.longgetDuration()Deprecated.Duration of the song in ms.StringgetId()Deprecated.Unique id for each instance of this object.PlayListIterator<AudioSong>getIterator()Deprecated.Returns the currently used iterator.LonggetPlayListId()Deprecated.Persistent identifier of the current playlist, if available.PlayListPlayer.RepeatModegetRepeatMode()Deprecated.The current repeat mode.ReplayGain.TypegetReplayGainType()Deprecated.Currently configured type of replay gain.PlayListPlayer.ScanModegetScanMode()Deprecated.The current scan mode.AudioSonggetSong()Deprecated.Returns the currently opened song.longgetTime()Deprecated.Returns the current time in ms.floatgetVolume()Deprecated.Returns the volume.voidinit()Deprecated.Initializes this component and its sub-components.booleanisActive()Deprecated.Indicates whether this player is actually working.booleanisDone()Deprecated.True, if the song was played to the end.booleanisMuted()Deprecated.Indicates whether the player is muted.booleanisPaused()Deprecated.Indicates whether the song is currently playing.voidnext()Deprecated.Move to next song.voidopen(AudioSong song)Deprecated.Opens a song.voidopen(PlayListIterator<AudioSong> iterator)Deprecated.Open the song returned by the firstListIterator.next()call.voidpause()Deprecated.Stops playback.voidplay()Deprecated.Starts playback.voidplayPause()Deprecated.Starts playback, if song is paused, otherwise pauses playback.voidprevious()Deprecated.Move to previous song.voidremoveAudioPlayerListener(AudioPlayerListener listener)Deprecated.voidremovePlayListPlayerInterceptor(PlayListPlayerInterceptor interceptor)Deprecated.Removed aPlayListPlayerInterceptor.voidremovePropertyChangeListener(PropertyChangeListener propertyChangeListener)Deprecated.voidremovePropertyChangeListener(String propertyName, PropertyChangeListener propertyChangeListener)Deprecated.voidreset()Deprecated.Positions the player at the beginning of the file.voidsetActive(boolean active)Deprecated.Activates the player.voidsetApplication(BeaTunes application)Deprecated.Sets the main application component.voidsetAudioDevice(AudioDevice audioDevice)Deprecated.Sets the desired audio device.voidsetMuted(boolean muted)Deprecated.Un/mutes this player.voidsetRepeatMode(PlayListPlayer.RepeatMode mode)Deprecated.Sets the current repeat mode.voidsetReplayGainType(ReplayGain.Type type)Deprecated.Asks the player to respect the given kind of replay gain.voidsetScanMode(PlayListPlayer.ScanMode mode)Deprecated.Sets a new scan mode.voidsetTime(long time)Deprecated.Sets the current time in ms.voidsetVolume(float volume)Deprecated.Changes the volume.voidshutdown()Deprecated.Shuts down this component and its sub-components.
-
-
-
Method Detail
-
getId
public String getId()
Deprecated.Description copied from interface:ApplicationComponentUnique id for each instance of this object.- Specified by:
getIdin interfaceApplicationComponent<BeaTunes>- Returns:
- id
-
getApplication
public BeaTunes getApplication()
Deprecated.Description copied from interface:ApplicationComponentReturns the main application component.- Specified by:
getApplicationin interfaceApplicationComponent<BeaTunes>- Returns:
- application object
-
setApplication
public void setApplication(BeaTunes application)
Deprecated.Description copied from interface:ApplicationComponentSets the main application component.- Specified by:
setApplicationin interfaceApplicationComponent<BeaTunes>- Parameters:
application- main application component
-
addPlayListPlayerInterceptor
public void addPlayListPlayerInterceptor(PlayListPlayerInterceptor interceptor)
Deprecated.Description copied from interface:PlayListPlayerAdds aPlayListPlayerInterceptor.- Specified by:
addPlayListPlayerInterceptorin interfacePlayListPlayer- Parameters:
interceptor- interceptor
-
removePlayListPlayerInterceptor
public void removePlayListPlayerInterceptor(PlayListPlayerInterceptor interceptor)
Deprecated.Description copied from interface:PlayListPlayerRemoved aPlayListPlayerInterceptor.- Specified by:
removePlayListPlayerInterceptorin interfacePlayListPlayer- Parameters:
interceptor- interceptor
-
setActive
public void setActive(boolean active)
Deprecated.Activates the player. While active the player uses resources like timers to do its work. Don't activate unless you are actually using it.- Parameters:
active- active
-
isActive
public boolean isActive()
Deprecated.Indicates whether this player is actually working.- Returns:
- active or not
-
init
public void init()
Deprecated.Description copied from interface:ApplicationComponentInitializes this component and its sub-components.- Specified by:
initin interfaceApplicationComponent<BeaTunes>
-
shutdown
public void shutdown() throws ShutdownVetoExceptionDeprecated.Description copied from interface:ApplicationComponentShuts down this component and its sub-components.- Specified by:
shutdownin interfaceApplicationComponent<BeaTunes>- Throws:
ShutdownVetoException- if this component wants to veto the shutdown. This exception is not guaranteed to be honored, i.e. a calling component may simply ignore it
-
setAudioDevice
public void setAudioDevice(AudioDevice audioDevice) throws IllegalArgumentException
Deprecated.Description copied from interface:AudioPlayerSets the desired audio device.- Specified by:
setAudioDevicein interfaceAudioPlayer- Parameters:
audioDevice- audio device- Throws:
IllegalArgumentException- if the device is not supported
-
getAudioDevice
public AudioDevice getAudioDevice()
Deprecated.Description copied from interface:AudioPlayerCurrent audio device.- Specified by:
getAudioDevicein interfaceAudioPlayer- Returns:
- currently used audio device
-
next
public void next()
Deprecated.Description copied from interface:PlayListPlayerMove to next song. If playback was active, keep on playing.- Specified by:
nextin interfacePlayListPlayer
-
previous
public void previous()
Deprecated.Description copied from interface:PlayListPlayerMove to previous song. If playback was active, keep on playing.- Specified by:
previousin interfacePlayListPlayer
-
open
public void open(PlayListIterator<AudioSong> iterator) throws IOException
Deprecated.Description copied from interface:PlayListPlayerOpen the song returned by the firstListIterator.next()call. If playback was active, keep on playing.- Specified by:
openin interfacePlayListPlayer- Throws:
IOException- if the first song (obtained throughListIterator.next()) cannot be opened- See Also:
AudioPlayer.open(AudioSong)
-
getIterator
public PlayListIterator<AudioSong> getIterator()
Deprecated.Description copied from interface:PlayListPlayerReturns the currently used iterator.- Specified by:
getIteratorin interfacePlayListPlayer- Returns:
- iterator
-
getPlayListId
public Long getPlayListId()
Deprecated.Description copied from interface:PlayListPlayerPersistent identifier of the current playlist, if available.- Specified by:
getPlayListIdin interfacePlayListPlayer- Returns:
- id or null, if not available.
-
getComponent
public JComponent getComponent()
Deprecated.Description copied from interface:PlayListPlayerMain display component for the currently active playlist.- Specified by:
getComponentin interfacePlayListPlayer- Returns:
- main display component for the currently active playlist
-
currentIndex
public int currentIndex()
Deprecated.Description copied from interface:PlayListPlayerFiltered index of the current song in the played list/component. This index may change dynamically, as the view of the list is filtered or sorted.- Specified by:
currentIndexin interfacePlayListPlayer- Returns:
- index
-
getSong
public AudioSong getSong()
Deprecated.Description copied from interface:AudioPlayerReturns the currently opened song.- Specified by:
getSongin interfaceAudioPlayer- Returns:
- currently opened song
-
open
public void open(AudioSong song) throws IOException
Deprecated.Description copied from interface:AudioPlayerOpens a song.
Calling this method withnullas argument has the same effect as callingAudioPlayer.close().- Specified by:
openin interfaceAudioPlayer- Parameters:
song- song- Throws:
IOException- if the song cannot be opened
-
play
public void play()
Deprecated.Description copied from interface:AudioPlayerStarts playback.- Specified by:
playin interfaceAudioPlayer
-
pause
public void pause()
Deprecated.Description copied from interface:AudioPlayerStops playback.- Specified by:
pausein interfaceAudioPlayer
-
playPause
public void playPause()
Deprecated.Description copied from interface:AudioPlayerStarts playback, if song is paused, otherwise pauses playback.- Specified by:
playPausein interfaceAudioPlayer
-
fastForward
public void fastForward()
Deprecated.Description copied from interface:AudioPlayerPlays the file forward at accelerated speed.- Specified by:
fastForwardin interfaceAudioPlayer
-
close
public void close()
Deprecated.Description copied from interface:AudioPlayerCloses the audio file and associated player resources.- Specified by:
closein interfaceAudioPlayer
-
reset
public void reset()
Deprecated.Description copied from interface:AudioPlayerPositions the player at the beginning of the file. Equivalent to callingAudioPlayer.setTime(long)with 0 as argument.- Specified by:
resetin interfaceAudioPlayer- See Also:
AudioPlayer.setTime(long)
-
getTime
public long getTime()
Deprecated.Description copied from interface:AudioPlayerReturns the current time in ms.- Specified by:
getTimein interfaceAudioPlayer- Returns:
- current time in ms
-
setTime
public void setTime(long time) throws IllegalArgumentExceptionDeprecated.Description copied from interface:AudioPlayerSets the current time in ms.- Specified by:
setTimein interfaceAudioPlayer- Parameters:
time- time in ms- Throws:
IllegalArgumentException- if the time is not valid because it is either less than 0 or greater than duration- See Also:
AudioPlayer.reset(),AudioPlayer.getDuration()
-
getDuration
public long getDuration()
Deprecated.Description copied from interface:AudioPlayerDuration of the song in ms.- Specified by:
getDurationin interfaceAudioPlayer- Returns:
- the overall duration of the song in ms.
-
isDone
public boolean isDone()
Deprecated.Description copied from interface:AudioPlayerTrue, if the song was played to the end.- Specified by:
isDonein interfaceAudioPlayer- Returns:
- true if the song was played to the end.
-
isPaused
public boolean isPaused()
Deprecated.Description copied from interface:AudioPlayerIndicates whether the song is currently playing.- Specified by:
isPausedin interfaceAudioPlayer- Returns:
- false if the song is playing
-
getVolume
public float getVolume()
Deprecated.Description copied from interface:AudioPlayerReturns the volume.- Specified by:
getVolumein interfaceAudioPlayer- Returns:
- value between -1 and 1, negative values equating to silence
-
setVolume
public void setVolume(float volume) throws IllegalArgumentExceptionDeprecated.Description copied from interface:AudioPlayerChanges the volume.- Specified by:
setVolumein interfaceAudioPlayer- Parameters:
volume- value between -1 and 1, negative values equating to silence. A volume value outside the valid range will lead to an IllegalArgumentException- Throws:
IllegalArgumentException- if the value is outside the valid range
-
setMuted
public void setMuted(boolean muted)
Deprecated.Description copied from interface:AudioPlayerUn/mutes this player.- Specified by:
setMutedin interfaceAudioPlayer- Parameters:
muted- muted
-
isMuted
public boolean isMuted()
Deprecated.Description copied from interface:AudioPlayerIndicates whether the player is muted.- Specified by:
isMutedin interfaceAudioPlayer- Returns:
- true to false
-
setReplayGainType
public void setReplayGainType(ReplayGain.Type type)
Deprecated.Description copied from interface:AudioPlayerAsks the player to respect the given kind of replay gain. Some players may ignore this property.- Specified by:
setReplayGainTypein interfaceAudioPlayer- Parameters:
type- type
-
getReplayGainType
public ReplayGain.Type getReplayGainType()
Deprecated.Description copied from interface:AudioPlayerCurrently configured type of replay gain.- Specified by:
getReplayGainTypein interfaceAudioPlayer- Returns:
- replay gain type
-
setRepeatMode
public void setRepeatMode(PlayListPlayer.RepeatMode mode)
Deprecated.Description copied from interface:PlayListPlayerSets the current repeat mode.- Specified by:
setRepeatModein interfacePlayListPlayer- Parameters:
mode- mode
-
getRepeatMode
public PlayListPlayer.RepeatMode getRepeatMode()
Deprecated.Description copied from interface:PlayListPlayerThe current repeat mode.- Specified by:
getRepeatModein interfacePlayListPlayer- Returns:
- current repeat mode
-
setScanMode
public void setScanMode(PlayListPlayer.ScanMode mode)
Deprecated.Description copied from interface:PlayListPlayerSets a new scan mode.- Specified by:
setScanModein interfacePlayListPlayer- Parameters:
mode- scan mode
-
getScanMode
public PlayListPlayer.ScanMode getScanMode()
Deprecated.Description copied from interface:PlayListPlayerThe current scan mode.- Specified by:
getScanModein interfacePlayListPlayer- Returns:
- current scan mode
-
addPropertyChangeListener
public void addPropertyChangeListener(String propertyName, PropertyChangeListener propertyChangeListener)
Deprecated.- Specified by:
addPropertyChangeListenerin interfaceAudioPlayer
-
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener propertyChangeListener)
Deprecated.- Specified by:
removePropertyChangeListenerin interfaceAudioPlayer
-
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener propertyChangeListener)
Deprecated.- Specified by:
addPropertyChangeListenerin interfaceAudioPlayer
-
removePropertyChangeListener
public void removePropertyChangeListener(String propertyName, PropertyChangeListener propertyChangeListener)
Deprecated.- Specified by:
removePropertyChangeListenerin interfaceAudioPlayer
-
addAudioPlayerListener
public void addAudioPlayerListener(AudioPlayerListener listener)
Deprecated.- Specified by:
addAudioPlayerListenerin interfaceAudioPlayer
-
removeAudioPlayerListener
public void removeAudioPlayerListener(AudioPlayerListener listener)
Deprecated.- Specified by:
removeAudioPlayerListenerin interfaceAudioPlayer
-
-