net.sourceforge.neurosdbm
Class NeurosTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
net.sourceforge.neurosdbm.NeurosTableModel
- All Implemented Interfaces:
- java.util.EventListener, java.io.Serializable, javax.swing.table.TableModel, javax.swing.event.TableModelListener
- Direct Known Subclasses:
- AdvNeurosTableModel
- class NeurosTableModel
- extends javax.swing.table.AbstractTableModel
- implements javax.swing.event.TableModelListener
Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
Method Summary |
void |
exceptionHandler(java.lang.Exception exp)
|
private AudioDisplayRecord |
filterGetAudioDisplayRecord(int row)
|
private int |
filterGetRowCount()
|
private int[] |
filterGetSelectedTracks(int[] rows)
|
private java.lang.Object |
filterGetValueAt(int row,
int column)
|
private int |
filterSongs()
If filtering is on, filter each song based on the current
set of filters. |
AudioDisplayRecord |
getAudioDisplayRecord(int row)
|
int |
getColumnCount()
|
java.lang.String |
getColumnName(int column)
|
private java.lang.String |
getColumnNameTrack(int column)
|
int |
getColumnWidth(int column)
|
Database |
getDatabase()
|
int |
getDbData()
|
java.util.ArrayList |
getFilter()
get filters |
(package private) java.util.ArrayList |
getFilteredSelectedTracks(int[] tracks,
java.util.ArrayList list)
|
(package private) java.lang.Object |
getFilteredValueAt(int row,
int column,
java.util.ArrayList list)
|
int |
getKeyData()
|
int |
getRowCount()
|
(package private) java.util.ArrayList |
getSelectedTracks(int[] selectedTracks)
|
private java.lang.Object |
getValueAlbum(int column,
AlbumDisplayRecord album)
|
private java.lang.Object |
getValueArtist(int column,
ArtistDisplayRecord artist)
|
java.lang.Object |
getValueAt(int row,
int column)
|
private java.lang.Object |
getValueGenres(int column,
GenreDisplayRecord genre)
|
private java.lang.Object |
getValueRecordings(int column,
RecordingDisplayRecord recording)
|
private java.lang.Object |
getValueSongs(int column,
AudioDisplayRecord track)
|
private java.lang.Object |
getValueUnidedHiSi(int column,
UnidedHiSiDisplayRecord hisi)
|
private int |
getViewRowCount(java.util.ArrayList list,
boolean filtersAreOn)
|
private AudioDisplayRecord |
internalGetAudioDisplayRecord(int row)
|
private int |
internalGetRowCount()
|
private java.lang.Object |
internalGetValueAt(int row,
int column)
|
void |
lock()
|
void |
setDataType(int dbData,
int keyData)
|
void |
setFilter(ColumnFilter[] newFilters)
assign filters |
static void |
setViewFilter(int i)
|
(package private) void |
sortByColumn(int column,
boolean ascending)
|
void |
tableChanged(javax.swing.event.TableModelEvent e)
tell filters the table has changed |
void |
unlock()
|
void |
updateData()
|
Methods inherited from class javax.swing.table.AbstractTableModel |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BLANK
public static final int BLANK
- See Also:
- Constant Field Values
AUDIO_SONGS
public static final int AUDIO_SONGS
- See Also:
- Constant Field Values
AUDIO_PLAYLISTS
public static final int AUDIO_PLAYLISTS
- See Also:
- Constant Field Values
AUDIO_ARTISTS
public static final int AUDIO_ARTISTS
- See Also:
- Constant Field Values
AUDIO_ALBUMS
public static final int AUDIO_ALBUMS
- See Also:
- Constant Field Values
AUDIO_GENRES
public static final int AUDIO_GENRES
- See Also:
- Constant Field Values
AUDIO_RECORDINGS
public static final int AUDIO_RECORDINGS
- See Also:
- Constant Field Values
AUDIO_AA
public static final int AUDIO_AA
- See Also:
- Constant Field Values
AUDIO_AA_ALL
public static final int AUDIO_AA_ALL
- See Also:
- Constant Field Values
AUDIO_AA_ARTISTS
public static final int AUDIO_AA_ARTISTS
- See Also:
- Constant Field Values
HISI_IDENTIFIED
public static final int HISI_IDENTIFIED
- See Also:
- Constant Field Values
HISI_TOBEIDENTIFIED
public static final int HISI_TOBEIDENTIFIED
- See Also:
- Constant Field Values
HISI_UNSUCCESSFUL
public static final int HISI_UNSUCCESSFUL
- See Also:
- Constant Field Values
PCAUDIO_SONGS
public static final int PCAUDIO_SONGS
- See Also:
- Constant Field Values
PCAUDIO_PLAYLISTS
public static final int PCAUDIO_PLAYLISTS
- See Also:
- Constant Field Values
PCAUDIO_ARTISTS
public static final int PCAUDIO_ARTISTS
- See Also:
- Constant Field Values
PCAUDIO_ALBUMS
public static final int PCAUDIO_ALBUMS
- See Also:
- Constant Field Values
PCAUDIO_GENRES
public static final int PCAUDIO_GENRES
- See Also:
- Constant Field Values
PCAUDIO_RECORDINGS
public static final int PCAUDIO_RECORDINGS
- See Also:
- Constant Field Values
audioTracks
private java.util.ArrayList audioTracks
audioPlaylists
private java.util.ArrayList audioPlaylists
audioArtists
private java.util.ArrayList audioArtists
audioAlbums
private java.util.ArrayList audioAlbums
audioGenres
private java.util.ArrayList audioGenres
audioRecordings
private java.util.ArrayList audioRecordings
audioAAAll
private java.util.ArrayList audioAAAll
audioAAArtists
private java.util.ArrayList audioAAArtists
unidedhisi
private java.util.ArrayList unidedhisi
idedhisi
private java.util.ArrayList idedhisi
failedhisi
private java.util.ArrayList failedhisi
pcaudioTracks
private java.util.ArrayList pcaudioTracks
pcaudioPlaylists
private java.util.ArrayList pcaudioPlaylists
pcaudioArtists
private java.util.ArrayList pcaudioArtists
pcaudioAlbums
private java.util.ArrayList pcaudioAlbums
pcaudioGenres
private java.util.ArrayList pcaudioGenres
pcaudioRecordings
private java.util.ArrayList pcaudioRecordings
subDatabase
private java.util.ArrayList subDatabase
dbData
private int dbData
keyData
private int keyData
database
private Database database
parent
private MainFrame parent
blankDisplay
private boolean blankDisplay
oldColumns
private java.lang.Boolean[] oldColumns
hasFilter
private boolean hasFilter
tableHasChanged
private boolean tableHasChanged
filterTrackList
private java.util.ArrayList filterTrackList
filterList
private java.util.ArrayList filterList
oldDBData
private int oldDBData
hasSort
private boolean hasSort
ascending
private boolean ascending
sortColumn
private int sortColumn
VIEW_ALL
private static int VIEW_ALL
VIEW_ADDED
private static int VIEW_ADDED
VIEW_REMOVED
private static int VIEW_REMOVED
VIEW_MODS
private static int VIEW_MODS
view
private static int view
NeurosTableModel
NeurosTableModel(Database database,
MainFrame parent)
NeurosTableModel
protected NeurosTableModel()
lock
public void lock()
unlock
public void unlock()
exceptionHandler
public void exceptionHandler(java.lang.Exception exp)
updateData
public void updateData()
setDataType
public void setDataType(int dbData,
int keyData)
getRowCount
public int getRowCount()
- Specified by:
getRowCount
in interface javax.swing.table.TableModel
internalGetRowCount
private int internalGetRowCount()
getColumnName
public java.lang.String getColumnName(int column)
- Specified by:
getColumnName
in interface javax.swing.table.TableModel
getColumnNameTrack
private java.lang.String getColumnNameTrack(int column)
getColumnWidth
public int getColumnWidth(int column)
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCount
in interface javax.swing.table.TableModel
getValueAt
public java.lang.Object getValueAt(int row,
int column)
- Specified by:
getValueAt
in interface javax.swing.table.TableModel
internalGetValueAt
private java.lang.Object internalGetValueAt(int row,
int column)
getValueSongs
private java.lang.Object getValueSongs(int column,
AudioDisplayRecord track)
getValueArtist
private java.lang.Object getValueArtist(int column,
ArtistDisplayRecord artist)
getValueAlbum
private java.lang.Object getValueAlbum(int column,
AlbumDisplayRecord album)
getValueGenres
private java.lang.Object getValueGenres(int column,
GenreDisplayRecord genre)
getValueRecordings
private java.lang.Object getValueRecordings(int column,
RecordingDisplayRecord recording)
getValueUnidedHiSi
private java.lang.Object getValueUnidedHiSi(int column,
UnidedHiSiDisplayRecord hisi)
sortByColumn
void sortByColumn(int column,
boolean ascending)
getSelectedTracks
java.util.ArrayList getSelectedTracks(int[] selectedTracks)
getAudioDisplayRecord
public AudioDisplayRecord getAudioDisplayRecord(int row)
internalGetAudioDisplayRecord
private AudioDisplayRecord internalGetAudioDisplayRecord(int row)
getDatabase
public Database getDatabase()
getDbData
public int getDbData()
- Returns:
getKeyData
public int getKeyData()
filterSongs
private int filterSongs()
- If filtering is on, filter each song based on the current
set of filters.
- Returns:
- number of songs. If -1, indicates cannot handle current
set
tableChanged
public void tableChanged(javax.swing.event.TableModelEvent e)
- tell filters the table has changed
- Specified by:
tableChanged
in interface javax.swing.event.TableModelListener
setFilter
public void setFilter(ColumnFilter[] newFilters)
- assign filters
getFilter
public java.util.ArrayList getFilter()
- get filters
filterGetRowCount
private int filterGetRowCount()
- Returns:
- number of rows. If -1 cannot handle current set
filterGetValueAt
private java.lang.Object filterGetValueAt(int row,
int column)
- Returns:
- value to display. If "this" then cannot handle current set
We cannot return null to indicate we cannot handle current
set because the filterTrack may have a null value at that column
filterGetSelectedTracks
private int[] filterGetSelectedTracks(int[] rows)
- Returns:
- selected tracks. If null cannot handle current set
filterGetAudioDisplayRecord
private AudioDisplayRecord filterGetAudioDisplayRecord(int row)
- Returns:
- audio display record. If null cannot handle current set
setViewFilter
public static void setViewFilter(int i)
getViewRowCount
private int getViewRowCount(java.util.ArrayList list,
boolean filtersAreOn)
getFilteredValueAt
java.lang.Object getFilteredValueAt(int row,
int column,
java.util.ArrayList list)
getFilteredSelectedTracks
java.util.ArrayList getFilteredSelectedTracks(int[] tracks,
java.util.ArrayList list)
Copyright © 2004 NeurosDBM Dev Team All Rights Reserved.