JIDE 3.5.15

com.jidesoft.grid
Class DefaultNavigableTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by javax.swing.table.DefaultTableModel
          extended by com.jidesoft.grid.DefaultNavigableTableModel
All Implemented Interfaces:
NavigableModel, NavigableTableModel, Serializable, TableModel

public class DefaultNavigableTableModel
extends DefaultTableModel
implements NavigableTableModel

DefaultNavigableTableModel adds NavigableModel support to DefaultTableModel. You can use it as replacement for DefaultTableModel. Instead of returning if a cell is navigable programmatically like in AbstractNavigableTableModel, you can use setNavigableAt(int,int,boolean) control if a cell should be navigable.

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
DefaultNavigableTableModel()
           
DefaultNavigableTableModel(int rowCount, int columnCount)
           
DefaultNavigableTableModel(Object[][] data, Object[] columnNames)
           
DefaultNavigableTableModel(Object[] columnNames, int rowCount)
           
DefaultNavigableTableModel(Vector columnNames, int rowCount)
           
DefaultNavigableTableModel(Vector data, Vector columnNames)
           
 
Method Summary
 boolean isNavigableAt(int rowIndex, int columnIndex)
          Gets if a cell should be navigable at the specified row and column index.
 boolean isNavigationOn()
          Checks if the navigation is on.
 void setNavigableAll()
          Makes all cells navigable.
 void setNavigableAt(int rowIndex, int columnIndex, boolean navigable)
          Makes a cell navigable or not navigable.
 void setNavigationOn(boolean navigableOn)
           
 
Methods inherited from class javax.swing.table.DefaultTableModel
addColumn, addColumn, addColumn, addRow, addRow, convertToVector, convertToVector, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.table.TableModel
addTableModelListener, getColumnClass, getColumnCount, getColumnName, getRowCount, getValueAt, isCellEditable, removeTableModelListener, setValueAt
 

Constructor Detail

DefaultNavigableTableModel

public DefaultNavigableTableModel()

DefaultNavigableTableModel

public DefaultNavigableTableModel(int rowCount,
                                  int columnCount)

DefaultNavigableTableModel

public DefaultNavigableTableModel(Vector columnNames,
                                  int rowCount)

DefaultNavigableTableModel

public DefaultNavigableTableModel(Object[] columnNames,
                                  int rowCount)

DefaultNavigableTableModel

public DefaultNavigableTableModel(Vector data,
                                  Vector columnNames)

DefaultNavigableTableModel

public DefaultNavigableTableModel(Object[][] data,
                                  Object[] columnNames)
Method Detail

isNavigableAt

public boolean isNavigableAt(int rowIndex,
                             int columnIndex)
Gets if a cell should be navigable at the specified row and column index.

Specified by:
isNavigableAt in interface NavigableModel
Parameters:
rowIndex -
columnIndex -
Returns:
true or false to indicate if a cell should be navigable at the specified row and column index.

setNavigableAt

public void setNavigableAt(int rowIndex,
                           int columnIndex,
                           boolean navigable)
Makes a cell navigable or not navigable. TableCellUpdated event will be fired in this case.

Parameters:
rowIndex - the row index of the cell.
columnIndex - the column index of the cell.
navigable - true or false. True to make the cell navigable. Otherwise false.

setNavigableAll

public void setNavigableAll()
Makes all cells navigable. This method will fire TableDataChanged event.

Note: If you want to turn off the navigation temporarily, you should use setNavigableOn(false).


isNavigationOn

public boolean isNavigationOn()
Description copied from interface: NavigableModel
Checks if the navigation is on. If off, NavigableModel.isNavigableAt(int,int) should always return true for valid indexes.

Specified by:
isNavigationOn in interface NavigableModel
Returns:
true if on, false otherwise

setNavigationOn

public void setNavigationOn(boolean navigableOn)

JIDE 3.5.15