JSampler
v0.8a

org.jsampler.view
Class OrchestraTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by org.jsampler.view.OrchestraTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public class OrchestraTableModel
extends javax.swing.table.AbstractTableModel

A tabular data model for representing orchestras.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
OrchestraTableModel(OrchestraListModel orchestraListModel)
          Creates a new instance of OrchestraTableModel.
 
Method Summary
 int getColumnCount()
          Gets the number of columns in the model.
 java.lang.String getColumnName(int col)
          Gets the name of the column at columnIndex.
 OrchestraListModel getOrchestraListModel()
          Gets the OrchestraListModel, represented by this table model.
 int getRowCount()
          Gets the number of rows in the model.
 java.lang.Object getValueAt(int row, int col)
          Gets the value for the cell at columnIndex and rowIndex.
 boolean isCellEditable(int row, int col)
          Returns true if the cell at row and col is editable.
 void setValueAt(java.lang.Object value, int row, int col)
          Sets the value in the cell at col and row to value.
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrchestraTableModel

public OrchestraTableModel(OrchestraListModel orchestraListModel)
Creates a new instance of OrchestraTableModel.

Parameters:
orchestraListModel - The OrchestraListModel, which this table model should represent.
Throws:
java.lang.IllegalArgumentException - If orchestraListModel is null.
Method Detail

getColumnCount

public int getColumnCount()
Gets the number of columns in the model.

Returns:
The number of columns in the model.

getRowCount

public int getRowCount()
Gets the number of rows in the model.

Returns:
The number of rows in the model.

getColumnName

public java.lang.String getColumnName(int col)
Gets the name of the column at columnIndex.

Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel
Returns:
The name of the column at columnIndex.

getValueAt

public java.lang.Object getValueAt(int row,
                                   int col)
Gets the value for the cell at columnIndex and rowIndex.

Parameters:
row - The row whose value is to be queried.
col - The column whose value is to be queried.
Returns:
The value for the cell at columnIndex and rowIndex.

setValueAt

public void setValueAt(java.lang.Object value,
                       int row,
                       int col)
Sets the value in the cell at col and row to value.

Specified by:
setValueAt in interface javax.swing.table.TableModel
Overrides:
setValueAt in class javax.swing.table.AbstractTableModel

isCellEditable

public boolean isCellEditable(int row,
                              int col)
Returns true if the cell at row and col is editable.

Specified by:
isCellEditable in interface javax.swing.table.TableModel
Overrides:
isCellEditable in class javax.swing.table.AbstractTableModel

getOrchestraListModel

public OrchestraListModel getOrchestraListModel()
Gets the OrchestraListModel, represented by this table model.


JSampler
v0.8a

Copyright © 2007 Grigor Iliev. All rights reserved.