Package jmri.jmrix.can.cbus.eventtable
Class CbusEventTableDataModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- jmri.jmrix.can.cbus.eventtable.CbusBasicEventTableModel
-
- jmri.jmrix.can.cbus.eventtable.CbusEventTableDataModel
-
- All Implemented Interfaces:
java.io.Serializable
,java.util.EventListener
,javax.swing.table.TableModel
,Disposable
,AbstractMRListener
,CanListener
public class CbusEventTableDataModel extends CbusBasicEventTableModel implements CanListener, Disposable
Table data model for display of CBUS events- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int[]
BUTTON_COLUMNS
static java.lang.String[]
CBUS_EV_TABLE_COL_TOOLTIPS
Get the Column Tooltips.-
Fields inherited from class jmri.jmrix.can.cbus.eventtable.CbusBasicEventTableModel
_mainArray, _memo, ALL_IN_COLUMN, ALL_OFF_COLUMN, ALL_ON_COLUMN, ALL_OUT_COLUMN, ALL_TOTAL_COLUMN, canFrameCols, CANID_COLUMN, COMMENT_COLUMN, DELETE_BUTTON_COLUMN, EVENT_COLUMN, EVENT_DAT_1, EVENT_DAT_2, EVENT_DAT_3, INITIAL_COLS, LATEST_TIMESTAMP_COLUMN, MAX_COLUMN, NAME_COLUMN, NODE_COLUMN, NODENAME_COLUMN, OFF_BUTTON_COLUMN, ON_BUTTON_COLUMN, SESSION_IN_COLUMN, SESSION_OFF_COLUMN, SESSION_ON_COLUMN, SESSION_OUT_COLUMN, SESSION_TOTAL_COLUMN, STATE_COLUMN, STATUS_REQUEST_BUTTON_COLUMN, STLR_OFF_COLUMN, STLR_ON_COLUMN, ta, TOGGLE_BUTTON_COLUMN
-
-
Constructor Summary
Constructors Constructor Description CbusEventTableDataModel(CanSystemConnectionMemo memo, int initialRowSize)
Create a new CbusEventTableDataModel.CbusEventTableDataModel(CanSystemConnectionMemo memo, int row, int column)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
clearAllEvents()
Remove all events from table.void
dispose()
Disconnect from the CBUS.java.lang.Class<?>
getColumnClass(int col)
java.lang.String
getColumnName(int col)
CbusEventBeanData
getEventBeans(int nn, int en, CbusEventDataElements.EvState state)
boolean
isCellEditable(int row, int col)
void
message(CanMessage m)
Called when an outgoing message is sent to the CAN Network.void
reply(CanReply m)
Called when an incoming CanFrame is received from the CAN Network.void
setValueAt(java.lang.Object value, int row, int col)
void
skipSaveOnDispose()
De-register the shut down task which saves table details.-
Methods inherited from class jmri.jmrix.can.cbus.eventtable.CbusBasicEventTableModel
getColumnCount, getEventName, getEvents, getEventString, getEventTableRow, getRowCount, getValueAt, provideEvent, setValueAt2
-
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
-
Methods inherited from interface jmri.jmrix.can.CanListener
addTc, addTc, removeTc, removeTc
-
-
-
-
Field Detail
-
CBUS_EV_TABLE_COL_TOOLTIPS
public static final java.lang.String[] CBUS_EV_TABLE_COL_TOOLTIPS
Get the Column Tooltips.Order needs to match column list
-
BUTTON_COLUMNS
public static final int[] BUTTON_COLUMNS
-
-
Constructor Detail
-
CbusEventTableDataModel
public CbusEventTableDataModel(CanSystemConnectionMemo memo, int row, int column)
-
CbusEventTableDataModel
public CbusEventTableDataModel(@Nonnull CanSystemConnectionMemo memo, int initialRowSize)
Create a new CbusEventTableDataModel.- Parameters:
memo
- System Connection.initialRowSize
- initial array size.
-
-
Method Detail
-
skipSaveOnDispose
public void skipSaveOnDispose()
De-register the shut down task which saves table details.
-
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
-
setValueAt
public void setValueAt(java.lang.Object value, int row, int col)
- Specified by:
setValueAt
in interfacejavax.swing.table.TableModel
- Overrides:
setValueAt
in classCbusBasicEventTableModel
-
message
public void message(CanMessage m)
Called when an outgoing message is sent to the CAN Network.- Specified by:
message
in interfaceCanListener
- Parameters:
m
- the CanMessage being sent.
-
reply
public void reply(CanReply m)
Called when an incoming CanFrame is received from the CAN Network.- Specified by:
reply
in interfaceCanListener
- Parameters:
m
- the CanReply being received.
-
clearAllEvents
protected void clearAllEvents()
Remove all events from table.
-
getEventBeans
public CbusEventBeanData getEventBeans(int nn, int en, CbusEventDataElements.EvState state)
-
dispose
public void dispose()
Disconnect from the CBUS. Check and trigger if need to save table to xml.- Specified by:
dispose
in interfaceDisposable
-
-