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
| 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)
|
| 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 |
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
CustomTableModel
public CustomTableModel(java.lang.String[] colNames,
java.lang.Class[] colTypes)
CustomTableModel
public CustomTableModel(java.lang.String[] colNames,
java.lang.Class[] colTypes,
int[] colSizes)
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 queriedcolumn - 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()