net.sourceforge.atunes.kernel.modules.search
Class SearchResultTableModel

java.lang.Object
  extended by net.sourceforge.atunes.kernel.modules.search.SearchResultTableModel
All Implemented Interfaces:
javax.swing.table.TableModel

public abstract class SearchResultTableModel
extends java.lang.Object
implements javax.swing.table.TableModel

The Class SearchResultTableModel.


Constructor Summary
SearchResultTableModel(java.util.List<SearchResult> results)
          Constructor.
 
Method Summary
 void addTableModelListener(javax.swing.event.TableModelListener l)
           
 java.lang.Class<?> getColumnClass(int columnIndex)
           
abstract  int getColumnCount()
          Return column count.
abstract  java.lang.String getColumnName(int columnIndex)
          Any implementation must give column names.
 int getRowCount()
           
abstract  java.lang.Object getValueAt(int rowIndex, int columnIndex)
          Any implementation must give cells values.
 boolean isCellEditable(int rowIndex, int columnIndex)
          Returns true if cell is editable.
 void removeTableModelListener(javax.swing.event.TableModelListener l)
          Removes a table model listener.
 void setValueAt(java.lang.Object value, int rowIndex, int columnIndex)
          Sets cell values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchResultTableModel

public SearchResultTableModel(java.util.List<SearchResult> results)
Constructor.

Parameters:
results - the results
Method Detail

addTableModelListener

public final void addTableModelListener(javax.swing.event.TableModelListener l)
Specified by:
addTableModelListener in interface javax.swing.table.TableModel

getColumnClass

public final java.lang.Class<?> getColumnClass(int columnIndex)
Specified by:
getColumnClass in interface javax.swing.table.TableModel

getColumnCount

public abstract int getColumnCount()
Return column count. This method must be abstract as any implementation of this class must add this information

Specified by:
getColumnCount in interface javax.swing.table.TableModel
Returns:
the column count

getColumnName

public abstract java.lang.String getColumnName(int columnIndex)
Any implementation must give column names.

Specified by:
getColumnName in interface javax.swing.table.TableModel
Parameters:
columnIndex - the column index
Returns:
the column name

getRowCount

public final int getRowCount()
Specified by:
getRowCount in interface javax.swing.table.TableModel

getValueAt

public abstract java.lang.Object getValueAt(int rowIndex,
                                            int columnIndex)
Any implementation must give cells values.

Specified by:
getValueAt in interface javax.swing.table.TableModel
Parameters:
rowIndex - the row index
columnIndex - the column index
Returns:
the value at

isCellEditable

public final boolean isCellEditable(int rowIndex,
                                    int columnIndex)
Returns true if cell is editable.

Specified by:
isCellEditable in interface javax.swing.table.TableModel
Parameters:
rowIndex - the row index
columnIndex - the column index
Returns:
true, if checks if is cell editable

removeTableModelListener

public final void removeTableModelListener(javax.swing.event.TableModelListener l)
Removes a table model listener.

Specified by:
removeTableModelListener in interface javax.swing.table.TableModel
Parameters:
l - the l

setValueAt

public final void setValueAt(java.lang.Object value,
                             int rowIndex,
                             int columnIndex)
Sets cell values.

Specified by:
setValueAt in interface javax.swing.table.TableModel
Parameters:
value - the value
rowIndex - the row index
columnIndex - the column index


Copyright © 2006-2008 The aTunes Team. All Rights Reserved.