public class

JXObservationTableModel

extends AbstractTableModel
implements ObservationTableModel
java.lang.Object
   ↳ javax.swing.table.AbstractTableModel
     ↳ vars.annotation.ui.table.JXObservationTableModel

Summary

[Expand]
Inherited Constants
From interface vars.annotation.ui.table.ObservationTableModel
[Expand]
Inherited Fields
From class javax.swing.table.AbstractTableModel
Public Constructors
JXObservationTableModel(TableColumnModel tableColumnModel)
Constructs ...
Public Methods
void addObservation(Observation obs)
Add and observation to the table model.
void clear()
Remove all observations from the model
int getColumnCount()
Gets the columnCount attribute of the ObservationTableModel object
int getNumberOfObservations()
Gets the numberOfObservations attribute of the ObservationTableModel object
Observation getObservationAt(int rowIndex)
Get the observation at the given model index (not view)
int getObservationRow(Observation observation)
Get the model index of the given observation
int getRowCount()
Gets the rowCount attribute of the ObservationTableModel object
Object getValueAt(int rowIndex, int columnIndex)
void redrawAll()
Fires a table data changed event which will cause a redraw of the table
void redrawRow(int row)
Description of the Method
void removeObservation(Observation obs)
NOTE: If an observation has a videoFrame attached to it, it will NOT be removed from the model.
void updateObservation(Observation observation)
[Expand]
Inherited Methods
From class javax.swing.table.AbstractTableModel
From class java.lang.Object
From interface javax.swing.table.TableModel
From interface vars.annotation.ui.table.ObservationTableModel

Public Constructors

public JXObservationTableModel (TableColumnModel tableColumnModel)

Constructs ...

Public Methods

public void addObservation (Observation obs)

Add and observation to the table model. THe obs must have a primary key. If an observation with the same primary key already exists in the model then the new observation will NOT be added.

Parameters
obs The observation to add

public void clear ()

Remove all observations from the model

public int getColumnCount ()

Gets the columnCount attribute of the ObservationTableModel object

Returns
  • The number of columns in the table model

public int getNumberOfObservations ()

Gets the numberOfObservations attribute of the ObservationTableModel object

Returns
  • The number of rows in the table model

public Observation getObservationAt (int rowIndex)

Get the observation at the given model index (not view)

Parameters
rowIndex THe row of interest
Returns
  • THe observation at the row of interest

public int getObservationRow (Observation observation)

Get the model index of the given observation

Parameters
observation THe observation of interest
Returns
  • The row number containing the observation

public int getRowCount ()

Gets the rowCount attribute of the ObservationTableModel object

Returns
  • The number of rows in the table model

public Object getValueAt (int rowIndex, int columnIndex)

Returns
  • THe value at the given row and column

public void redrawAll ()

Fires a table data changed event which will cause a redraw of the table

public void redrawRow (int row)

Description of the Method

Parameters
row Description of the Parameter

public void removeObservation (Observation obs)

NOTE: If an observation has a videoFrame attached to it, it will NOT be removed from the model. You must first remove it's videoFrame!!

Parameters
obs The observation to be removed.

public void updateObservation (Observation observation)