|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
org.tanager.ui.CPlaylistViewerTableModel
public class CPlaylistViewerTableModel
This class represents the tabular
representation of the playlist, and it's used
for displaying the playlist to the user. An
AbstractTableModel is extended
to provide the column heading names and song
data for the current playlist. Each row
describes a single song in the playlist, and
the row's columns show the song's title,
artist, album, and date downloaded.
| Field Summary | |
|---|---|
private static java.lang.String[] |
columnNames
Represents the column heading names. |
private java.util.Vector |
playlist_
Represents the playlist vector. |
| Fields inherited from class javax.swing.table.AbstractTableModel |
|---|
listenerList |
| Constructor Summary | |
|---|---|
CPlaylistViewerTableModel(java.util.Vector playlist)
This is the only constructor allowed for a CPlaylistViewerTableModel
object. |
|
| Method Summary | |
|---|---|
int |
getColumnCount()
This method returns the number of columns in this table. |
java.lang.String |
getColumnName(int col)
This method returns the heading name for the given column. |
int |
getRowCount()
This method returns the number of columns in this table. |
java.lang.Object |
getValueAt(int row,
int col)
This method returns the value for the given cell. |
boolean |
isCellEditable(int row,
int col)
This method returns true if the given cell is editable. |
| Methods inherited from class javax.swing.table.AbstractTableModel |
|---|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener, setValueAt |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final java.lang.String[] columnNames
Represents the column heading names.
private java.util.Vector playlist_
Represents the playlist vector.
| Constructor Detail |
|---|
public CPlaylistViewerTableModel(java.util.Vector playlist)
This is the only constructor allowed for a
CPlaylistViewerTableModel
object. The caller must supply the playlist
vector.
playlist - the playlist vector| Method Detail |
|---|
public java.lang.String getColumnName(int col)
This method returns the heading name for the given column.
getColumnName in interface javax.swing.table.TableModelgetColumnName in class javax.swing.table.AbstractTableModelcol - the column whose heading name is
being requested
public int getRowCount()
This method returns the number of columns in this table.
public int getColumnCount()
This method returns the number of columns in this table.
public java.lang.Object getValueAt(int row,
int col)
This method returns the value for the given cell.
Semantics:
row - the cell's rowcol - the cell's column
public boolean isCellEditable(int row,
int col)
This method returns true if the given cell
is editable. Since this is a read=only
table, we will always return
false.
isCellEditable in interface javax.swing.table.TableModelisCellEditable in class javax.swing.table.AbstractTableModelrow - the cell's rowcol - the cell's column
false always, since
this is a read-only table
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||