Class SongTable

    • Constructor Detail

      • SongTable

        public SongTable​(MainWindow mainWindow)
        Creates the main song table.
        Parameters:
        mainWindow - main window
    • Method Detail

      • getSyncButtonModel

        public ButtonModel getSyncButtonModel()
      • getSyncTempoModel

        public SpinnerModel getSyncTempoModel()
      • startEditingPlaylistName

        public void startEditingPlaylistName()
        Start editing of the playlist's name.
      • $$$getRootComponent$$$

        public JComponent $$$getRootComponent$$$()
      • 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
      • registerDoubleClick

        public void registerDoubleClick​(String actionId)
        Registers the id of the action to execute upon a double click.
        Parameters:
        actionId - action id
      • getSongContextComponent

        public JComponent getSongContextComponent()
        Returns currently selected song context component.
        Returns:
        song context component
      • setSongContextComponent

        public void setSongContextComponent​(JComponent component)
        Parameters:
        component - component
      • getSongContextPanel

        public JPanel getSongContextPanel()
        Returns the actual song context panel. To get the corresponding button panel, use getSongContextButtonPanel().
        Returns:
        song context panel
      • getTable

        public JTable getTable()
        The actual table component showing songs.
        Specified by:
        getTable in interface TableView
        Returns:
        song table
      • getMainWindow

        public MainWindow getMainWindow()
        Returns the owning window.
        Returns:
        main window
      • 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
      • getSelectedSong

        public AudioSong getSelectedSong()
        Returns the first selected song. This call may be expensive when many songs are selected. You can check the number of songs selected with getSongTable().getSelectedRowCount().
        Returns:
        first selected song, or null if no songs are selected.
      • select

        public void select​(AudioSong song)
        Select the given song in the current SongTable and scroll to it so that it becomes visible.
        Parameters:
        song - song
      • select

        public void select​(long id)
        Select the given song in the current SongTable and scroll to it so that it becomes visible.
        Parameters:
        id - id
      • resetSorting

        public void resetSorting()
        Clear all sorting flags and sort the current playlist by natural order.