Package jmri.jmrit.cabsignals
Class CabSignalTableModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- jmri.jmrit.cabsignals.CabSignalTableModel
-
- All Implemented Interfaces:
java.io.Serializable
,javax.swing.table.TableModel
public class CabSignalTableModel extends javax.swing.table.AbstractTableModel
Table data model for display of Cab Signaling information.- Since:
- 4.13.4
- See Also:
CabSignalPane
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
BLOCK_DIR
(package private) static java.lang.String[]
COLUMNTOOLTIPS
static int
CURRENT_BLOCK
static int
LOCO_ID_COLUMN
static int
MAX_COLUMN
static int
NEXT_ASPECT
static int
NEXT_ASPECT_ICON
static int
NEXT_BLOCK
static int
NEXT_SIGNAL
static int
REVERSE_BLOCK_DIR_BUTTON_COLUMN
static int
SEND_CABSIG_COLUMN
(package private) static int[]
STARTUPCOLUMNS
-
Constructor Summary
Constructors Constructor Description CabSignalTableModel(int row, int column)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configureTable(javax.swing.JTable cmdStatTable)
Configure a table to have our standard rows and columns.void
dispose()
java.lang.Class<?>
getColumnClass(int col)
int
getColumnCount()
java.lang.String
getColumnName(int col)
Returns String of column name from column int used in table header.static int
getPreferredWidth(int col)
Returns int of startup column widths.int
getRowCount()
java.lang.Object
getValueAt(int row, int col)
boolean
isCellEditable(int row, int col)
protected void
setPanelPauseButton(boolean isPaused)
void
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
-
LOCO_ID_COLUMN
public static final int LOCO_ID_COLUMN
- See Also:
- Constant Field Values
-
SEND_CABSIG_COLUMN
public static final int SEND_CABSIG_COLUMN
- See Also:
- Constant Field Values
-
CURRENT_BLOCK
public static final int CURRENT_BLOCK
- See Also:
- Constant Field Values
-
BLOCK_DIR
public static final int BLOCK_DIR
- See Also:
- Constant Field Values
-
REVERSE_BLOCK_DIR_BUTTON_COLUMN
public static final int REVERSE_BLOCK_DIR_BUTTON_COLUMN
- See Also:
- Constant Field Values
-
NEXT_BLOCK
public static final int NEXT_BLOCK
- See Also:
- Constant Field Values
-
NEXT_SIGNAL
public static final int NEXT_SIGNAL
- See Also:
- Constant Field Values
-
NEXT_ASPECT
public static final int NEXT_ASPECT
- See Also:
- Constant Field Values
-
NEXT_ASPECT_ICON
public static final int NEXT_ASPECT_ICON
- See Also:
- Constant Field Values
-
MAX_COLUMN
public static final int MAX_COLUMN
- See Also:
- Constant Field Values
-
STARTUPCOLUMNS
static final int[] STARTUPCOLUMNS
-
COLUMNTOOLTIPS
static final java.lang.String[] COLUMNTOOLTIPS
-
-
Constructor Detail
-
CabSignalTableModel
CabSignalTableModel(int row, int column)
-
-
Method Detail
-
getRowCount
public int getRowCount()
-
getColumnCount
public int getColumnCount()
-
getColumnName
public java.lang.String getColumnName(int col)
Returns String of column name from column int used in table header.- Specified by:
getColumnName
in interfacejavax.swing.table.TableModel
- Overrides:
getColumnName
in classjavax.swing.table.AbstractTableModel
- Parameters:
col
- int col number
-
getPreferredWidth
public static int getPreferredWidth(int col)
Returns int of startup column widths.- Parameters:
col
- int col number- Returns:
- initial preferred width
-
getColumnClass
public java.lang.Class<?> getColumnClass(int col)
- Specified by:
getColumnClass
in interfacejavax.swing.table.TableModel
- Overrides:
getColumnClass
in classjavax.swing.table.AbstractTableModel
-
isCellEditable
public boolean isCellEditable(int row, int col)
- Specified by:
isCellEditable
in interfacejavax.swing.table.TableModel
- Overrides:
isCellEditable
in classjavax.swing.table.AbstractTableModel
-
configureTable
public void configureTable(javax.swing.JTable cmdStatTable)
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:
cmdStatTable
- Table to be configured
-
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
-
setPanelPauseButton
protected void setPanelPauseButton(boolean isPaused)
-
dispose
public void dispose()
-
-