Package jmri.jmrix.lenz.swing.stackmon
Class StackMonDataModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- jmri.jmrix.lenz.swing.stackmon.StackMonDataModel
-
- All Implemented Interfaces:
java.io.Serializable
,javax.swing.table.TableModel
public class StackMonDataModel extends javax.swing.table.AbstractTableModel
Table data model for display of Lenz Command Station Stack information.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.ArrayList<java.lang.Integer>
_addressList
(package private) StackMonFrame
_stackFrame
(package private) java.util.Hashtable<java.lang.Integer,java.lang.String>
_typeList
protected XNetTrafficController
tc
-
Constructor Summary
Constructors Constructor Description StackMonDataModel(int row, int column, XNetSystemConnectionMemo memo)
Constructor for a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearData()
Update the internal data structures for a specified address.java.lang.Class<?>
getColumnClass(int col)
int
getColumnCount()
java.lang.String
getColumnName(int col)
int
getRowCount()
java.lang.Object
getValueAt(int row, int col)
(package private) void
initTable(javax.swing.JTable stackTable, StackMonFrame stackFrame)
boolean
isCellEditable(int row, int col)
void
setValueAt(java.lang.Object value, int row, int col)
void
updateData(java.lang.Integer address, java.lang.String type)
Update the internal data structures for a specified address.-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
-
-
-
Field Detail
-
_stackFrame
StackMonFrame _stackFrame
-
_addressList
java.util.ArrayList<java.lang.Integer> _addressList
-
_typeList
java.util.Hashtable<java.lang.Integer,java.lang.String> _typeList
-
tc
protected XNetTrafficController tc
-
-
Constructor Detail
-
StackMonDataModel
StackMonDataModel(int row, int column, XNetSystemConnectionMemo memo)
Constructor for a new instance.- Parameters:
row
- (unused)column
- (unused)memo
- Provides access to rest of XNet system connection objects
-
-
Method Detail
-
initTable
void initTable(javax.swing.JTable stackTable, StackMonFrame stackFrame)
-
getRowCount
public int getRowCount()
-
getColumnCount
public int getColumnCount()
-
getColumnName
public java.lang.String getColumnName(int col)
- Specified by:
getColumnName
in interfacejavax.swing.table.TableModel
- Overrides:
getColumnName
in classjavax.swing.table.AbstractTableModel
-
getColumnClass
public java.lang.Class<?> getColumnClass(int col)
- Specified by:
getColumnClass
in interfacejavax.swing.table.TableModel
- Overrides:
getColumnClass
in classjavax.swing.table.AbstractTableModel
-
isCellEditable
public boolean isCellEditable(int row, int col)
- Specified by:
isCellEditable
in interfacejavax.swing.table.TableModel
- Overrides:
isCellEditable
in classjavax.swing.table.AbstractTableModel
-
getValueAt
public java.lang.Object getValueAt(int row, int col)
-
setValueAt
public void setValueAt(java.lang.Object value, int row, int col)
- Specified by:
setValueAt
in interfacejavax.swing.table.TableModel
- Overrides:
setValueAt
in classjavax.swing.table.AbstractTableModel
-
updateData
public void updateData(java.lang.Integer address, java.lang.String type)
Update the internal data structures for a specified address.- Parameters:
address
- which address to update.type
- address type.
-
clearData
public void clearData()
Update the internal data structures for a specified address.
-
-