Class AnalysisQueue

    • Constructor Detail

      • AnalysisQueue

        public AnalysisQueue​(BeaTunes application)
        Parameters:
        application - beatunes
    • Method Detail

      • addSongFilter

        public void addSongFilter​(SongFilter songFilter)
        Parameters:
        songFilter - songfilter
      • removeSongFilter

        public void removeSongFilter​(SongFilter songFilter)
        Parameters:
        songFilter - songfilter
      • getIcon

        public Icon getIcon()
      • getAnimatedIcon

        public Icon getAnimatedIcon()
      • setAnimatedIcon

        public void setAnimatedIcon​(Icon animatedIcon)
      • isEmpty

        public boolean isEmpty()
        Returns:
        true if the queue is empty
      • getSize

        public int getSize()
        Returns:
        size/length of the queue
      • getCurrentlyAnalyzedTasks

        public List<Task> getCurrentlyAnalyzedTasks()
      • addPropertyChangeListener

        public void addPropertyChangeListener​(String propertyName,
                                              PropertyChangeListener propertyChangeListener)
      • getComponent

        public JComponent getComponent()
        Description copied from interface: View
        The actual visual component for this view.
        Specified by:
        getComponent in interface View
        Returns:
        detail component
      • getFocusRoot

        public JComponent getFocusRoot()
        Description copied from interface: View
        The component that should be focused by default, when view is shown.
        Specified by:
        getFocusRoot in interface View
        Returns:
        component
      • isIndeterminateProgress

        public boolean isIndeterminateProgress()
        Description copied from interface: DetailView
        Indicates that the current status is an operation with indeterminate progress which should be reflected in the rendering of the status bar.
        Specified by:
        isIndeterminateProgress in interface DetailView
        Returns:
        true if an indeterminate progress indicator is supposed to be rendered
      • offer

        public void offer​(PlayList playlist,
                          TaskFactory taskFactory,
                          boolean filterTasks,
                          Runnable... runAfterOfferComplete)
        Offer a playlist to the queue. Tasks that are already in the queue will not be added a second time.
        Parameters:
        playlist - the playlist to add.
        taskFactory - factory for creating tasks for each song
        filterTasks - filter the songs before adding corresponding tasks to the queue.
      • offer

        public void offer​(Iterable<AudioSong> songs,
                          TaskFactory taskFactory,
                          boolean filterTasks,
                          Runnable... runAfterOfferComplete)
        Offer an Iterable of songs to the queue (asynchronously). Tasks that are already in the queue will not be added a second time.
        Parameters:
        songs - the songs to add.
        taskFactory - factory for creating tasks for each song
        filterTasks - filter tasks with this queue's filters
        runAfterOfferComplete - code to run after the offering is completed.
      • offer

        public void offer​(long[] songIds,
                          TaskFactory taskFactory,
                          Runnable... runAfterOfferComplete)
        Offer song ids to the queue (asynchronously). Tasks that are already in the queue will not be added a second time. The songs are not filtered like it is possible in offer(Iterable, TaskFactory, boolean, Runnable...).
        Parameters:
        songIds - the songs to add.
        taskFactory - factory for creating tasks for each song
      • clear

        public void clear()
        Clear the queue.
      • cancel

        public void cancel​(Task[] tasks)
        Cancel multiple tasks.
        Parameters:
        tasks - tasks
      • cancel

        public void cancel​(Task task)
        Cancel a task. Use cancel(Task[]) for multiple tasks.
        Parameters:
        task - task to cancel
      • isPaused

        public boolean isPaused()
      • setPaused

        public void setPaused​(boolean paused)
        Toggles pausing the processing of this queue.
        Parameters:
        paused - true or false
      • initializeTask

        public void initializeTask​(Task task)
      • getSongIdsForTasksUsingOnlineResources

        public List<Long> getSongIdsForTasksUsingOnlineResources()
      • startReferenceSongLookupJob

        public void startReferenceSongLookupJob​(List<Long> ids)
      • removeEndedReferenceSongLookupJobs

        public void removeEndedReferenceSongLookupJobs()
      • willOrHasBeenBeLookedUp

        public boolean willOrHasBeenBeLookedUp​(long id)
      • fireAnalysisDone

        public void fireAnalysisDone​(Task task)
      • fireAnalysisStarted

        public void fireAnalysisStarted​(Task task)
      • fireSongSuccessfullyAnalyzed

        public void fireSongSuccessfullyAnalyzed​(Task task)
      • getLabel

        public String getLabel()
      • removePropertyChangeListener

        public void removePropertyChangeListener​(String name,
                                                 PropertyChangeListener analysisQueueLabelListener)
      • $$$getRootComponent$$$

        public JComponent $$$getRootComponent$$$()