Class BaseAction

    • Constructor Detail

      • BaseAction

        protected BaseAction()
      • BaseAction

        public BaseAction​(BeaTunes application)
        Parameters:
        application - beaTunes
    • Method Detail

      • getMostRecentlyFocused

        public static JComponent getMostRecentlyFocused​(Class<? extends JComponent>... klass)
        Search the recently focused component list for objects of the given types.
        Parameters:
        klass - classes
        Returns:
        the most recently focused component of the given types.
      • loadResources

        protected void loadResources()
        Loads all resources that may change due to display resolution or theme change. The default implementation is empty.
      • bindListeners

        public void bindListeners​(Predicate<JTable> predicate,
                                  BaseAction.EnabledView... enabledViews)
        Adds the appropriate UI triggers to this action.
        Parameters:
        predicate - predicate
        enabledViews - enabledViews
      • bindListeners

        public void bindListeners​(Predicate<JTable> predicate,
                                  Set<BaseAction.EnabledView> enabledViews)
        Adds the appropriate UI triggers to this action.
        Parameters:
        predicate - predicate
        enabledViews - enabledViews
      • getFocusOwner

        public JComponent getFocusOwner()
        Returns:
        JComponent with the focus after the latest focus change
      • getSelectedSong

        public AudioSong getSelectedSong()
        Returns the song currently selected in the focused table.
        Returns:
        song or null
      • getSelectedSongs

        public Iterable<AudioSong> getSelectedSongs()
        Deprecated.
        Retrieves the currently selected songs (any main table or playlist).
        Returns:
        currently selected songs
      • getSelectedSongs

        public Iterable<AudioSong> getSelectedSongs​(JComponent component)
        Deprecated.
        Retrieves the currently selected songs from any main table or playlist.
        Returns:
        currently selected songs
      • getSelectedSongCount

        public int getSelectedSongCount()
        Returns:
        currently selected songs
      • getSelectedSongIds

        public long[] getSelectedSongIds()
        Ids of currently selected songs (from any main table or playlist).
        Returns:
        currently selected song ids.
      • getSelectedPlayList

        public PlayList getSelectedPlayList()
        Returns the playlist selected in the tree view whether the tree view has the focus or not
        Returns:
        currently selected playlist
      • getFocusedPlayList

        public PlayList getFocusedPlayList()
        Returns the playlist selected AND focused in the tree view.
        Returns:
        currently AND focused selected playlist - if the treeview is not focused, null is returned.
      • isSongTableFocused

        public boolean isSongTableFocused()
        Returns:
        true if the song table has the focus.
      • isAnalysisQueueFocused

        public boolean isAnalysisQueueFocused()
        Returns:
        true if the analsyis queue table has the focus.
      • isSimpleSongTableFocused

        public boolean isSimpleSongTableFocused()
        Returns:
        true if a simple song table has the focus.
      • isMatchTableFocused

        public boolean isMatchTableFocused()
        Returns:
        true if the match table has the focus.
      • isPlayListTreeFocused

        public boolean isPlayListTreeFocused()
        Returns:
        true if the playlist tree view has the focus.