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 voidaddThrottleFrame(ThrottleWindow tw, ThrottleFrame ntf)intgetColumnCount()intgetNumberOfEntriesFor(DccLocoAddress la)Get the number of usages of a particular Loco Address.intgetRowCount()java.lang.ObjectgetValueAt(int i, int i1)java.util.Iterator<ThrottleFrame>iterator()voidnotifyConsistListChanged()Receive notification that the consist manager has changed its consist list.voidpropertyChange(java.beans.PropertyChangeEvent e)voidremoveThrottleFrame(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:
getRowCountin interfacejavax.swing.table.TableModel
-
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCountin interfacejavax.swing.table.TableModel
-
getValueAt
public java.lang.Object getValueAt(int i, int i1)
- Specified by:
getValueAtin 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:
propertyChangein interfacejava.beans.PropertyChangeListener
-
notifyConsistListChanged
public void notifyConsistListChanged()
Description copied from interface:ConsistListListenerReceive notification that the consist manager has changed its consist list.- Specified by:
notifyConsistListChangedin interfaceConsistListListener
-
-