Class EventTableDataModel
java.lang.Object
javax.swing.table.AbstractTableModel
jmri.jmrix.openlcb.swing.eventtable.EventTableDataModel
- All Implemented Interfaces:
Serializable,TableModel
DataModel for the table in the EventTablePane
Persistence is handled via the
jmri.jmrix.openlcb.swing.eventtable.configurexml package. Note that
this class explicitly invokes persistence in the constructor and at shutdown;
the general mechanism to store in panel files is not used here intentionally.
- Since:
- 5.17.3
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int(package private) PropertyChangeListener(package private) PropertyChangeListener(package private) int(package private) static final ArrayList<EventTableDataModel.TripleMemo>(package private) OlcbEventNameStore(package private) boolean(package private) boolean(package private) EventTable(package private) MimicNodeStore(package private) IdTagManagerFields inherited from class javax.swing.table.AbstractTableModel
listenerList -
Constructor Summary
ConstructorsConstructorDescriptionEventTableDataModel(MimicNodeStore store, EventTable stdEventTable, OlcbEventNameStore nameStore) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAuxiliaryInformation(EventID event, String description) voidCreate a new name to/from NodeID association.(package private) voidclear()Remove all existing data, generally just in advance of an update(package private) voidRemove all existing data from currently-present nodes, generally just in advance of an updatestatic void(package private) booleanconsumerPresent(EventID eventID) (package private) voidcsvReadOperation(File file) (package private) voidcsvWriteOperation(File file) Actual write of the CSV filevoidDe-register the Shutdown task.voiddispose()protected voidgetAuxiliaryInformation(EventID event) Class<?>getColumnClass(int col) intgetColumnName(int col) static List<EventTableDataModel.TripleMemo>getMemos()Get all the NodeIDs availablegetNodeName(NodeID nodeID) int(package private) EventTableDataModel.TripleMemogetTripleMemo(int row) getValueAt(int row, int col) (package private) voidprotected void(package private) void(package private) void(package private) voidhandleTableUpdate(int start, int end) Notify the table that the contents have changed.booleanbooleanhasNodeName(NodeID nodeID) (package private) voidhighlightEvent(EventID eventID) (package private) voidhighlightProducer(EventID eventID, NodeID nodeID) protected voidbooleanisCellEditable(int row, int col) voidprotected void(package private) booleanproducerPresent(EventID eventID) voidrecordConsumer(EventID eventID, NodeID nodeID, String rangeSuffix) Record an event-consumer pairvoidrecordProducer(EventID eventID, NodeID nodeID, String rangeSuffix, boolean pcer) Record an event-producer pairvoidsetValueAt(Object value, int row, int col) (package private) voidvoidMethods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
Field Details
-
COL_EVENTID
- See Also:
-
COL_EVENTNAME
- See Also:
-
COL_TRIGGER
- See Also:
-
COL_PRODUCER_NODE
- See Also:
-
COL_PRODUCER_NAME
- See Also:
-
COL_CONSUMER_NODE
- See Also:
-
COL_CONSUMER_NAME
- See Also:
-
COL_CONTEXT_INFO
- See Also:
-
COL_COUNT
- See Also:
-
store
-
stdEventTable
-
nameStore
-
tagManager
-
table
-
sorter
-
popcornModeActive
boolean popcornModeActive -
eventInfoListener
-
eventHandleListener
-
memos
-
lineIncrement
int lineIncrement -
pending
boolean pending
-
-
Constructor Details
-
EventTableDataModel
public EventTableDataModel(MimicNodeStore store, EventTable stdEventTable, OlcbEventNameStore nameStore)
-
-
Method Details
-
getMemos
-
getTripleMemo
-
clearStatics
-
getNodeName
- Parameters:
nodeID- The NodeID being searched for- Returns:
- The name associated with that NodeID or an empty string
-
hasNodeName
- Parameters:
nodeID- The NodeID being searched for- Returns:
- true if there is an associated name
-
getNodeID
- Parameters:
name- The node name being searched for- Returns:
- The NodeID associated with that name or a node ID constructed from the input
-
hasNodeID
- Parameters:
name- The node name being searched for- Returns:
- true if an NodeID is associated with that name
-
addMatch
Create a new name to/from NodeID association.If a previous association exits, this one is ignored.
- Parameters:
nodeID- associated EventIDname- associated name
-
getNodeIDMatches
Get all the NodeIDs available- Returns:
- Set of all available NodeIDs
-
updateAuxiliaryInformation
-
addAuxiliaryInformation
-
getAuxiliaryInformation
-
getAuxiliaryKnownEvents
-
eventInfoChanged
-
handleDescriptionChanged
-
handleDescriptionAdded
-
handleDescriptionErased
-
handleDescriptionUpdated
-
loadNameStoreEventIDs
-
getValueAt
-
setValueAt
- Specified by:
setValueAtin interfaceTableModel- Overrides:
setValueAtin classAbstractTableModel
-
getColumnCount
-
getColumnName
- Specified by:
getColumnNamein interfaceTableModel- Overrides:
getColumnNamein classAbstractTableModel
-
getRowCount
-
isCellEditable
- Specified by:
isCellEditablein interfaceTableModel- Overrides:
isCellEditablein classAbstractTableModel
-
getColumnClass
- Specified by:
getColumnClassin interfaceTableModel- Overrides:
getColumnClassin classAbstractTableModel
-
clear
void clear()Remove all existing data, generally just in advance of an update -
clearAllPresentNodes
void clearAllPresentNodes()Remove all existing data from currently-present nodes, generally just in advance of an update -
handleTableUpdate
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
Record an event-producer pair- Parameters:
eventID- Observed eventnodeID- Node that is known to produce the eventrangeSuffix- the range mask string or "" for single eventspcer- true if this Producer was inferred from a PCER message, false if from a Producer Identified message
-
recordConsumer
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
-
highlightEvent
-
consumerPresent
-
producerPresent
-
csvWriteOperation
Actual write of the CSV file -
csvReadOperation
-
loadModelData
-
dispose
-
initShutdownTask
-
deregisterShutdownTask
De-register the Shutdown task. -
writeNodeNameDetails
- Throws:
IOException
-