Kpaxx/Sunpig — pull request #19 by Kpaxx (2014-12-07 18:31:00+00:00)
Title: Click-and-Drag, fixes #7, fixes #17

This is a big one!
1. Renamed the Image class to ImageObject. There’s already an Image class built into Java and I was getting tired of having to tiptoe around it in the code.

2. Clicking and dragging! You can now select images in the table, click the selection, and drag it to a playlist in the sidebar. The images you selected are added to the playlist! I am also trying to get it so that you can click and drag one playlist onto another playlist in order to add all the images from the first list into the second, but it’s not working right just yet.

3. I had previously made the ImageList class extend AbstractTableModel so we could use it to easily display ImageList objects in the JTable. I also made the ImageList subclasses Serializable, so that we could save them. I found, as I was making the previous changes, that making a class that extends AbstractTableModel also be Serializable only results in a ton of errors. So, I had to write a new class, ImageTableModel, to act as sort of an interface between the ImageList objects and the JTable.

4. I added a RowFilter to the ImageTableModel in order to make it so that we can hide certain rows of the JTable. This means that, rather than creating new ImageList objects to display in the JTable every time the user searches for something, we just hide the rows that don’t match the search parameters. It also means that is solves issue #16. When a user does a search, they can delete images from that search and it WILL delete them from the Library or the Playlist that they are currently in.