org.tastybug.bugwerk.bugtrail.widget.incident
Class IncidentTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by org.tastybug.bugwerk.bugtrail.widget.incident.IncidentTableModel
All Implemented Interfaces:
Serializable, TableModel

public class IncidentTableModel
extends AbstractTableModel

This is the table model of IncidentTable.


Copyright 2006 Philipp Bartsch.
www.tastybug.com

Created on Feb 8, 2006

Author:
Philipp Bartsch, philipp.bartsch{at}tastybug{dot}com
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
protected IncidentTableModel(Incident _incident)
          Initialises the model, using the content of _incident.
 
Method Summary
 Class getColumnClass(int c)
          Returns always String.class.
 int getColumnCount()
          Returns 2, as 2 columns are to be displayed (property key/value and respectively attachment/path).
 String getColumnName(int col)
          Returns an empty string, no column names available yet.
 int getRowCount()
          Returns the number of properties + number of attachments.
 Object getValueAt(int row, int col)
          Returns a cell value.
 boolean isEditable()
          Returns false.
 void update(Incident changedIncident)
          Re-reads the incident, as it has changed.
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IncidentTableModel

protected IncidentTableModel(Incident _incident)
Initialises the model, using the content of _incident.

Parameters:
_incident - the incident
Method Detail

update

public void update(Incident changedIncident)
Re-reads the incident, as it has changed.

Parameters:
changedIncident - the changed incident

getColumnName

public String getColumnName(int col)
Returns an empty string, no column names available yet.

Specified by:
getColumnName in interface TableModel
Overrides:
getColumnName in class AbstractTableModel
See Also:
AbstractTableModel.getColumnName(int)

getColumnCount

public int getColumnCount()
Returns 2, as 2 columns are to be displayed (property key/value and respectively attachment/path).

See Also:
TableModel.getColumnCount()

isEditable

public boolean isEditable()
Returns false.

Returns:
false

getRowCount

public int getRowCount()
Returns the number of properties + number of attachments.

See Also:
TableModel.getRowCount()

getValueAt

public Object getValueAt(int row,
                         int col)
Returns a cell value.

See Also:
TableModel.getValueAt(int, int)

getColumnClass

public Class getColumnClass(int c)
Returns always String.class.

Specified by:
getColumnClass in interface TableModel
Overrides:
getColumnClass in class AbstractTableModel
See Also:
AbstractTableModel.getColumnClass(int)


Copyright © 2006-2007 TastyBug Development. All Rights Reserved.