Package jmri.jmrit.sensorgroup
Class SensorTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- jmri.jmrit.sensorgroup.BeanTableModel
-
- jmri.jmrit.sensorgroup.SensorTableModel
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener
,java.io.Serializable
,java.util.EventListener
,javax.swing.table.TableModel
public class SensorTableModel extends BeanTableModel implements java.beans.PropertyChangeListener
Model for a simple Sensor JTable.Note that this has a very expensive way of handling changes to the contents of the SensorManager: it recreates an entire local array instead of using the Manager's accessors.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.Boolean[]
_includedSensors
(package private) java.lang.String[]
_sysNameList
-
Fields inherited from class jmri.jmrit.sensorgroup.BeanTableModel
INCLUDE_COLUMN, SNAME_COLUMN, UNAME_COLUMN
-
-
Constructor Summary
Constructors Constructor Description SensorTableModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
SensorManager
getManager()
int
getRowCount()
java.lang.Object
getValueAt(int r, int c)
User name column must be handled by subclass.void
propertyChange(java.beans.PropertyChangeEvent e)
void
setValueAt(java.lang.Object type, int r, int c)
-
Methods inherited from class jmri.jmrit.sensorgroup.BeanTableModel
getColumnClass, getColumnCount, getColumnName, isCellEditable
-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
-
-
-
Field Detail
-
_sysNameList
java.lang.String[] _sysNameList
-
_includedSensors
java.lang.Boolean[] _includedSensors
-
-
Constructor Detail
-
SensorTableModel
public SensorTableModel()
-
-
Method Detail
-
dispose
public void dispose()
-
getManager
public SensorManager getManager()
- Specified by:
getManager
in classBeanTableModel
-
getRowCount
public int getRowCount()
- Specified by:
getRowCount
in interfacejavax.swing.table.TableModel
- Overrides:
getRowCount
in classBeanTableModel
-
getValueAt
public java.lang.Object getValueAt(int r, int c)
Description copied from class:BeanTableModel
User name column must be handled by subclass.- Specified by:
getValueAt
in interfacejavax.swing.table.TableModel
- Overrides:
getValueAt
in classBeanTableModel
-
setValueAt
public void setValueAt(java.lang.Object type, int r, int c)
- Specified by:
setValueAt
in interfacejavax.swing.table.TableModel
- Overrides:
setValueAt
in classjavax.swing.table.AbstractTableModel
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent e)
- Specified by:
propertyChange
in interfacejava.beans.PropertyChangeListener
-
-