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 objectTask
instead 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 void
fireQueueChanged()
void
fireTaskUpdated(Task task)
Fires a table cell update for the progress column of the specified task.BeaTunes
getApplication()
int
getColumnCount()
int
getRowCount()
int
getUnfilteredRow(int row)
Returns unfiltered row index for a given row index.Task
getValueAt(int rowIndex)
Object
getValueAt(int rowIndex, int columnIndex)
int
indexOf(long id)
First index for object with given id.int
indexOf(Task object)
First index for object.boolean
isCellEditable(int rowIndex, int columnIndex)
void
setValueAt(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:FilterTableModel
Returns unfiltered row index for a given row index.- Specified by:
getUnfilteredRow
in interfaceFilterTableModel<Task>
- Parameters:
row
- filtered row- Returns:
- unfiltered row or -1 if not found
-
getRowCount
public int getRowCount()
- Specified by:
getRowCount
in interfaceTableModel
-
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCount
in interfaceTableModel
-
getValueAt
public Task getValueAt(int rowIndex)
- Specified by:
getValueAt
in interfaceFilterTableModel<Task>
- Parameters:
rowIndex
- index- Returns:
- the value at the indicated row or null
-
getValueAt
public Object getValueAt(int rowIndex, int columnIndex)
- Specified by:
getValueAt
in interfaceTableModel
-
setValueAt
public void setValueAt(Object value, int row, int column)
- Specified by:
setValueAt
in interfaceTableModel
- Overrides:
setValueAt
in classAbstractTableModel
-
isCellEditable
public boolean isCellEditable(int rowIndex, int columnIndex)
- Specified by:
isCellEditable
in interfaceTableModel
- Overrides:
isCellEditable
in classAbstractTableModel
-
indexOf
public int indexOf(Task object)
Description copied from interface:FilterTableModel
First index for object.- Specified by:
indexOf
in interfaceFilterTableModel<Task>
- Parameters:
object
- 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.- Specified by:
indexOf
in interfaceFilterTableModel<Task>
- Parameters:
id
- object id- Returns:
- index of the corresponding object or
-1
if 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()
-
-