JSampler
v0.8a

org.jsampler.view
Class FxSendTableModel

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

public class FxSendTableModel
extends javax.swing.table.AbstractTableModel

A tabular data model for representing effect sends.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
FxSendTableModel(SamplerChannelModel channelModel)
          Creates a new instance of FxSendTableModel.
 
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.
 FxSend getFxSend(int index)
          Gets the effect send at the specified position.
 int getFxSendPosition(FxSend fxSend)
          Gets the position of the specified effect send.
 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

FxSendTableModel

public FxSendTableModel(SamplerChannelModel channelModel)
Creates a new instance of FxSendTableModel.

Parameters:
channelModel - The SamplerChannelModel, which effect sends should be represented by this table model.
Throws:
java.lang.IllegalArgumentException - If channelModel 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

getFxSend

public FxSend getFxSend(int index)
Gets the effect send at the specified position.

Parameters:
index - The index of the effect send to be returned.
Returns:
The effect send at the specified position.

getFxSendPosition

public int getFxSendPosition(FxSend fxSend)
Gets the position of the specified effect send.

Parameters:
fxSend - The effect send which position should be obtained.
Returns:
The position of the specified effect send, or -1 if the specified effect send is not found in the table.

JSampler
v0.8a

Copyright © 2007 Grigor Iliev. All rights reserved.