org.jsqltool.model
Class CustomTableModel

java.lang.Object
  |
  +--javax.swing.table.AbstractTableModel
        |
        +--javax.swing.table.DefaultTableModel
              |
              +--org.jsqltool.model.CustomTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public class CustomTableModel
extends javax.swing.table.DefaultTableModel

Title: JSqlTool Project

Description: Table Model, whose editability can be swiched.

Copyright: Copyright (C) 2006 Mauro Carniel

This file is part of JSqlTool project. This library is free software; you can redistribute it and/or modify it under the terms of the (LGPL) Lesser General Public License as published by the Free Software Foundation; GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. The author may be contacted at: maurocarniel@tin.it

See Also:
Serialized Form

Field Summary
static int DETAIL_REC
           
static int EDIT_REC
           
static int INSERT_REC
           
 
Fields inherited from class javax.swing.table.DefaultTableModel
columnIdentifiers, dataVector
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
CustomTableModel(java.lang.String[] colNames, java.lang.Class[] colTypes)
           
CustomTableModel(java.lang.String[] colNames, java.lang.Class[] colTypes, int[] colSizes)
           
 
Method Summary
 void addColumn(java.lang.Object columnName, java.util.Vector columnData, java.lang.Class colType)
           
 void addColumn(java.lang.Object columnName, java.util.Vector columnData, java.lang.Class colType, int colSize)
           
 int[] getColSizes()
           
 java.lang.Class getColumnClass(int col)
           
 int getEditMode()
           
 boolean isBlob(int col)
           
 boolean isCellEditable(int row, int column)
          Returns true regardless of parameter values.
 void setDataVector(java.util.Vector data)
           
 void setEditableCols(boolean[] editableCols)
           
 void setEditMode(int editMode)
           
 
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
 

Field Detail

DETAIL_REC

public static final int DETAIL_REC
See Also:
Constant Field Values

INSERT_REC

public static final int INSERT_REC
See Also:
Constant Field Values

EDIT_REC

public static final int EDIT_REC
See Also:
Constant Field Values
Constructor Detail

CustomTableModel

public CustomTableModel(java.lang.String[] colNames,
                        java.lang.Class[] colTypes)

CustomTableModel

public CustomTableModel(java.lang.String[] colNames,
                        java.lang.Class[] colTypes,
                        int[] colSizes)
Method Detail

addColumn

public void addColumn(java.lang.Object columnName,
                      java.util.Vector columnData,
                      java.lang.Class colType)

addColumn

public void addColumn(java.lang.Object columnName,
                      java.util.Vector columnData,
                      java.lang.Class colType,
                      int colSize)

getColumnClass

public java.lang.Class getColumnClass(int col)
Specified by:
getColumnClass in interface javax.swing.table.TableModel
Overrides:
getColumnClass in class javax.swing.table.AbstractTableModel

isBlob

public boolean isBlob(int col)

isCellEditable

public boolean isCellEditable(int row,
                              int column)
Returns true regardless of parameter values.

Specified by:
isCellEditable in interface javax.swing.table.TableModel
Overrides:
isCellEditable in class javax.swing.table.DefaultTableModel
Parameters:
row - the row whose value is to be queried
column - the column whose value is to be queried
Returns:
true
See Also:
DefaultTableModel.setValueAt(java.lang.Object, int, int)

setEditMode

public void setEditMode(int editMode)

setEditableCols

public void setEditableCols(boolean[] editableCols)

setDataVector

public void setDataVector(java.util.Vector data)

getEditMode

public int getEditMode()

getColSizes

public int[] getColSizes()