Package jmri.jmrit.signalling
Class SignallingPanel.SignalMastModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- jmri.jmrit.signalling.SignallingPanel.TableModel
-
- jmri.jmrit.signalling.SignallingPanel.SignalMastModel
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener
,java.io.Serializable
,java.util.EventListener
,javax.swing.table.TableModel
- Enclosing class:
- SignallingPanel
class SignallingPanel.SignalMastModel extends SignallingPanel.TableModel
Set up table for selecting Signal Masts and an Aspect on each mast Updated for TableRowSorter
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
SignallingPanel.SignalMastModel.AspectComboBoxPanel
A row specific Aspect combobox cell editor/renderer.-
Nested classes/interfaces inherited from class jmri.jmrit.signalling.SignallingPanel.TableModel
SignallingPanel.TableModel.StateComboBoxPanel
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.Hashtable<java.lang.Object,javax.swing.JComboBox<java.lang.String>>
editorMap
-
Fields inherited from class jmri.jmrit.signalling.SignallingPanel.TableModel
INCLUDE_COLUMN, SNAME_COLUMN, STATE_COLUMN, UNAME_COLUMN
-
-
Constructor Summary
Constructors Constructor Description SignalMastModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
configStateColumn(javax.swing.JTable table)
Customize the SignalMast State (Appearance) column to show an appropriate ComboBox of available Aspects.(package private) javax.swing.JComboBox<java.lang.String>
getAspectEditorBox(int row)
Provide a JComboBox element to display inside the JPanel CellEditor.(package private) java.util.Vector<java.lang.String>
getAspectVector(int row)
Holds a Hashtable of valid aspects per signal mast used by getAspectEditorBox()java.lang.Class<?>
getColumnClass(int c)
java.lang.String
getColumnName(int col)
int
getRowCount()
java.lang.String
getValue(java.lang.String name)
java.lang.Object
getValueAt(int r, int c)
void
setValueAt(java.lang.Object type, int r, int c)
-
Methods inherited from class jmri.jmrit.signalling.SignallingPanel.TableModel
dispose, getColumnCount, getStateEditorBox, isCellEditable, propertyChange
-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
-
-
-
Field Detail
-
editorMap
java.util.Hashtable<java.lang.Object,javax.swing.JComboBox<java.lang.String>> editorMap
-
-
Constructor Detail
-
SignalMastModel
SignalMastModel()
-
-
Method Detail
-
getRowCount
public int getRowCount()
-
getValueAt
public java.lang.Object getValueAt(int r, int c)
-
setValueAt
public void setValueAt(java.lang.Object type, int r, int c)
- Specified by:
setValueAt
in interfacejavax.swing.table.TableModel
- Overrides:
setValueAt
in classjavax.swing.table.AbstractTableModel
-
getColumnClass
public java.lang.Class<?> getColumnClass(int c)
- Specified by:
getColumnClass
in interfacejavax.swing.table.TableModel
- Overrides:
getColumnClass
in classSignallingPanel.TableModel
-
getValue
public java.lang.String getValue(java.lang.String name)
-
getColumnName
public java.lang.String getColumnName(int col)
- Specified by:
getColumnName
in interfacejavax.swing.table.TableModel
- Overrides:
getColumnName
in classSignallingPanel.TableModel
-
configStateColumn
protected void configStateColumn(javax.swing.JTable table)
Customize the SignalMast State (Appearance) column to show an appropriate ComboBox of available Aspects.- Overrides:
configStateColumn
in classSignallingPanel.TableModel
- Parameters:
table
- a JTable of Signal Masts
-
getAspectEditorBox
javax.swing.JComboBox<java.lang.String> getAspectEditorBox(int row)
Provide a JComboBox element to display inside the JPanel CellEditor. When not yet present, create, store and return a new one.- Parameters:
row
- Index number (in TableDataModel)- Returns:
- A combobox containing the valid aspect names for this mast
-
getAspectVector
java.util.Vector<java.lang.String> getAspectVector(int row)
Holds a Hashtable of valid aspects per signal mast used by getAspectEditorBox()- Parameters:
row
- Index number (in TableDataModel)- Returns:
- The Vector of valid aspect names for this mast to show in the JComboBox
-
-