Package moss

Class MoSSTable

All Implemented Interfaces:
Serializable, TableModel

public class MoSSTable extends AbstractTableModel implements Serializable
Class for data tables for molecular substructure mining.

This data table class is implemented as a subclass of AbstractTableModel so that it can be displayed directly in a JTable.

Since:
2007.02.15
See Also:
  • Field Details

  • Constructor Details

    • MoSSTable

      public MoSSTable(int mode, String format)
      Create a data table.
      Parameters:
      mode - the table mode
      format - the format of the input
      Since:
      2007.02.15 (Christian Borgelt)
  • Method Details

    • getRowCount

      public int getRowCount()
      Get the number of rows of the table.
      Specified by:
      getRowCount in interface TableModel
      Returns:
      the number of rows of the table
      Since:
      2007.02.15 (Christian Borgelt)
    • getColumnCount

      public int getColumnCount()
      Get the number of columns of the data table.
      Specified by:
      getColumnCount in interface TableModel
      Returns:
      the number of columns of the data table
      Since:
      2007.02.15 (Christian Borgelt)
    • getColumnName

      public String getColumnName(int col)
      Get the name of a column given its index.
      Specified by:
      getColumnName in interface TableModel
      Overrides:
      getColumnName in class AbstractTableModel
      Parameters:
      col - the index of the column
      Returns:
      the name of the column with the given index
      Since:
      2007.02.15 (Christian Borgelt)
    • isCellEditable

      public boolean isCellEditable(int row, int col)
      Returns whether a table cell is editable.

      Editing is currently not supported.

      Specified by:
      isCellEditable in interface TableModel
      Overrides:
      isCellEditable in class AbstractTableModel
      Parameters:
      row - the row of the cell to access; must be in the range 0 to getRowCount()-1
      col - the column of the cell to access; must be in the range 0 to getColumnCount()-1
      Returns:
      whether the specified cell is editable
      Since:
      2007.02.15 (Christian Borgelt)
    • getValueAt

      public Object getValueAt(int row, int col)
      Get the value of a table cell as an object.
      Specified by:
      getValueAt in interface TableModel
      Parameters:
      row - the row of the cell to access; must be in the range 0 to getRowCount()-1
      col - the column of the cell to access; must be in the range 0 to getColumnCount()-1
      Returns:
      an object representing the value in the specified cell
      Since:
      2007.02.15 (Christian Borgelt)
    • setValueAt

      public void setValueAt(Object value, int row, int col)
      Set the value of a table cell from an object.
      Specified by:
      setValueAt in interface TableModel
      Overrides:
      setValueAt in class AbstractTableModel
      Parameters:
      value - the value to set in the specified cell
      row - the row of the cell to set; must be in the range 0 to getRowCount()-1
      col - the column of the cell to set; must be in the range 0 to getColumnCount()-1
      Since:
      2007.02.15 (Christian Borgelt)
    • read

      public void read(File file) throws IOException
      Read table from an input stream.
      Parameters:
      file - the file to read from
      Throws:
      IOException - if reading the file failed
      Since:
      2007.02.08 (Christian Borgelt)