Class SongTableEditCreator


  • public class SongTableEditCreator
    extends Object
    Executes setting of AudioSong properties via a AbstractSongTableModel. Modifies properties and creates an UndoableEdit for the modification. Where it makes sense, and with agreement from the user, the modification is expanded to other songs (e.g. whole albums).
    Author:
    Hendrik Schreiber
    • Constructor Detail

      • SongTableEditCreator

        public SongTableEditCreator()
    • Method Detail

      • setValueUndoable

        public void setValueUndoable​(AbstractSongTableModel model,
                                     AudioSong song,
                                     Object newValue,
                                     int row,
                                     int column)
                              throws Exception
        Sets the property of the given AudioSong corresponding to the given row and column to the newValue. If it makes sense, the user is asked, whether he would like to execute the same change for other songs in the library. Eventually, an UndoableEdit is returned.
        Parameters:
        model - table model
        song - song that should be changed
        newValue - new value
        row - row
        column - column
        Throws:
        Exception - if something goes wrong