Class PlaySelectedAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- com.tagtraum.core.app.ApplicationAction
-
- com.tagtraum.beatunes.action.BaseAction
-
- com.tagtraum.beatunes.action.player.PlaySelectedAction
-
- All Implemented Interfaces:
ApplicationComponent<BeaTunes>,ActionListener,Serializable,Cloneable,EventListener,Action
- Direct Known Subclasses:
PeekSelectedAction
public class PlaySelectedAction extends BaseAction
Sets the selected playlist/song as current song in the player and starts playing it.- Author:
- Hendrik Schreiber
- See Also:
InternalPlayer, Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.tagtraum.beatunes.action.BaseAction
BaseAction.EnabledView, BaseAction.Location, BaseAction.SelectionCount
-
Nested classes/interfaces inherited from class com.tagtraum.core.app.ApplicationAction
ApplicationAction.ApplicationActionFacade
-
-
Field Summary
Fields Modifier and Type Field Description protected SymbolOverlayplayPauseOverlay-
Fields inherited from class com.tagtraum.beatunes.action.BaseAction
ITEMS_EDITABLE
-
Fields inherited from class com.tagtraum.core.app.ApplicationAction
BUTTON_MODEL, DISABLED_ICON, DISABLED_SELECTED_ICON, PRESSED_ICON, ROLLOVER_ICON, SELECTED_ICON, SHORT_NAME
-
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
-
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
-
-
Constructor Summary
Constructors Constructor Description PlaySelectedAction(BeaTunes beaTunes)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(ActionEvent e)StringgetId()Returns a unique id for this action.voidinit()Initializes this action.protected voidloadResources()Loads all resources that may change due to display resolution or theme change.voidplay(PlayListIterator<AudioSong> iterator)protected voidpreOpen(PlayListPlayer player)Is called beforePlayListPlayer.open(com.tagtraum.audiokern.PlayListIterator).
Default impl.protected voidpreProcess(AudioSong song)Is called before the song is opened by the player.
Default impl.protected voidsetStartTime(PlayListPlayer player)Is called beforeAudioPlayer.play().
Default impl.static voidshowOpenSongErrorMessage(RemoteICloudSongException e, BeaTunes application)static voidshowOpenSongErrorMessage(FileNotFoundException e, BeaTunes application)static voidshowOpenSongErrorMessage(Exception e, BeaTunes application)-
Methods inherited from class com.tagtraum.beatunes.action.BaseAction
bindListeners, bindListeners, getApplication, getFocusedPlayList, getFocusOwner, getMostRecentlyFocused, getPlayListTreeNode, getSelectedPlayList, getSelectedPlayListTreeNode, getSelectedSong, getSelectedSongCount, getSelectedSongIds, getSelectedSongs, getSelectedSongs, isAnalysisQueueFocused, isMatchTableFocused, isPlayListTreeFocused, isSimpleSongTableFocused, isSongTableFocused, numberOfSelectedSongs, numberOfSelectedSongs, setApplication, shutdown
-
Methods inherited from class com.tagtraum.core.app.ApplicationAction
getActionLocations, getButtonModel, getIconButtonFacade, getMenuFacade, getToolbarButtonFacade, isVisible, register, setButtonModel, setVisible
-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Field Detail
-
playPauseOverlay
protected SymbolOverlay playPauseOverlay
-
-
Constructor Detail
-
PlaySelectedAction
public PlaySelectedAction(BeaTunes beaTunes)
-
-
Method Detail
-
init
public void init()
Description copied from class:BaseActionInitializes this action. This method is called byActionManager.init(), after all components are instantiated and set up. The default implementation is empty.- Specified by:
initin interfaceApplicationComponent<BeaTunes>- Overrides:
initin classBaseAction
-
loadResources
protected void loadResources()
Description copied from class:BaseActionLoads all resources that may change due to display resolution or theme change. The default implementation is empty.- Overrides:
loadResourcesin classBaseAction
-
getId
public String getId()
Description copied from class:ApplicationActionReturns a unique id for this action. Typically follows thex.y.znotation from general to specific.- Specified by:
getIdin interfaceApplicationComponent<BeaTunes>- Specified by:
getIdin classApplicationAction- Returns:
- unique id for this action
-
actionPerformed
public void actionPerformed(ActionEvent e)
-
play
public void play(PlayListIterator<AudioSong> iterator)
-
preOpen
protected void preOpen(PlayListPlayer player)
Is called beforePlayListPlayer.open(com.tagtraum.audiokern.PlayListIterator).
Default impl. does nothing.- Parameters:
player- player
-
setStartTime
protected void setStartTime(PlayListPlayer player)
Is called beforeAudioPlayer.play().
Default impl. does nothing.- Parameters:
player- player
-
preProcess
protected void preProcess(AudioSong song)
Is called before the song is opened by the player.
Default impl. increases metric counter.- Parameters:
song- first song to be played
-
showOpenSongErrorMessage
public static void showOpenSongErrorMessage(RemoteICloudSongException e, BeaTunes application)
-
showOpenSongErrorMessage
public static void showOpenSongErrorMessage(FileNotFoundException e, BeaTunes application)
-
-