jmri.jmrix.loconet.slotmon
Class SlotMonDataModel
java.lang.Object
javax.swing.table.AbstractTableModel
jmri.jmrix.loconet.slotmon.SlotMonDataModel
- All Implemented Interfaces:
- Serializable, EventListener, TableModel, SlotListener
public class SlotMonDataModel
- extends AbstractTableModel
- implements SlotListener
Table data model for display of slot manager contents
- See Also:
- Serialized Form
| 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 |
SLOTCOLUMN
public static final int SLOTCOLUMN
- See Also:
- Constant Field Values
ESTOPCOLUMN
public static final int ESTOPCOLUMN
- See Also:
- Constant Field Values
ADDRCOLUMN
public static final int ADDRCOLUMN
- See Also:
- Constant Field Values
SPDCOLUMN
public static final int SPDCOLUMN
- See Also:
- Constant Field Values
TYPECOLUMN
public static final int TYPECOLUMN
- See Also:
- Constant Field Values
STATCOLUMN
public static final int STATCOLUMN
- See Also:
- Constant Field Values
DISPCOLUMN
public static final int DISPCOLUMN
- See Also:
- Constant Field Values
CONSCOLUMN
public static final int CONSCOLUMN
- See Also:
- Constant Field Values
THROTCOLUMN
public static final int THROTCOLUMN
- See Also:
- Constant Field Values
DIRCOLUMN
public static final int DIRCOLUMN
- See Also:
- Constant Field Values
F0COLUMN
public static final int F0COLUMN
- See Also:
- Constant Field Values
F1COLUMN
public static final int F1COLUMN
- See Also:
- Constant Field Values
F2COLUMN
public static final int F2COLUMN
- See Also:
- Constant Field Values
F3COLUMN
public static final int F3COLUMN
- See Also:
- Constant Field Values
F4COLUMN
public static final int F4COLUMN
- See Also:
- Constant Field Values
F5COLUMN
public static final int F5COLUMN
- See Also:
- Constant Field Values
F6COLUMN
public static final int F6COLUMN
- See Also:
- Constant Field Values
F7COLUMN
public static final int F7COLUMN
- See Also:
- Constant Field Values
F8COLUMN
public static final int F8COLUMN
- See Also:
- Constant Field Values
NUMCOLUMN
public static final int NUMCOLUMN
- See Also:
- Constant Field Values
memo
LocoNetSystemConnectionMemo memo
True
static final Boolean True
False
static final Boolean False
log
static org.slf4j.Logger log
SlotMonDataModel
SlotMonDataModel(int row,
int column,
LocoNetSystemConnectionMemo memo)
getRowCount
public int getRowCount()
- Returns the number of rows to be displayed. This
can vary depending on whether only active rows
are displayed, and whether the system slots should be
displayed.
This should probably use a local cache instead
of counting/searching each time.
- Specified by:
getRowCount in interface TableModel
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCount in interface TableModel
getColumnName
public String getColumnName(int col)
- Specified by:
getColumnName in interface TableModel- Overrides:
getColumnName in class AbstractTableModel
getColumnClass
public Class<?> getColumnClass(int col)
- Specified by:
getColumnClass in interface TableModel- Overrides:
getColumnClass in class AbstractTableModel
isCellEditable
public boolean isCellEditable(int row,
int col)
- Specified by:
isCellEditable in interface TableModel- Overrides:
isCellEditable in class AbstractTableModel
getValueAt
public Object getValueAt(int row,
int col)
- Specified by:
getValueAt in interface TableModel
getPreferredWidth
public int getPreferredWidth(int col)
setValueAt
public void setValueAt(Object value,
int row,
int col)
- Specified by:
setValueAt in interface TableModel- Overrides:
setValueAt in class AbstractTableModel
configureTable
public void configureTable(JTable slotTable)
- Configure a table to have our standard rows and columns.
This is optional, in that other table formats can use this table model.
But we put it here to help keep it consistent.
- Parameters:
slotTable -
setColumnToHoldButton
void setColumnToHoldButton(JTable slotTable,
int column)
setColumnToHoldEStopButton
void setColumnToHoldEStopButton(JTable slotTable,
int column)
notifyChangedSlot
public void notifyChangedSlot(LocoNetSlot s)
- Specified by:
notifyChangedSlot in interface SlotListener
showAllSlots
public void showAllSlots(boolean val)
showSystemSlots
public void showSystemSlots(boolean val)
slotNum
protected int slotNum(int row)
- Returns slot number for a specific row.
This should probably use a local cache instead
of counting/searching each time.
- Parameters:
row - Row number in the displayed table
estopAll
public void estopAll()
- This is a convenience method that makes it easier for classes
using this model to set all in-use slots to emergency stop
dispose
public void dispose()
Copyright © 1997-2013 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.
Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: