|
Mp3dings 20100427 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
net.sourceforge.mp3dings.AbstractTableModel
net.sourceforge.mp3dings.DataTableModel
public final class DataTableModel
This class serves as the table model for the spreadsheet of the mp3dings "Data" tab. It provides functionality to
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class net.sourceforge.mp3dings.AbstractTableModel |
|---|
AbstractTableModel.UpdateRunnable |
| Field Summary |
|---|
| Fields inherited from class net.sourceforge.mp3dings.AbstractTableModel |
|---|
aggregator, filters |
| Fields inherited from class javax.swing.table.AbstractTableModel |
|---|
listenerList |
| Fields inherited from interface de.mospace.swing.table.SortableTableModel |
|---|
ASCENDING, DESCENDING |
| Constructor Summary | |
|---|---|
DataTableModel()
Creates a new instance of this class. |
|
| Method Summary | |
|---|---|
void |
addFilenameInfo(Frame owner)
Guesses artist, track and title from each filename. |
void |
addFiles(File[] nf)
Adds several files to the workspace. |
void |
addID3v(int ntag,
Frame owner)
Reads information from the ID3v1 or ID3v2 tags. |
void |
addRecursively(File[] files,
Frame owner)
Recursively grabs files from directories and adds them to the model. |
void |
clearFiles(Frame owner)
Removes all files from the workspace. |
Field[] |
getAllowedFields()
Gets the allowedFields attribute of the DataTableModel object |
Field[] |
getDefaultFields()
Gets the defaultFields attribute of the DataTableModel object |
boolean |
getEditable(Field field)
Returns whether values of the specified field can be edited in this table. |
Object |
getFieldValue(int entry,
Field field)
Gets a field value from the table. |
File |
getFile(int row)
Gets the file associated with the specified row. |
Field[] |
getPersistentFields()
Gets the persistentFields attribute of the DataTableModel object |
String |
getPrefKey()
Gets the prefKey attribute of the DataTableModel object |
void |
queryDatabase(MainFrame owner)
|
void |
removeRows(int[] rows)
Removes the files in rows rows[] from the workspace. |
protected List |
reorganizeData(int[] old2new,
int newlength)
Description of the Method |
protected void |
setData(List v)
Sets the data attribute of the DataTableModel object |
void |
setFile(File f,
int row)
Associates the specified row with file f. |
void |
silentlySetFile(File f,
int row)
Associates the specified row with file f. |
| Methods inherited from class javax.swing.table.AbstractTableModel |
|---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, 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 net.sourceforge.mp3dings.Mp3dingsTableModel |
|---|
fireTableDataChanged |
| Methods inherited from interface javax.swing.table.TableModel |
|---|
addTableModelListener, removeTableModelListener |
| Constructor Detail |
|---|
public DataTableModel()
| Method Detail |
|---|
public Field[] getAllowedFields()
public Field[] getPersistentFields()
public boolean getEditable(Field field)
getEditable in interface FieldAssociatedTableModelgetEditable in class AbstractTableModelfield - the field to (not) edit
AbstractTableModel.isCellEditable(int, int)public Field[] getDefaultFields()
public Object getFieldValue(int entry,
Field field)
entry - Mp3 file identifier.field - Field identifier.
public void addFilenameInfo(Frame owner)
owner - The feature to be added to the FilenameInfo attributepublic void addFiles(File[] nf)
nf - array of mp3-files that will be addedpublic void clearFiles(Frame owner)
owner - Description of the Parameterpublic void removeRows(int[] rows)
rows[] from the workspace.
rows - Array contaning the rows to be removed
protected List reorganizeData(int[] old2new,
int newlength)
reorganizeData in class AbstractTableModelold2new - Description of the Parameternewlength - Description of the Parameter
protected void setData(List v)
setData in class AbstractTableModelv - The new data value
public void addRecursively(File[] files,
Frame owner)
files - Input list of mp3-files (f) and directories (d)owner - The feature to be added to the Recursively attribute
public void addID3v(int ntag,
Frame owner)
ntag - 1 for ID3v1, 2 for ID3v2. If tag is neither
the method returns without doing anything.owner - The feature to be added to the ID3v attributepublic void queryDatabase(MainFrame owner)
public File getFile(int row)
getFile in interface Mp3dingsTableModelgetFile in class AbstractTableModelrow - A spreadsheet row
public void setFile(File f,
int row)
f - The new file valuerow - The new file value
public void silentlySetFile(File f,
int row)
f - Description of the Parameterrow - Description of the Parameterpublic String getPrefKey()
|
Mp3dings 20100427 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||