Package com.tagtraum.beatunes
Class SimpleSongTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- com.tagtraum.beatunes.AbstractSongTableModel
-
- com.tagtraum.beatunes.SimpleSongTableModel
-
- All Implemented Interfaces:
FilterTableModel<AudioSong>,Serializable,TableModel
public class SimpleSongTableModel extends AbstractSongTableModel
- Author:
- Hendrik Schreiber
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
-
-
Constructor Summary
Constructors Constructor Description SimpleSongTableModel(BeaTunes application)SimpleSongTableModel(BeaTunes application, List<AudioSong> songs)SimpleSongTableModel(List<AudioSong> songs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetRowCount()AudioSonggetValueAt(int rowIndex)intindexOf(long id)First index for object with given id.intindexOf(AudioSong object)First index for object.voidsetSongs(Collection<AudioSong> songs)Sets a collection of songs as the table model content.-
Methods inherited from class com.tagtraum.beatunes.AbstractSongTableModel
addPropertyChangeListener, firePropertyChange, fireTableRowsRepaint, getApplication, getColumnCount, getUnfilteredRow, getValueAt, getValueAt, isCellEditable, isItemsEditable, setApplication, setItemsEditable, setValue, setValueAt
-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getColumnName, getListeners, getTableModelListeners, removeTableModelListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.tagtraum.beatunes.filter.FilterTableModel
getTableModelListeners
-
Methods inherited from interface javax.swing.table.TableModel
addTableModelListener, getColumnClass, getColumnName, removeTableModelListener
-
-
-
-
Method Detail
-
setSongs
public void setSongs(Collection<AudioSong> songs)
Sets a collection of songs as the table model content.- Parameters:
songs- collection of songs
-
getRowCount
public int getRowCount()
-
getValueAt
public AudioSong getValueAt(int rowIndex)
- Parameters:
rowIndex- index- Returns:
- the value at the indicated row or null
-
indexOf
public int indexOf(AudioSong object)
Description copied from interface:FilterTableModelFirst index for object.- Parameters:
object- object to look for- Returns:
- index of the object or
-1if not found
-
indexOf
public int indexOf(long id)
Description copied from interface:FilterTableModelFirst index for object with given id.- Parameters:
id- object id- Returns:
- index of the corresponding object or
-1if not found
-
-