Package jmri.jmrit.beantable.oblock
Class PathTurnoutTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
jmri.jmrit.beantable.oblock.PathTurnoutTableModel
- All Implemented Interfaces:
PropertyChangeListener,Serializable,EventListener,TableModel
GUI to define Path-Turnout combos for OBlocks.
This file is part of JMRI.
Can be used with two interfaces:
- original "desktop" InternalFrames (parent class TableFrames, an extended JmriJFrame)
- JMRI standard Tabbed tables (parent class JPanel)
This file is part of JMRI.
JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.
JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassProvide a table cell renderer looking like a JComboBox as an editor/renderer for the turnout tables. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intFields inherited from class javax.swing.table.AbstractTableModel
listenerList -
Constructor Summary
ConstructorsConstructorDescriptionPathTurnoutTableModel(OPath path) PathTurnoutTableModel(OPath path, TableFrames.PathTurnoutFrame parent) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidconfigTurnoutStateColumn(JTable table) Customize the Turnout State column to show an appropriate ComboBox of available options.(package private) voiddispose()Class<?>getColumnClass(int col) intgetColumnName(int col) intgetPreferredWidth(int col) intgetStateEditorBox(int row) Provide a static JComboBox element to display inside the JPanel CellEditor.getValueAt(int rowIndex, int columnIndex) (package private) voidbooleanisCellEditable(int row, int col) voidvoidvoidsetValueAt(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 Details
-
TURNOUT_NAME_COL
- See Also:
-
STATE_COL
- See Also:
-
DELETE_COL
- See Also:
-
NUMCOLS
- See Also:
-
-
Constructor Details
-
PathTurnoutTableModel
public PathTurnoutTableModel() -
PathTurnoutTableModel
-
PathTurnoutTableModel
-
-
Method Details
-
removeListener
-
initTempRow
void initTempRow() -
getColumnCount
- Specified by:
getColumnCountin interfaceTableModel
-
getRowCount
- Specified by:
getRowCountin interfaceTableModel
-
getColumnName
- Specified by:
getColumnNamein interfaceTableModel- Overrides:
getColumnNamein classAbstractTableModel
-
getValueAt
- Specified by:
getValueAtin interfaceTableModel
-
setValueAt
- Specified by:
setValueAtin interfaceTableModel- Overrides:
setValueAtin classAbstractTableModel
-
isCellEditable
- Specified by:
isCellEditablein interfaceTableModel- Overrides:
isCellEditablein classAbstractTableModel
-
getColumnClass
- Specified by:
getColumnClassin interfaceTableModel- Overrides:
getColumnClassin classAbstractTableModel
-
getStateEditorBox
Provide a static 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
-
configTurnoutStateColumn
Customize the Turnout State column to show an appropriate ComboBox of available options.- Parameters:
table- a JTable of beans
-
getPreferredWidth
-
propertyChange
- Specified by:
propertyChangein interfacePropertyChangeListener
-
dispose
void dispose()
-