Mp3dings 
20100427

net.sourceforge.mp3dings
Interface Mp3dingsTableModel

All Superinterfaces:
FieldAssociatedTableModel, HeaderPopupTableModel, SortableTableModel, TableModel
All Known Implementing Classes:
AbstractTableModel, DataTableModel, DependentTableModel, FileTableModel, ID3TagTableModel

public interface Mp3dingsTableModel
extends SortableTableModel, FieldAssociatedTableModel, HeaderPopupTableModel

The common interface of the mp3dings table models.


Field Summary
 
Fields inherited from interface de.mospace.swing.table.SortableTableModel
ASCENDING, DESCENDING
 
Method Summary
 void addDataChangeListener(DataChangeListener dl)
           
 void addMessageListener(MessageListener ml)
           
 boolean discardChanges(Frame parent)
           
 void fireDataChanged(int n)
           
 void fireTableDataChanged()
          AbstractTableModel's fireTableDataChanged() method
 Object get(int row, int col)
          Gets the value of the specified table cell, converting FullTextString values to strings on the fly.
 Field[] getFields()
          Gets the fields that are currently displayed.
 File getFile(int row)
           
 FilterCollection getFilters()
           
 int[] getNextDuplicates(int[] rows, int startRowIndex, int[] cols)
          Looks for consecutive duplicates in rows, starting at startRowIndex.
 String getPrefKey()
           
 Preferences getPrefs()
           
 boolean isFiltered(int column)
           
 void resetChangeCounter()
           
 void set(Object v, int[] rows, int[] cols)
          Updates a range of cells without firing any events.
 void set(Object v, int rows, int cols)
          Updates the value of the specified table cell without firing any events.
 void setSortBy(int[] cols)
          Sets the columns by which this table is sorted.
 void setValueAt(Object v, int[] rows, int[] cols)
          Updates a range of cells and notifies tables displaying this model of the change in the data.
 
Methods inherited from interface de.mospace.swing.table.SortableTableModel
getEntries, getEntries, getRows, getRows, getSortingColumn, getSortOrder, isSorted, randomize, setSortBy, setSortBy, sort
 
Methods inherited from interface net.sourceforge.mp3dings.FieldAssociatedTableModel
getAllowedFields, getColumn, getDefaultFields, getEditable, getField, getPersistentFields
 
Methods inherited from interface de.mospace.swing.table.HeaderPopupTableModel
getHeaderPopup
 
Methods inherited from interface javax.swing.table.TableModel
addTableModelListener, getColumnClass, getColumnCount, getColumnName, getRowCount, getValueAt, isCellEditable, removeTableModelListener, setValueAt
 

Method Detail

getFilters

FilterCollection getFilters()

isFiltered

boolean isFiltered(int column)

getPrefs

Preferences getPrefs()

getPrefKey

String getPrefKey()

getFile

File getFile(int row)

getFields

Field[] getFields()
Gets the fields that are currently displayed.

Specified by:
getFields in interface FieldAssociatedTableModel
Returns:
the fields that are currently displayed

discardChanges

boolean discardChanges(Frame parent)

resetChangeCounter

void resetChangeCounter()

get

Object get(int row,
           int col)
Gets the value of the specified table cell, converting FullTextString values to strings on the fly.

Parameters:
row - the row of the cell
col - the column of the cell
Returns:
the value of the cell

setValueAt

void setValueAt(Object v,
                int[] rows,
                int[] cols)
Updates a range of cells and notifies tables displaying this model of the change in the data. This is faster than calling TableModel.setValueAt(Object, int, int) for each cell.

This method must only be called from the AWT event dispatching thread, use set(Object, int[], int[]) if you want to update the table from another thread.

Parameters:
rows - the rows of the cells
cols - the columns of the cells
v - the new value of the cells

set

void set(Object v,
         int[] rows,
         int[] cols)
Updates a range of cells without firing any events. If you want a table displaying this model to reflect the change in the data you must explicitly ask it to do so.

Parameters:
rows - the rows of the cells
cols - the columns of the cells
v - the new value of the cells
See Also:
setValueAt(Object, int[], int[])

set

void set(Object v,
         int rows,
         int cols)
Updates the value of the specified table cell without firing any events. If you want a table displaying this model to reflect the change in the data you must explicitly ask it to do so.

Parameters:
rows - the row of the cell
cols - the column of the cell
v - the new val9ue of the cell
See Also:
TableModel.setValueAt(Object, int, int)

setSortBy

void setSortBy(int[] cols)
Sets the columns by which this table is sorted. The entries will be sorted in ascending order.

Parameters:
cols - the columns to sort by in order of decreasing precedence
See Also:
SortableTableModel.setSortBy(int, boolean)

getNextDuplicates

int[] getNextDuplicates(int[] rows,
                        int startRowIndex,
                        int[] cols)
Looks for consecutive duplicates in rows, starting at startRowIndex. The returned array contains the index of the first and the last rows that are identical in all columns specified by cols.

Parameters:
rows - an array of table model rows to search for duplicates
startRowIndex - the index where the search will begin
cols - the cols that will be taken into account for comparison, if null all columns are used.
Returns:
the bounds of the next set of consecutive duplicate rows

addMessageListener

void addMessageListener(MessageListener ml)

addDataChangeListener

void addDataChangeListener(DataChangeListener dl)

fireDataChanged

void fireDataChanged(int n)

fireTableDataChanged

void fireTableDataChanged()
AbstractTableModel's fireTableDataChanged() method


Mp3dings 
20100427