org.globus.cog.gui.grapheditor.util.tables
Class IntrospectiveTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by org.globus.cog.gui.grapheditor.util.tables.IntrospectiveTableModel
All Implemented Interfaces:
PropertyChangeListener, Serializable, EventListener, TableModel

public class IntrospectiveTableModel
extends AbstractTableModel
implements TableModel, PropertyChangeListener

A table model that displays components and their properties. The collumns are automatically generated based on the common properties of the contained objects. If there are no common properties, nothing will be displayed.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
IntrospectiveTableModel()
           
IntrospectiveTableModel(Collection objects)
           
 
Method Summary
 Class getColumnClass(int columnIndex)
           
 int getColumnCount()
           
 String getColumnName(int columnIndex)
           
 LinkedHashMap getColumns()
           
 int getRowCount()
           
 Object getValueAt(int rowIndex, int columnIndex)
           
 boolean isCellEditable(int row, int col)
           
 void propertyChange(PropertyChangeEvent evt)
           
 void repaintNode(NodeComponent component)
           
 void setColumns(LinkedHashMap columns)
           
 void setObjects(Collection objects)
           
protected  void updateColumnList()
           
 
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
addTableModelListener, removeTableModelListener, setValueAt
 

Constructor Detail

IntrospectiveTableModel

public IntrospectiveTableModel(Collection objects)

IntrospectiveTableModel

public IntrospectiveTableModel()
Method Detail

setObjects

public void setObjects(Collection objects)

updateColumnList

protected void updateColumnList()

getRowCount

public int getRowCount()
Specified by:
getRowCount in interface TableModel

getColumnCount

public int getColumnCount()
Specified by:
getColumnCount in interface TableModel

getValueAt

public Object getValueAt(int rowIndex,
                         int columnIndex)
Specified by:
getValueAt in interface TableModel

getColumnName

public String getColumnName(int columnIndex)
Specified by:
getColumnName in interface TableModel
Overrides:
getColumnName in class AbstractTableModel

getColumnClass

public Class getColumnClass(int columnIndex)
Specified by:
getColumnClass in interface TableModel
Overrides:
getColumnClass in class AbstractTableModel

isCellEditable

public boolean isCellEditable(int row,
                              int col)
Specified by:
isCellEditable in interface TableModel
Overrides:
isCellEditable in class AbstractTableModel

propertyChange

public void propertyChange(PropertyChangeEvent evt)
Specified by:
propertyChange in interface PropertyChangeListener

repaintNode

public void repaintNode(NodeComponent component)

getColumns

public LinkedHashMap getColumns()

setColumns

public void setColumns(LinkedHashMap columns)