Package jmri.jmrit.throttle
Class ThrottlesTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- jmri.jmrit.throttle.ThrottlesTableModel
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener
,java.io.Serializable
,java.util.EventListener
,javax.swing.table.TableModel
,ConsistListListener
public class ThrottlesTableModel extends javax.swing.table.AbstractTableModel implements java.beans.PropertyChangeListener, ConsistListListener
A TableModel to display active Throttles in a summary table (see ThrottlesListPanel)- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ThrottlesTableModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addThrottleFrame(ThrottleWindow tw, ThrottleFrame ntf)
int
getColumnCount()
int
getNumberOfEntriesFor(DccLocoAddress la)
Get the number of usages of a particular Loco Address.int
getRowCount()
java.lang.Object
getValueAt(int i, int i1)
java.util.Iterator<ThrottleFrame>
iterator()
void
notifyConsistListChanged()
Receive notification that the consist manager has changed its consist list.void
propertyChange(java.beans.PropertyChangeEvent e)
void
removeThrottleFrame(ThrottleFrame tf, DccLocoAddress la)
-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getColumnClass, getColumnName, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
-
-
-
-
Constructor Detail
-
ThrottlesTableModel
public ThrottlesTableModel()
-
-
Method Detail
-
getRowCount
public int getRowCount()
- Specified by:
getRowCount
in interfacejavax.swing.table.TableModel
-
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCount
in interfacejavax.swing.table.TableModel
-
getValueAt
public java.lang.Object getValueAt(int i, int i1)
- Specified by:
getValueAt
in interfacejavax.swing.table.TableModel
-
iterator
public java.util.Iterator<ThrottleFrame> iterator()
-
addThrottleFrame
public void addThrottleFrame(ThrottleWindow tw, ThrottleFrame ntf)
-
getNumberOfEntriesFor
public int getNumberOfEntriesFor(@CheckForNull DccLocoAddress la)
Get the number of usages of a particular Loco Address.- Parameters:
la
- the Loco Address, can be null.- Returns:
- 0 if no usages, else number of AddressPanel usages.
-
removeThrottleFrame
public void removeThrottleFrame(ThrottleFrame tf, DccLocoAddress la)
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent e)
- Specified by:
propertyChange
in interfacejava.beans.PropertyChangeListener
-
notifyConsistListChanged
public void notifyConsistListChanged()
Description copied from interface:ConsistListListener
Receive notification that the consist manager has changed its consist list.- Specified by:
notifyConsistListChanged
in interfaceConsistListListener
-
-