ej-technologies

org.gjt.jclasslib.browser.detail.attributes
Class AbstractAttributeTableModel

java.lang.Object
  extended byjavax.swing.table.AbstractTableModel
      extended byorg.gjt.jclasslib.browser.detail.attributes.AbstractAttributeTableModel
All Implemented Interfaces:
Serializable, TableModel

public abstract class AbstractAttributeTableModel
extends AbstractTableModel

Base class for all table models for attributes diaplayed by a AbstractAttributeListDetailPane.

Version:
$Revision: 1.4 $ $Date: 2003/08/18 08:18:35 $
Author:
Ingo Kegel
See Also:
Serialized Form

Field Summary
protected  AttributeInfo attribute
          The associated attribute.
protected static int BASE_COLUMN_COUNT
          Number of default columns.
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
protected AbstractAttributeTableModel(AttributeInfo attribute)
          Constructor.
 
Method Summary
protected abstract  Class doGetColumnClass(int column)
          Attribute specific getColumnClass().
protected abstract  String doGetColumnName(int column)
          Attribute specific getColumnName().
protected abstract  Object doGetValueAt(int row, int column)
          Attribute specific getValueAt().
 Class getColumnClass(int column)
           
 String getColumnName(int column)
           
abstract  int getColumnWidth(int column)
          Get the width of a specified column in pixels.
 TableColumnModel getTableColumnModel()
          Get the associated table column model.
 Object getValueAt(int row, int column)
           
 boolean isCellEditable(int rowIndex, int columnIndex)
           
 void link(int row, int column)
          Link to the destination described by the target of the hyperlink contained in a specific cell.
 void setTableColumnModel(TableColumnModel tableColumnModel)
          Set the associated table column model.
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, 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
getColumnCount, getRowCount
 

Field Detail

BASE_COLUMN_COUNT

protected static final int BASE_COLUMN_COUNT
Number of default columns.

See Also:
Constant Field Values

attribute

protected AttributeInfo attribute
The associated attribute.

Constructor Detail

AbstractAttributeTableModel

protected AbstractAttributeTableModel(AttributeInfo attribute)
Constructor.

Parameters:
attribute - the associated attribute.
Method Detail

isCellEditable

public boolean isCellEditable(int rowIndex,
                              int columnIndex)

getColumnName

public String getColumnName(int column)

getColumnClass

public Class getColumnClass(int column)

getValueAt

public Object getValueAt(int row,
                         int column)

getTableColumnModel

public TableColumnModel getTableColumnModel()
Get the associated table column model.

Returns:
the model

setTableColumnModel

public void setTableColumnModel(TableColumnModel tableColumnModel)
Set the associated table column model.

Parameters:
tableColumnModel - the model

getColumnWidth

public abstract int getColumnWidth(int column)
Get the width of a specified column in pixels.

Parameters:
column - the index ofthe column in the table model
Returns:
the width

doGetValueAt

protected abstract Object doGetValueAt(int row,
                                       int column)
Attribute specific getValueAt().

Parameters:
row - the row number
column - the column number
Returns:
the value

doGetColumnName

protected abstract String doGetColumnName(int column)
Attribute specific getColumnName().

Parameters:
column - the column number
Returns:
the name

doGetColumnClass

protected abstract Class doGetColumnClass(int column)
Attribute specific getColumnClass().

Parameters:
column - the column number
Returns:
the class

link

public void link(int row,
                 int column)
Link to the destination described by the target of the hyperlink contained in a specific cell.

Parameters:
row - the row number of the hyperlink
column - the column number of the hyperlink

ej-technologies