Class AddRemoveTablePanel.SimpleTableModel

  • All Implemented Interfaces:
    java.io.Serializable, javax.swing.table.TableModel
    Enclosing class:
    AddRemoveTablePanel

    protected class AddRemoveTablePanel.SimpleTableModel
    extends javax.swing.table.AbstractTableModel
    Table model for imports.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.List<java.lang.String> entries  
      protected java.lang.String name  
      • Fields inherited from class javax.swing.table.AbstractTableModel

        listenerList
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected SimpleTableModel​(java.lang.String name, java.lang.String[] vals)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addValue​(java.lang.String val)  
      int getColumnCount()
      Returns the column count.
      java.lang.String getColumnName​(int column)
      Gets the column name.
      int getRowCount()
      Returns the row count.
      java.lang.Object getValueAt​(int rowIndex, int columnIndex)
      Gets the value.
      boolean isCellEditable​(int rowIndex, int columnIndex)
      Returns whether a cell is editable.
      void removeValue​(int row)  
      void setValueAt​(java.lang.Object value, int rowIndex, int columnIndex)
      Sets the value.
      • Methods inherited from class javax.swing.table.AbstractTableModel

        addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getListeners, getTableModelListeners, removeTableModelListener
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • entries

        protected java.util.List<java.lang.String> entries
      • name

        protected java.lang.String name
    • Constructor Detail

      • SimpleTableModel

        protected SimpleTableModel​(java.lang.String name,
                                   java.lang.String[] vals)
    • Method Detail

      • getColumnName

        public java.lang.String getColumnName​(int column)
        Gets the column name.
        Specified by:
        getColumnName in interface javax.swing.table.TableModel
        Overrides:
        getColumnName in class javax.swing.table.AbstractTableModel
        Returns:
        The column name.
      • isCellEditable

        public boolean isCellEditable​(int rowIndex,
                                      int columnIndex)
        Returns whether a cell is editable.
        Specified by:
        isCellEditable in interface javax.swing.table.TableModel
        Overrides:
        isCellEditable in class javax.swing.table.AbstractTableModel
        Parameters:
        rowIndex - The row being queried.
        columnIndex - The column being queried.
        Returns:
        If a cell is editable.
      • getRowCount

        public int getRowCount()
        Returns the row count.
        Returns:
        The row count.
      • getColumnCount

        public int getColumnCount()
        Returns the column count.
        Returns:
        The column count.
      • getValueAt

        public java.lang.Object getValueAt​(int rowIndex,
                                           int columnIndex)
        Gets the value.
        Parameters:
        rowIndex - The row.
        columnIndex - The column.
        Returns:
        The value.
      • setValueAt

        public void setValueAt​(java.lang.Object value,
                               int rowIndex,
                               int columnIndex)
        Sets the value.
        Specified by:
        setValueAt in interface javax.swing.table.TableModel
        Overrides:
        setValueAt in class javax.swing.table.AbstractTableModel
        Parameters:
        value - The value.
        rowIndex - The row.
        columnIndex - The column.
      • addValue

        public void addValue​(java.lang.String val)
      • removeValue

        public void removeValue​(int row)