Class EventTablePane.EventTableDataModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- jmri.jmrix.openlcb.swing.eventtable.EventTablePane.EventTableDataModel
-
- All Implemented Interfaces:
java.io.Serializable
,javax.swing.table.TableModel
- Enclosing class:
- EventTablePane
protected static class EventTablePane.EventTableDataModel extends javax.swing.table.AbstractTableModel
Nested class to hold data model- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
EventTablePane.EventTableDataModel.TripleMemo
-
Field Summary
Fields Modifier and Type Field Description (package private) static int
COL_CONSUMER_NAME
(package private) static int
COL_CONSUMER_NODE
(package private) static int
COL_CONTEXT_INFO
(package private) static int
COL_COUNT
(package private) static int
COL_EVENTID
(package private) static int
COL_EVENTNAME
(package private) static int
COL_PRODUCER_NAME
(package private) static int
COL_PRODUCER_NODE
(package private) int
lineIncrement
(package private) static java.util.ArrayList<EventTablePane.EventTableDataModel.TripleMemo>
memos
(package private) OlcbEventNameStore
nameStore
(package private) boolean
pending
(package private) boolean
popcornModeActive
(package private) javax.swing.table.TableRowSorter<EventTablePane.EventTableDataModel>
sorter
(package private) EventTable
stdEventTable
(package private) MimicNodeStore
store
(package private) javax.swing.JTable
table
(package private) IdTagManager
tagManager
-
Constructor Summary
Constructors Constructor Description EventTableDataModel(MimicNodeStore store, EventTable stdEventTable, OlcbEventNameStore nameStore)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
clear()
Remove all existing data, generally just in advance of an update(package private) boolean
consumerPresent(EventID eventID)
java.lang.Class<?>
getColumnClass(int col)
int
getColumnCount()
java.lang.String
getColumnName(int col)
int
getRowCount()
(package private) EventTablePane.EventTableDataModel.TripleMemo
getTripleMemo(int row)
java.lang.Object
getValueAt(int row, int col)
(package private) void
handleTableUpdate(int start, int end)
Notify the table that the contents have changed.(package private) void
highlightEvent(EventID eventID)
(package private) void
highlightProducer(EventID eventID, NodeID nodeID)
boolean
isCellEditable(int row, int col)
(package private) void
loadIdTagEventIDs()
(package private) boolean
producerPresent(EventID eventID)
(package private) void
recordConsumer(EventID eventID, NodeID nodeID, java.lang.String rangeSuffix)
Record an event-consumer pair(package private) void
recordProducer(EventID eventID, NodeID nodeID, java.lang.String rangeSuffix)
Record an event-producer pairvoid
setValueAt(java.lang.Object value, int row, int col)
-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
-
-
-
Field Detail
-
COL_EVENTID
static final int COL_EVENTID
- See Also:
- Constant Field Values
-
COL_EVENTNAME
static final int COL_EVENTNAME
- See Also:
- Constant Field Values
-
COL_PRODUCER_NODE
static final int COL_PRODUCER_NODE
- See Also:
- Constant Field Values
-
COL_PRODUCER_NAME
static final int COL_PRODUCER_NAME
- See Also:
- Constant Field Values
-
COL_CONSUMER_NODE
static final int COL_CONSUMER_NODE
- See Also:
- Constant Field Values
-
COL_CONSUMER_NAME
static final int COL_CONSUMER_NAME
- See Also:
- Constant Field Values
-
COL_CONTEXT_INFO
static final int COL_CONTEXT_INFO
- See Also:
- Constant Field Values
-
COL_COUNT
static final int COL_COUNT
- See Also:
- Constant Field Values
-
store
MimicNodeStore store
-
stdEventTable
EventTable stdEventTable
-
nameStore
OlcbEventNameStore nameStore
-
tagManager
IdTagManager tagManager
-
table
javax.swing.JTable table
-
sorter
javax.swing.table.TableRowSorter<EventTablePane.EventTableDataModel> sorter
-
popcornModeActive
boolean popcornModeActive
-
lineIncrement
int lineIncrement
-
memos
static java.util.ArrayList<EventTablePane.EventTableDataModel.TripleMemo> memos
-
pending
boolean pending
-
-
Constructor Detail
-
EventTableDataModel
EventTableDataModel(MimicNodeStore store, EventTable stdEventTable, OlcbEventNameStore nameStore)
-
-
Method Detail
-
getTripleMemo
EventTablePane.EventTableDataModel.TripleMemo getTripleMemo(int row)
-
loadIdTagEventIDs
void loadIdTagEventIDs()
-
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
-
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
-
getRowCount
public int getRowCount()
-
isCellEditable
public boolean isCellEditable(int row, int col)
- Specified by:
isCellEditable
in interfacejavax.swing.table.TableModel
- Overrides:
isCellEditable
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
-
clear
void clear()
Remove all existing data, generally just in advance of an update
-
handleTableUpdate
void handleTableUpdate(int start, int end)
Notify the table that the contents have changed. To reduce CPU load, this batches the changes- Parameters:
start
- first row changed; -1 means entire table (not used yet)end
- last row changed; -1 means entire table (not used yet)
-
recordProducer
void recordProducer(EventID eventID, NodeID nodeID, java.lang.String rangeSuffix)
Record an event-producer pair- Parameters:
eventID
- Observed eventnodeID
- Node that is known to produce the eventrangeSuffix
- the range mask string or "" for single events
-
recordConsumer
void recordConsumer(EventID eventID, NodeID nodeID, java.lang.String rangeSuffix)
Record an event-consumer pair- Parameters:
eventID
- Observed eventnodeID
- Node that is known to consume the eventrangeSuffix
- the range mask string or "" for single events
-
highlightProducer
void highlightProducer(EventID eventID, NodeID nodeID)
-
highlightEvent
void highlightEvent(EventID eventID)
-
consumerPresent
boolean consumerPresent(EventID eventID)
-
producerPresent
boolean producerPresent(EventID eventID)
-
-