Package jmri.jmrix.openlcb.swing.lccpro
Class LccProTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- javax.swing.table.DefaultTableModel
-
- jmri.jmrix.openlcb.swing.lccpro.LccProTableModel
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener
,java.io.Serializable
,java.util.EventListener
,javax.swing.table.TableModel
public class LccProTableModel extends javax.swing.table.DefaultTableModel implements java.beans.PropertyChangeListener
Table data model for display of LCC node values.Any desired ordering, etc, is handled outside this class.
- Since:
- 5.11.1
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
CONFIGURECOL
static int
IDCOL
(package private) CanSystemConnectionMemo
memo
(package private) static int
MFGCOL
(package private) static int
MODELCOL
(package private) static int
NAMECOL
(package private) MimicNodeStore
nodestore
static int
NUMCOL
(package private) static int
SVERSIONCOL
static int
UPGRADECOL
-
Constructor Summary
Constructors Constructor Description LccProTableModel(CanSystemConnectionMemo memo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
void
forceFocus()
java.lang.Class<?>
getColumnClass(int col)
int
getColumnCount()
java.lang.String
getColumnName(int col)
int
getPreferredWidth(int column)
int
getRowCount()
java.lang.Object
getValueAt(int row, int col)
Provides an empty string for a column if the model returns null for that value.boolean
isCellEditable(int row, int col)
void
propertyChange(java.beans.PropertyChangeEvent e)
void
setValueAt(java.lang.Object value, int row, int col)
-
Methods inherited from class javax.swing.table.DefaultTableModel
addColumn, addColumn, addColumn, addRow, addRow, convertToVector, convertToVector, getDataVector, insertRow, insertRow, moveRow, newDataAvailable, newRowsAdded, removeRow, rowsRemoved, setColumnCount, setColumnIdentifiers, setColumnIdentifiers, setDataVector, setDataVector, setNumRows, setRowCount
-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
-
-
-
Field Detail
-
NAMECOL
static final int NAMECOL
- See Also:
- Constant Field Values
-
IDCOL
public static final int IDCOL
- See Also:
- Constant Field Values
-
MFGCOL
static final int MFGCOL
- See Also:
- Constant Field Values
-
MODELCOL
static final int MODELCOL
- See Also:
- Constant Field Values
-
SVERSIONCOL
static final int SVERSIONCOL
- See Also:
- Constant Field Values
-
CONFIGURECOL
public static final int CONFIGURECOL
- See Also:
- Constant Field Values
-
UPGRADECOL
public static final int UPGRADECOL
- See Also:
- Constant Field Values
-
NUMCOL
public static final int NUMCOL
- See Also:
- Constant Field Values
-
nodestore
MimicNodeStore nodestore
-
-
Constructor Detail
-
LccProTableModel
public LccProTableModel(CanSystemConnectionMemo memo)
-
-
Method Detail
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent e)
- Specified by:
propertyChange
in interfacejava.beans.PropertyChangeListener
-
getRowCount
public int getRowCount()
- Specified by:
getRowCount
in interfacejavax.swing.table.TableModel
- Overrides:
getRowCount
in classjavax.swing.table.DefaultTableModel
-
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCount
in interfacejavax.swing.table.TableModel
- Overrides:
getColumnCount
in classjavax.swing.table.DefaultTableModel
-
getColumnName
public java.lang.String getColumnName(int col)
- Specified by:
getColumnName
in interfacejavax.swing.table.TableModel
- Overrides:
getColumnName
in classjavax.swing.table.DefaultTableModel
-
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)
Note that the table can be set to be non-editable when constructed, in which case this always returns false.
- Specified by:
isCellEditable
in interfacejavax.swing.table.TableModel
- Overrides:
isCellEditable
in classjavax.swing.table.DefaultTableModel
- Returns:
- true if cell is editable
-
getValueAt
public java.lang.Object getValueAt(int row, int col)
Provides an empty string for a column if the model returns null for that value.- Specified by:
getValueAt
in interfacejavax.swing.table.TableModel
- Overrides:
getValueAt
in classjavax.swing.table.DefaultTableModel
-
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.DefaultTableModel
-
forceFocus
public void forceFocus()
-
getPreferredWidth
public int getPreferredWidth(int column)
-
dispose
public void dispose()
-
-