hoplugins.commons.ui
Class BaseTableModel

java.lang.Object
  extended byjavax.swing.table.AbstractTableModel
      extended byjavax.swing.table.DefaultTableModel
          extended byhoplugins.commons.ui.BaseTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public class BaseTableModel
extends javax.swing.table.DefaultTableModel

Base TableModel that creates a not editable table and manage the rendering

Author:
Massimiliano Amato
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.DefaultTableModel
columnIdentifiers, dataVector
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
BaseTableModel()
          Creates a new instance of BaseTableModel
BaseTableModel(java.util.Vector data, java.util.Vector columnNames)
          Creates a new BaseTableModel object.
 
Method Summary
 java.lang.Class getColumnClass(int column)
          Method the return the column class type
 boolean isCellEditable(int row, int column)
          Method that returns if the cell if editable, false by default
 
Methods inherited from class javax.swing.table.DefaultTableModel
addColumn, addColumn, addColumn, addRow, addRow, convertToVector, convertToVector, getColumnCount, getColumnName, getDataVector, getRowCount, getValueAt, insertRow, insertRow, moveRow, newDataAvailable, newRowsAdded, removeRow, rowsRemoved, setColumnCount, setColumnIdentifiers, setColumnIdentifiers, setDataVector, setDataVector, setNumRows, setRowCount, setValueAt
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseTableModel

public BaseTableModel()
Creates a new instance of BaseTableModel


BaseTableModel

public BaseTableModel(java.util.Vector data,
                      java.util.Vector columnNames)
Creates a new BaseTableModel object.

Parameters:
data - Vector with the data to be used to fill the table
columnNames - Vector of column names
Method Detail

isCellEditable

public boolean isCellEditable(int row,
                              int column)
Method that returns if the cell if editable, false by default

Parameters:
row - the row index of the cell
column - the column index of the cell
Returns:
true if editable, false if not

getColumnClass

public java.lang.Class getColumnClass(int column)
Method the return the column class type

Parameters:
column - the column we want to know the class type
Returns:
Object is column is empty, or the type of object we have in the column


Copyright © 2005 Hattrick Organizer Plugins Project. All Rights Reserved.