Class CbusEventRequestDataModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- jmri.jmrix.can.cbus.swing.eventrequestmonitor.CbusEventRequestDataModel
-
- All Implemented Interfaces:
java.io.Serializable
,java.util.EventListener
,javax.swing.table.TableModel
,AbstractMRListener
,CanListener
public class CbusEventRequestDataModel extends javax.swing.table.AbstractTableModel implements CanListener
Table data model for display of Cbus request events- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
_context
protected int
_contype
protected java.util.ArrayList<CbusEventRequestMonitorEvent>
_mainArray
(package private) static java.lang.String[]
columnToolTips
static int
DELETE_BUTTON_COLUMN
static int
EVENT_COLUMN
static int
FEEDBACKEVENT_COLUMN
static int
FEEDBACKNODE_COLUMN
static int
FEEDBACKOUTSTANDING_COLUMN
static int
FEEDBACKREQUIRED_COLUMN
static int
FEEDBACKTIMEOUT_COLUMN
static int
LASTFEEDBACK_COLUMN
static int
LATEST_TIMESTAMP_COLUMN
static int
MAX_COLUMN
static int
NAME_COLUMN
static int
NODE_COLUMN
static int
STATUS_REQUEST_BUTTON_COLUMN
protected TextAreaFIFO
tablefeedback
-
Constructor Summary
Constructors Constructor Description CbusEventRequestDataModel(CanSystemConnectionMemo memo, int row, int column)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEvent(int node, int event, CbusEventDataElements.EvState state, java.util.Date timestamp)
void
addToLog(int cbuserror, java.lang.String cbustext)
Add to Event Table Console Logvoid
dispose()
disconnect from the CBUSprotected int
eventRow(int nn, int en)
protected int
extraFeedbackRow(int nn, int en)
java.lang.Class<?>
getColumnClass(int col)
Returns column class type.int
getColumnCount()
java.lang.String
getColumnName(int col)
Returns String of column name from column int used in table headerint
getRowCount()
Return the number of rows to be displayed.java.lang.Object
getValueAt(int row, int col)
Return table valuesboolean
isCellEditable(int row, int col)
Boolean return to edit table cell or notvoid
message(CanMessage m)
Called when an outgoing message is sent to the CAN Network.void
reply(CanReply r)
Called when an incoming CanFrame is received from the CAN Network.void
setValueAt(java.lang.Object value, int row, int col)
Capture new comments or node names.protected TextAreaFIFO
tablefeedback()
-
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
-
_contype
protected int _contype
-
_context
protected java.lang.String _context
-
_mainArray
protected java.util.ArrayList<CbusEventRequestMonitorEvent> _mainArray
-
tablefeedback
protected TextAreaFIFO tablefeedback
-
EVENT_COLUMN
public static final int EVENT_COLUMN
- See Also:
- Constant Field Values
-
NODE_COLUMN
public static final int NODE_COLUMN
- See Also:
- Constant Field Values
-
NAME_COLUMN
public static final int NAME_COLUMN
- See Also:
- Constant Field Values
-
LATEST_TIMESTAMP_COLUMN
public static final int LATEST_TIMESTAMP_COLUMN
- See Also:
- Constant Field Values
-
STATUS_REQUEST_BUTTON_COLUMN
public static final int STATUS_REQUEST_BUTTON_COLUMN
- See Also:
- Constant Field Values
-
LASTFEEDBACK_COLUMN
public static final int LASTFEEDBACK_COLUMN
- See Also:
- Constant Field Values
-
FEEDBACKOUTSTANDING_COLUMN
public static final int FEEDBACKOUTSTANDING_COLUMN
- See Also:
- Constant Field Values
-
FEEDBACKREQUIRED_COLUMN
public static final int FEEDBACKREQUIRED_COLUMN
- See Also:
- Constant Field Values
-
FEEDBACKTIMEOUT_COLUMN
public static final int FEEDBACKTIMEOUT_COLUMN
- See Also:
- Constant Field Values
-
FEEDBACKEVENT_COLUMN
public static final int FEEDBACKEVENT_COLUMN
- See Also:
- Constant Field Values
-
FEEDBACKNODE_COLUMN
public static final int FEEDBACKNODE_COLUMN
- See Also:
- Constant Field Values
-
DELETE_BUTTON_COLUMN
public static final int DELETE_BUTTON_COLUMN
- See Also:
- Constant Field Values
-
MAX_COLUMN
public static final int MAX_COLUMN
- See Also:
- Constant Field Values
-
columnToolTips
static final java.lang.String[] columnToolTips
-
-
Constructor Detail
-
CbusEventRequestDataModel
CbusEventRequestDataModel(CanSystemConnectionMemo memo, int row, int column)
-
-
Method Detail
-
getRowCount
public int getRowCount()
Return the number of rows to be displayed.- Specified by:
getRowCount
in interfacejavax.swing.table.TableModel
-
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCount
in interfacejavax.swing.table.TableModel
-
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
-
getColumnClass
public java.lang.Class<?> getColumnClass(int col)
Returns column class type.- Specified by:
getColumnClass
in interfacejavax.swing.table.TableModel
- Overrides:
getColumnClass
in classjavax.swing.table.AbstractTableModel
-
isCellEditable
public boolean isCellEditable(int row, int col)
Boolean return to edit table cell or not- Specified by:
isCellEditable
in interfacejavax.swing.table.TableModel
- Overrides:
isCellEditable
in classjavax.swing.table.AbstractTableModel
- Returns:
- boolean
-
getValueAt
public java.lang.Object getValueAt(int row, int col)
Return table values- Specified by:
getValueAt
in interfacejavax.swing.table.TableModel
- Parameters:
row
- int row numbercol
- int col number
-
setValueAt
public void setValueAt(java.lang.Object value, int row, int col)
Capture new comments or node names. Button events- Specified by:
setValueAt
in interfacejavax.swing.table.TableModel
- Overrides:
setValueAt
in classjavax.swing.table.AbstractTableModel
- Parameters:
value
- object valuerow
- int row numbercol
- int col number
-
message
public void message(CanMessage m)
Description copied from interface:CanListener
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 r)
Description copied from interface:CanListener
Called when an incoming CanFrame is received from the CAN Network.- Specified by:
reply
in interfaceCanListener
- Parameters:
r
- the CanReply being received.
-
eventRow
protected int eventRow(int nn, int en)
-
extraFeedbackRow
protected int extraFeedbackRow(int nn, int en)
-
addEvent
public void addEvent(int node, int event, CbusEventDataElements.EvState state, java.util.Date timestamp)
-
addToLog
public void addToLog(int cbuserror, java.lang.String cbustext)
Add to Event Table Console Log- Parameters:
cbuserror
- intcbustext
- String console message
-
dispose
public void dispose()
disconnect from the CBUS
-
tablefeedback
protected TextAreaFIFO tablefeedback()
-
-