Class ResultVectorTableModel

  • All Implemented Interfaces:
    java.io.Serializable, javax.swing.table.TableModel, RevisionHandler

    public class ResultVectorTableModel
    extends javax.swing.table.AbstractTableModel
    implements RevisionHandler

    ResultVectorTableModel.java
    Authors: Rainer Holzmann, Zhanna Melnikova-Albrecht
    Date: Sep 12, 2004
    Time: 9:23:31 PM
    $ Revision 1.4 $

    Version:
    $Revision: 1.4 $
    Author:
    Zhanna Melnikova-Albrecht (melnikov@cip.ifi.lmu.de), Rainer Holzmann (holzmann@cip.ifi.lmu.de)
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ResultVectorTableModel​(FastVector resultVector)
      Constructs a default DefaultTableModel which is a table of zero columns and zero rows.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getColumnCount()
      Returns the number of columns of this model.
      java.lang.String getRevision()
      Returns the revision string.
      int getRowCount()
      Returns the number of rows of this model.
      java.lang.Object getValueAt​(int row, int column)
      Returns the value for the JTable for a given position.
      • 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

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ResultVectorTableModel

        public ResultVectorTableModel​(FastVector resultVector)
        Constructs a default DefaultTableModel which is a table of zero columns and zero rows.
    • Method Detail

      • getRowCount

        public int getRowCount()
        Returns the number of rows of this model. The number of rows is the number of dataObjects stored in the resultVector
        Specified by:
        getRowCount in interface javax.swing.table.TableModel
        Returns:
        the number of rows of this model
      • getColumnCount

        public int getColumnCount()
        Returns the number of columns of this model. The number of columns is 4 (dataObject.key, dataobject, c_dist, r_dist)
        Specified by:
        getColumnCount in interface javax.swing.table.TableModel
        Returns:
        int The number of columns of this model
      • getValueAt

        public java.lang.Object getValueAt​(int row,
                                           int column)
        Returns the value for the JTable for a given position.
        Specified by:
        getValueAt in interface javax.swing.table.TableModel
        Parameters:
        row - The row of the value
        column - The column of the value
        Returns:
        value
      • getRevision

        public java.lang.String getRevision()
        Returns the revision string.
        Specified by:
        getRevision in interface RevisionHandler
        Returns:
        the revision