Package jmri.jmrit.beantable.oblock
Class OBlockTableModel.SpeedComboBoxPanel
- java.lang.Object
-
- javax.swing.AbstractCellEditor
-
- javax.swing.DefaultCellEditor
-
- jmri.jmrit.beantable.RowComboBoxPanel
-
- jmri.jmrit.beantable.oblock.OBlockTableModel.SpeedComboBoxPanel
-
- All Implemented Interfaces:
java.io.Serializable
,javax.swing.CellEditor
,javax.swing.table.TableCellEditor
,javax.swing.table.TableCellRenderer
,javax.swing.tree.TreeCellEditor
- Enclosing class:
- OBlockTableModel
public static class OBlockTableModel.SpeedComboBoxPanel extends RowComboBoxPanel
Provide a table cell renderer looking like a JComboBox as an editor/renderer for the OBlock table SPEED column.This is a lightweight version of the
RowComboBoxPanel
RowComboBox cell editor class, some of the hashtables not needed here since we only need identical options for all rows in a column. see jmri.jmrit.signalling.SignallingPanel.SignalMastModel.AspectComboBoxPanel for a full application with row specific comboBox choices.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class jmri.jmrit.beantable.RowComboBoxPanel
comboBoxFocusRequester, consumeComboBoxActionEvent, currentRow, editor, prevItem, renderer, startEditingEvent, table, tableListenerAdded
-
-
Constructor Summary
Constructors Constructor Description SpeedComboBoxPanel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
eventEditorMousePressed()
Open combobox (Editor) when clicked.protected javax.swing.JComboBox<java.lang.String>
getEditorBox(int row)
Call the method in the surrounding method for the OBlockTable.-
Methods inherited from class jmri.jmrit.beantable.RowComboBoxPanel
eventRowComboBoxActionPerformed, eventTableSelectionChanged, getCellEditorValue, getCurrentRow, getEditorComponent, getRendererComponent, getTableCellEditorComponent, getTableCellRendererComponent, isCellEditable, setItems, updateData
-
Methods inherited from class javax.swing.DefaultCellEditor
cancelCellEditing, getClickCountToStart, getComponent, getTreeCellEditorComponent, setClickCountToStart, shouldSelectCell, stopCellEditing
-
Methods inherited from class javax.swing.AbstractCellEditor
addCellEditorListener, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, removeCellEditorListener
-
-
-
-
Constructor Detail
-
SpeedComboBoxPanel
public SpeedComboBoxPanel()
-
-
Method Detail
-
eventEditorMousePressed
protected final void eventEditorMousePressed()
Description copied from class:RowComboBoxPanel
Open combobox (Editor) when clicked.- Overrides:
eventEditorMousePressed
in classRowComboBoxPanel
-
getEditorBox
protected javax.swing.JComboBox<java.lang.String> getEditorBox(int row)
Call the method in the surrounding method for the OBlockTable.- Overrides:
getEditorBox
in classRowComboBoxPanel
- Parameters:
row
- the user clicked on in the table- Returns:
- an appropriate combobox for this signal head
-
-