Class PortalTableModel

  • All Implemented Interfaces:
    java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener, javax.swing.table.TableModel, Disposable

    public class PortalTableModel
    extends javax.swing.table.AbstractTableModel
    implements java.beans.PropertyChangeListener, Disposable
    GUI to define OBlock Portals.

    Can be used with two interfaces:

    • original "desktop" InternalFrames (parent class TableFrames, an extended JmriJFrame)
    • JMRI standard Tabbed tables (parent class JPanel)
    The _tabbed field decides, it is set in prefs (restart required).
    This file is part of JMRI.

    JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.

    JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void dispose()
      Called when disposing of a disposable.
      protected java.lang.String getBeanType()  
      java.lang.Class<?> getColumnClass​(int col)  
      int getColumnCount()  
      java.lang.String getColumnName​(int col)  
      int getPreferredWidth​(int col)  
      int getRowCount()  
      java.lang.Object getValueAt​(int row, int col)  
      void initListeners()  
      boolean isCellEditable​(int row, int col)  
      void propertyChange​(java.beans.PropertyChangeEvent e)  
      void setValueAt​(java.lang.Object value, int row, int col)  
      protected int verifyWarning​(java.lang.String message)  
      • Methods inherited from class javax.swing.table.AbstractTableModel

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

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

      • getColumnCount

        public int getColumnCount()
        Specified by:
        getColumnCount in interface javax.swing.table.TableModel
      • getRowCount

        public int getRowCount()
        Specified by:
        getRowCount in interface javax.swing.table.TableModel
      • getColumnName

        public java.lang.String getColumnName​(int col)
        Specified by:
        getColumnName in interface javax.swing.table.TableModel
        Overrides:
        getColumnName in class javax.swing.table.AbstractTableModel
      • getValueAt

        public java.lang.Object getValueAt​(int row,
                                           int col)
        Specified by:
        getValueAt in interface javax.swing.table.TableModel
      • setValueAt

        public void setValueAt​(java.lang.Object value,
                               int row,
                               int col)
        Specified by:
        setValueAt in interface javax.swing.table.TableModel
        Overrides:
        setValueAt in class javax.swing.table.AbstractTableModel
      • isCellEditable

        public boolean isCellEditable​(int row,
                                      int col)
        Specified by:
        isCellEditable in interface javax.swing.table.TableModel
        Overrides:
        isCellEditable in class javax.swing.table.AbstractTableModel
      • getColumnClass

        public java.lang.Class<?> getColumnClass​(int col)
        Specified by:
        getColumnClass in interface javax.swing.table.TableModel
        Overrides:
        getColumnClass in class javax.swing.table.AbstractTableModel
      • getBeanType

        protected java.lang.String getBeanType()
      • propertyChange

        public void propertyChange​(java.beans.PropertyChangeEvent e)
        Specified by:
        propertyChange in interface java.beans.PropertyChangeListener
      • verifyWarning

        protected int verifyWarning​(java.lang.String message)
      • dispose

        public void dispose()
        Description copied from interface: Disposable
        Called when disposing of a disposable.

        Note there are no assurances this method will not be called multiple times against a single instance of this Disposable. It is the responsibility of this Disposable to protect itself and the application from ensuring that calling this method multiple times has no unwanted side effects.

        Specified by:
        dispose in interface Disposable