JBCSolutions - Jbcgrid v1.6

This document is the API specification for the JbcGrid, version 1.6


jbc.grid
Class JbcGridDefaultTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by javax.swing.table.DefaultTableModel
          extended by jbc.grid.JbcGridDefaultTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel, JbcGridInterfaceTableModel

public class JbcGridDefaultTableModel
extends javax.swing.table.DefaultTableModel
implements JbcGridInterfaceTableModel

This TableModel extends the DefaultTableModel, so you may use all the functionalities of DefaultTableModel, especially the vector facilities.

Author:
Copyright © 1999-2004, JBC. All Rights Reserved.
Licensed Materials - Property of JBC.
See Also:
JbcGridAbstractTableModel, Serialized Form

Constructor Summary
JbcGridDefaultTableModel()
          Constructs a default JbcGridDefaultTableModel which is a table of zero columns and zero rows.
JbcGridDefaultTableModel(int rowCount, int columnCount)
          Constructs a JbcGridDefaultTableModel with rowCount and columnCount of null object values.
JbcGridDefaultTableModel(java.lang.Object[][] data, java.lang.Object[] columnNames)
          Constructs a JbcGridDefaultTableModel and initializes the table by passing data and columnNames to the setDataVector method.
JbcGridDefaultTableModel(java.lang.Object[] columnNames, int rowCount)
          Constructs a JbcGridDefaultTableModel with as many columns as there are elements in columnNames and rowCount of null object values.
JbcGridDefaultTableModel(java.util.Vector columnNames, int rowCount)
          Constructs a JbcGridDefaultTableModel with as many columns as there are elements in columnNames and rowCount of null object values.
JbcGridDefaultTableModel(java.util.Vector data, java.util.Vector columnNames)
          Constructs a JbcGridDefaultTableModel and initializes the table by passing data and columnNames to the setDataVector method.
 
Method Summary
 javax.swing.JComponent getExpandedRowComponent(int row)
          You should override this method and return a component that will be used to overload the row.
 javax.swing.JComponent getExpandedTreeviewComponent(int row)
          You should override this method and return a component that will be used to expand the row.
 boolean isExpandableTreeview(int row)
          Returns true if this row may be expanded in tree view.
 
Methods inherited from class javax.swing.table.DefaultTableModel
addColumn, addColumn, addColumn, addRow, addRow, getColumnCount, getColumnName, getDataVector, getRowCount, getValueAt, insertRow, insertRow, isCellEditable, 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, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JbcGridDefaultTableModel

public JbcGridDefaultTableModel()
Constructs a default JbcGridDefaultTableModel which is a table of zero columns and zero rows.


JbcGridDefaultTableModel

public JbcGridDefaultTableModel(int rowCount,
                                int columnCount)
Constructs a JbcGridDefaultTableModel with rowCount and columnCount of null object values.

Parameters:
rowCount - the number of rows the table holds
columnCount - the number of columns the table holds

JbcGridDefaultTableModel

public JbcGridDefaultTableModel(java.util.Vector columnNames,
                                int rowCount)
Constructs a JbcGridDefaultTableModel with as many columns as there are elements in columnNames and rowCount of null object values. Each column's name will be taken from the columnNames vector.

Parameters:
columnNames - vector containing the names of the new columns; if this is null then the model has no columns
rowCount - the number of rows the table holds

JbcGridDefaultTableModel

public JbcGridDefaultTableModel(java.lang.Object[] columnNames,
                                int rowCount)
Constructs a JbcGridDefaultTableModel with as many columns as there are elements in columnNames and rowCount of null object values. Each column's name will be taken from the columnNames array.

Parameters:
columnNames - array containing the names of the new columns; if this is null then the model has no columns
rowCount - the number of rows the table holds
See Also:
DefaultTableModel.setDataVector(java.util.Vector, java.util.Vector), DefaultTableModel.setValueAt(java.lang.Object, int, int)

JbcGridDefaultTableModel

public JbcGridDefaultTableModel(java.util.Vector data,
                                java.util.Vector columnNames)
Constructs a JbcGridDefaultTableModel and initializes the table by passing data and columnNames to the setDataVector method.

Parameters:
data - the data of the table
columnNames - vector containing the names of the new columns
See Also:
DefaultTableModel.getDataVector(), DefaultTableModel.setDataVector(java.util.Vector, java.util.Vector)

JbcGridDefaultTableModel

public JbcGridDefaultTableModel(java.lang.Object[][] data,
                                java.lang.Object[] columnNames)
Constructs a JbcGridDefaultTableModel and initializes the table by passing data and columnNames to the setDataVector method. The first index in the Object[][] array is the row index and the second is the column index.

Parameters:
data - the data of the table
columnNames - the names of the columns
See Also:
DefaultTableModel.getDataVector(), DefaultTableModel.setDataVector(java.util.Vector, java.util.Vector)
Method Detail

isExpandableTreeview

public boolean isExpandableTreeview(int row)
Returns true if this row may be expanded in tree view.

An expandable row is a row that may answer favourably to the getExpandedTreeviewComponent method.

You should override this method and return true if the specified row is expandable.

Specified by:
isExpandableTreeview in interface JbcGridInterfaceTableModel
Returns:
true if this row is expandable
See Also:
getExpandedTreeviewComponent(int)

getExpandedTreeviewComponent

public javax.swing.JComponent getExpandedTreeviewComponent(int row)
You should override this method and return a component that will be used to expand the row.

Specified by:
getExpandedTreeviewComponent in interface JbcGridInterfaceTableModel
Parameters:
row - the row index
Returns:
an expanded component
See Also:
isExpandableTreeview(int)

getExpandedRowComponent

public javax.swing.JComponent getExpandedRowComponent(int row)
You should override this method and return a component that will be used to overload the row.

Specified by:
getExpandedRowComponent in interface JbcGridInterfaceTableModel
Parameters:
row - the row index
Returns:
an expanded component

JBCSolutions - Jbcgrid v1.6

JBCSolutions - Jbcgrid v1.6