Class SongTableModel

    • Constructor Detail

      • SongTableModel

        public SongTableModel​(BeaTunes beaTunes)
        Empty model.
        Parameters:
        beaTunes - beaTunes
    • Method Detail

      • getPlayList

        public PlayList getPlayList()
        Currently displayed playlist. Might be null.
        Returns:
        playlist or null, if none is set at the moment
      • setPlayList

        public void setPlayList​(PlayList playList)
        Parameters:
        playList - playlist
      • getRowCount

        public int getRowCount()
      • getValueAt

        public AudioSong getValueAt​(int rowIndex)
        Parameters:
        rowIndex - index
        Returns:
        the value at the indicated row or null
      • getPersistentIDAt

        public Long getPersistentIDAt​(int rowIndex)
      • getValueAt

        protected Object getValueAt​(AudioSong song,
                                    int rowIndex,
                                    int columnIndex)
        Returns the Song property for a specific column.
        Overrides:
        getValueAt in class AbstractSongTableModel
        Parameters:
        song - song
        rowIndex - row
        columnIndex - property
        Returns:
        the requested song property
      • indexOf

        public int indexOf​(AudioSong song)
        Description copied from interface: FilterTableModel
        First index for object.
        Parameters:
        song - object to look for
        Returns:
        index of the object or -1 if not found
      • indexOf

        public int indexOf​(long id)
        Description copied from interface: FilterTableModel
        First index for object with given id.
        Parameters:
        id - object id
        Returns:
        index of the corresponding object or -1 if not found