Class ArffTable

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, EventListener, Accessible, CellEditorListener, ListSelectionListener, RowSorterListener, TableColumnModelListener, TableModelListener, Scrollable

public class ArffTable extends JTable
A specialized JTable for the Arff-Viewer.
Version:
$Revision: 15916 $
Author:
FracPete (fracpete at waikato dot ac dot nz)
See Also:
  • Constructor Details

    • ArffTable

      public ArffTable()
      initializes with no model
    • ArffTable

      public ArffTable(TableModel model)
      initializes with the given model
      Parameters:
      model - the model to use
  • Method Details

    • setModel

      public void setModel(TableModel model)
      sets the new model
      Overrides:
      setModel in class JTable
      Parameters:
      model - the model to use
    • getCellEditor

      public TableCellEditor getCellEditor(int row, int column)
      returns the cell editor for the given cell
      Overrides:
      getCellEditor in class JTable
      Parameters:
      row - the row index
      column - the column index
      Returns:
      the cell editor
    • isReadOnly

      public boolean isReadOnly()
      returns whether the model is read-only
      Returns:
      true if model is read-only
    • setReadOnly

      public void setReadOnly(boolean value)
      sets whether the model is read-only
      Parameters:
      value - if true the model is set to read-only
    • getPlainColumnName

      public String getPlainColumnName(int columnIndex)
      returns the basically the attribute name of the column and not the HTML column name via getColumnName(int)
      Parameters:
      columnIndex - the column index
      Returns:
      the plain name
    • getStringSelection

      public StringSelection getStringSelection()
      returns the selected content in a StringSelection that can be copied to the clipboard and used in Excel, if nothing is selected the whole table is copied to the clipboard
      Returns:
      the current selection
    • setSearchString

      public void setSearchString(String searchString)
      sets the search string to look for in the table, NULL or "" disables the search
      Parameters:
      searchString - the search string to use
    • getSearchString

      public String getSearchString()
      returns the search string, can be NULL if no search string is set
      Returns:
      the current search string
    • setSelectedColumn

      public void setSelectedColumn(int index)
      sets the selected column
      Parameters:
      index - the column to select
    • tableChanged

      public void tableChanged(TableModelEvent e)
      This fine grain notification tells listeners the exact range of cells, rows, or columns that changed.
      Specified by:
      tableChanged in interface TableModelListener
      Overrides:
      tableChanged in class JTable
      Parameters:
      e - the table event
    • addChangeListener

      public void addChangeListener(ChangeListener l)
      Adds a ChangeListener to the panel
      Parameters:
      l - the listener to add
    • removeChangeListener

      public void removeChangeListener(ChangeListener l)
      Removes a ChangeListener from the panel
      Parameters:
      l - the listener to remove