JIDE 3.5.15

com.jidesoft.grid
Class AbstractStyleTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by com.jidesoft.grid.AbstractStyleTableModel
All Implemented Interfaces:
StyleModel, StyleTableModel, Serializable, TableModel

public abstract class AbstractStyleTableModel
extends AbstractTableModel
implements StyleTableModel

AbstractStyleTableModel adds StyleModel support to AbstractTableModel. You can use it as replacement for AbstractTableModel. It implements both methods in StyleModel by returning false in StyleModel.isCellStyleOn() and returning null in StyleModel.getCellStyleAt(int, int). Subclass can override the default implementation.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
protected AbstractStyleTableModel()
           
 
Method Summary
 CellStyle getCellStyleAt(int rowIndex, int columnIndex)
          Gets the cell style at the specified row and column.
 boolean isCellStyleOn()
          Checks if the style is on.
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getColumnName, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
 
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

AbstractStyleTableModel

protected AbstractStyleTableModel()
Method Detail

getCellStyleAt

public CellStyle getCellStyleAt(int rowIndex,
                                int columnIndex)
Description copied from interface: StyleModel
Gets the cell style at the specified row and column.

Specified by:
getCellStyleAt in interface StyleModel
Parameters:
rowIndex - the row index
columnIndex - the column index
Returns:
CellStyle object.

isCellStyleOn

public boolean isCellStyleOn()
Description copied from interface: StyleModel
Checks if the style is on. The CellStyleTable will ignore all the CellStyles defined in this model if this method returns false.

Specified by:
isCellStyleOn in interface StyleModel
Returns:
true if style is on. Otherwise false.

JIDE 3.5.15