Package jmri.jmrix.can.cbus.node
Class CbusNodeSingleEventTableDataModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- jmri.jmrix.can.cbus.node.CbusNodeSingleEventTableDataModel
-
- All Implemented Interfaces:
java.io.Serializable
,javax.swing.table.TableModel
public class CbusNodeSingleEventTableDataModel extends javax.swing.table.AbstractTableModel
Table data model for display of CBUS Node Single Events- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
EV_CURRENT_BIT_COLUMN
static int
EV_CURRENT_HEX_COLUMN
static int
EV_CURRENT_VAL_COLUMN
static int
EV_NUMBER_COLUMN
static int
EV_SELECT_BIT_COLUMN
static int
EV_SELECT_COLUMN
static int
EV_SELECT_HEX_COLUMN
static int
MAX_COLUMN
int[]
newEVs
-
Constructor Summary
Constructors Constructor Description CbusNodeSingleEventTableDataModel(CanSystemConnectionMemo memo, int row, int column, CbusNodeEvent ndEv)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configureTable(javax.swing.JTable eventTable)
Configure a table to have our standard rows and columns.void
dispose()
java.lang.Class<?>
getColumnClass(int col)
int
getColumnCount()
java.lang.String
getColumnName(int col)
Returns String of column name from column int used in table headerint
getCountDirty()
static int
getPreferredWidth(int col)
Returns int of startup column widthsint
getRowCount()
java.lang.Object
getValueAt(int row, int col)
boolean
isCellEditable(int row, int col)
boolean
isSingleEvDirty(int evToCheck)
boolean
isTableDirty()
boolean
isTableLoaded()
void
passEditEvToNode(CbusNodeEditEventFrame frame)
void
passNewEvToNode(CbusNodeEditEventFrame frame)
void
resetnewEVs()
void
setTableModel()
void
setValueAt(java.lang.Object value, int row, int col)
void
updateFromNode(int arrayid, int col)
-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
-
-
-
Field Detail
-
newEVs
public int[] newEVs
-
EV_NUMBER_COLUMN
public static final int EV_NUMBER_COLUMN
- See Also:
- Constant Field Values
-
EV_CURRENT_VAL_COLUMN
public static final int EV_CURRENT_VAL_COLUMN
- See Also:
- Constant Field Values
-
EV_CURRENT_HEX_COLUMN
public static final int EV_CURRENT_HEX_COLUMN
- See Also:
- Constant Field Values
-
EV_CURRENT_BIT_COLUMN
public static final int EV_CURRENT_BIT_COLUMN
- See Also:
- Constant Field Values
-
EV_SELECT_COLUMN
public static final int EV_SELECT_COLUMN
- See Also:
- Constant Field Values
-
EV_SELECT_HEX_COLUMN
public static final int EV_SELECT_HEX_COLUMN
- See Also:
- Constant Field Values
-
EV_SELECT_BIT_COLUMN
public static final int EV_SELECT_BIT_COLUMN
- See Also:
- Constant Field Values
-
MAX_COLUMN
public static final int MAX_COLUMN
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CbusNodeSingleEventTableDataModel
public CbusNodeSingleEventTableDataModel(CanSystemConnectionMemo memo, int row, int column, CbusNodeEvent ndEv)
-
-
Method Detail
-
setTableModel
public final void setTableModel()
-
getRowCount
public int getRowCount()
-
getColumnCount
public int getColumnCount()
-
configureTable
public void configureTable(javax.swing.JTable eventTable)
Configure a table to have our standard rows and columns.This is optional, in that other table formats can use this table model. But we put it here to help keep it consistent.
- Parameters:
eventTable
- Table to configure
-
getColumnName
public java.lang.String getColumnName(int col)
Returns String of column name from column int used in table header- Specified by:
getColumnName
in interfacejavax.swing.table.TableModel
- Overrides:
getColumnName
in classjavax.swing.table.AbstractTableModel
- Parameters:
col
- int col number
-
getPreferredWidth
public static int getPreferredWidth(int col)
Returns int of startup column widths- Parameters:
col
- int col number- Returns:
- preferred initial width
-
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
-
updateFromNode
public void updateFromNode(int arrayid, int col)
-
isTableLoaded
public boolean isTableLoaded()
-
isSingleEvDirty
public boolean isSingleEvDirty(int evToCheck)
-
isTableDirty
public boolean isTableDirty()
-
getCountDirty
public int getCountDirty()
-
resetnewEVs
public void resetnewEVs()
-
passNewEvToNode
public void passNewEvToNode(CbusNodeEditEventFrame frame)
-
passEditEvToNode
public void passEditEvToNode(CbusNodeEditEventFrame frame)
-
dispose
public void dispose()
-
-