yu.ac.bg.etf.javaqx.qswing.table
Interface TableModel

All Known Implementing Classes:
AbstractTableModel

public interface TableModel

Table Model Interface.

Version:
0.2.0
Author:
Slobodan Vrkacevic (slobodan.vrkacevic@gmail.com)

Method Summary
 void addTableModelListener(TableModelListener listener)
          Adds listener.
 java.lang.Class getColumnClass(int columnIndex)
          Returns the class of the specified column.
 int getColumnCount()
          Returns the number of columns.
 java.lang.String getColumnName(int columnIndex)
          Returns the name of the specified column.
 int getRowCount()
          Returns the number of rows.
 java.lang.Object getValueAt(int rowIndex, int columnIndex)
          Returns the value of the specified cell.
 boolean isCellEditable(int rowIndex, int columnIndex)
          Returns true if the cell is editable.
 void removeTableModelListener(TableModelListener listener)
          Removes a listener.
 void setValueAt(java.lang.Object value, int rowIndex, int columnIndex)
          Sets the value for the specified cell.
 

Method Detail

getRowCount

public int getRowCount()
Returns the number of rows.

Returns:
the number of rows

getColumnCount

public int getColumnCount()
Returns the number of columns.

Returns:
the number of columns

getColumnName

public java.lang.String getColumnName(int columnIndex)
Returns the name of the specified column.

Parameters:
columnIndex - the column index
Returns:
the name of the specified column

getColumnClass

public java.lang.Class getColumnClass(int columnIndex)
Returns the class of the specified column.

Parameters:
columnIndex - the column index
Returns:
the class of the specified column

isCellEditable

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

Parameters:
rowIndex - the row index
columnIndex - the column index
Returns:
true if the cell is editable

getValueAt

public java.lang.Object getValueAt(int rowIndex,
                                   int columnIndex)
Returns the value of the specified cell.

Parameters:
rowIndex - the row index
columnIndex - the column index
Returns:
the value of the specified cell

setValueAt

public void setValueAt(java.lang.Object value,
                       int rowIndex,
                       int columnIndex)
Sets the value for the specified cell.

Parameters:
value - the value
rowIndex - the row index
columnIndex - the column index

addTableModelListener

public void addTableModelListener(TableModelListener listener)
Adds listener.

Parameters:
listener - the listener

removeTableModelListener

public void removeTableModelListener(TableModelListener listener)
Removes a listener.

Parameters:
listener - the listener


Copyright © 2007 ETF and contributors. All Rights Reserved.