Class AnalysisQueueTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- com.tagtraum.beatunes.analysisqueue.AnalysisQueueTableModel
-
- All Implemented Interfaces:
FilterTableModel<Task>,Serializable,TableModel
public class AnalysisQueueTableModel extends AbstractTableModel implements FilterTableModel<Task>
Analysis queueTableModel. Similar toAbstractSongTableModel, but with an added progress column at index 1 and base objectTaskinstead ofSong.- Author:
- Hendrik Schreiber
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
-
-
Constructor Summary
Constructors Constructor Description AnalysisQueueTableModel(BeaTunes application)Empty model.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfireQueueChanged()voidfireTaskUpdated(Task task)Fires a table cell update for the progress column of the specified task.BeaTunesgetApplication()intgetColumnCount()intgetRowCount()intgetUnfilteredRow(int row)Returns unfiltered row index for a given row index.TaskgetValueAt(int rowIndex)ObjectgetValueAt(int rowIndex, int columnIndex)intindexOf(long id)First index for object with given id.intindexOf(Task object)First index for object.booleanisCellEditable(int rowIndex, int columnIndex)voidsetValueAt(Object value, int row, int column)-
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
-
-
-
-
Constructor Detail
-
AnalysisQueueTableModel
public AnalysisQueueTableModel(BeaTunes application)
Empty model.- Parameters:
application- beaTunes
-
-
Method Detail
-
getApplication
public BeaTunes getApplication()
-
getUnfilteredRow
public int getUnfilteredRow(int row)
Description copied from interface:FilterTableModelReturns unfiltered row index for a given row index.- Specified by:
getUnfilteredRowin interfaceFilterTableModel<Task>- Parameters:
row- filtered row- Returns:
- unfiltered row or -1 if not found
-
getRowCount
public int getRowCount()
- Specified by:
getRowCountin interfaceTableModel
-
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCountin interfaceTableModel
-
getValueAt
public Task getValueAt(int rowIndex)
- Specified by:
getValueAtin interfaceFilterTableModel<Task>- Parameters:
rowIndex- index- Returns:
- the value at the indicated row or null
-
getValueAt
public Object getValueAt(int rowIndex, int columnIndex)
- Specified by:
getValueAtin interfaceTableModel
-
setValueAt
public void setValueAt(Object value, int row, int column)
- Specified by:
setValueAtin interfaceTableModel- Overrides:
setValueAtin classAbstractTableModel
-
isCellEditable
public boolean isCellEditable(int rowIndex, int columnIndex)- Specified by:
isCellEditablein interfaceTableModel- Overrides:
isCellEditablein classAbstractTableModel
-
indexOf
public int indexOf(Task object)
Description copied from interface:FilterTableModelFirst index for object.- Specified by:
indexOfin interfaceFilterTableModel<Task>- 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.- Specified by:
indexOfin interfaceFilterTableModel<Task>- Parameters:
id- object id- Returns:
- index of the corresponding object or
-1if not found
-
fireTaskUpdated
public void fireTaskUpdated(Task task)
Fires a table cell update for the progress column of the specified task.- Parameters:
task- that needs its progress column updated
-
fireQueueChanged
public void fireQueueChanged()
-
-