Package jmri.jmrit.beantable.signalmast
Class SignalMastTableDataModel
java.lang.Object
javax.swing.table.AbstractTableModel
jmri.jmrit.beantable.BeanTableDataModel<SignalMast>
jmri.jmrit.beantable.signalmast.SignalMastTableDataModel
- All Implemented Interfaces:
PropertyChangeListener,Serializable,EventListener,TableModel
Data model for a SignalMastTable
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassA row specific Aspect combobox cell editor/rendererNested classes/interfaces inherited from class jmri.jmrit.beantable.BeanTableDataModel
BeanTableDataModel.BeanTableTooltipHeaderRenderer -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intFields inherited from class jmri.jmrit.beantable.BeanTableDataModel
COMMENTCOL, DELETECOL, NUMCOLUMN, SYSNAMECOL, sysNameList, USERNAMECOL, VALUECOLFields inherited from class javax.swing.table.AbstractTableModel
listenerList -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclearAspectVector(int row) Clear the old aspect comboboxes and force them to be rebuiltprotected voidProcess a click on The value cell.Set column width.protected voidconfigValueColumn(JTable table) Customize the SignalMast Value (Aspect) column to show an appropriate ComboBox of available Aspects when the TableDataModel is being called from ListedTableAction.(package private) voideditLogic(int row, int col) (package private) voideditMast(int row, int col) getAspectEditorBox(int row) Provide a JComboBox element to display inside the JPanel CellEditor.getAspectVector(int row) Holds a HashMap of valid aspects per signal mast used by getEditorBox()protected SignalMastgetBySystemName(String name) protected SignalMastgetByUserName(String name) protected StringClass<?>getColumnClass(int col) intGet Column Count INCLUDING Bean Property Columns.getColumnName(int col) protected Manager<SignalMast>Get the Table Model Bean Manager.protected StringintgetPreferredWidth(int col) Get the current Bean state value in human readable form.getValueAt(int row, int col) SYSNAMECOL returns the actual Bean, NOT the System Name.booleanisCellEditable(int row, int col) protected booleanIs this property event announcing a change this table should display?voidRespond to change from bean.voidsetValueAt(Object value, int row, int col) Methods inherited from class jmri.jmrit.beantable.BeanTableDataModel
addMouseListenerToHeader, configDeleteColumn, configureJTable, configureTable, copySystemName, copyUserName, deleteBean, dispose, doDelete, editComment, exportToCSV, formatToolTip, getBeanType, getCellToolTip, getDisplayDeleteMsg, getFilter, getHeaderTooltip, getPropertyColumnCount, getPropertyColumnDescriptor, getRowCount, isClearUserNameAllowed, makeJTable, moveBean, persistTable, printColumns, printTable, removeName, renameBean, setColumnIdentities, setColumnToHoldButton, setDisplayDeleteMsg, setFilter, setManager, setPropertyColumnsVisible, showPopup, showTableHeaderPopup, stopPersistingTable, updateNameListMethods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
Field Details
-
EDITMASTCOL
- See Also:
-
EDITLOGICCOL
- See Also:
-
LITCOL
- See Also:
-
HELDCOL
- See Also:
-
editorMap
-
boxMap
-
-
Constructor Details
-
SignalMastTableDataModel
public SignalMastTableDataModel()
-
-
Method Details
-
getValue
Description copied from class:BeanTableDataModelGet the current Bean state value in human readable form.- Specified by:
getValuein classBeanTableDataModel<SignalMast>- Parameters:
name- System name of Bean.- Returns:
- state value in localised human readable form.
-
getColumnCount
Description copied from class:BeanTableDataModelGet Column Count INCLUDING Bean Property Columns.- Specified by:
getColumnCountin interfaceTableModel- Overrides:
getColumnCountin classBeanTableDataModel<SignalMast>
-
getColumnName
Description copied from class:BeanTableDataModel- Specified by:
getColumnNamein interfaceTableModel- Overrides:
getColumnNamein classBeanTableDataModel<SignalMast>
-
getColumnClass
Description copied from class:BeanTableDataModel- Specified by:
getColumnClassin interfaceTableModel- Overrides:
getColumnClassin classBeanTableDataModel<SignalMast>
-
getPreferredWidth
- Overrides:
getPreferredWidthin classBeanTableDataModel<SignalMast>
-
isCellEditable
Description copied from class:BeanTableDataModel- Specified by:
isCellEditablein interfaceTableModel- Overrides:
isCellEditablein classBeanTableDataModel<SignalMast>
-
getManager
Description copied from class:BeanTableDataModelGet the Table Model Bean Manager. In many cases, especially around Model startup, this will be the Proxy Manager, which is then changed to the hardware specific manager.- Specified by:
getManagerin classBeanTableDataModel<SignalMast>- Returns:
- current Manager in use by the Model.
-
getBySystemName
- Specified by:
getBySystemNamein classBeanTableDataModel<SignalMast>
-
getByUserName
- Specified by:
getByUserNamein classBeanTableDataModel<SignalMast>
-
getMasterClassName
- Specified by:
getMasterClassNamein classBeanTableDataModel<SignalMast>
-
clickOn
Description copied from class:BeanTableDataModelProcess a click on The value cell.- Specified by:
clickOnin classBeanTableDataModel<SignalMast>- Parameters:
t- the Bean that has been clicked.
-
getValueAt
Description copied from class:BeanTableDataModelSYSNAMECOL returns the actual Bean, NOT the System Name.- Specified by:
getValueAtin interfaceTableModel- Overrides:
getValueAtin classBeanTableDataModel<SignalMast>
-
setValueAt
Description copied from class:BeanTableDataModel- Specified by:
setValueAtin interfaceTableModel- Overrides:
setValueAtin classBeanTableDataModel<SignalMast>
-
editLogic
-
editMast
-
propertyChange
Respond to change from bean.- Specified by:
propertyChangein interfacePropertyChangeListener- Overrides:
propertyChangein classBeanTableDataModel<SignalMast>- Parameters:
e- the change event to respond to
-
matchPropertyName
Description copied from class:BeanTableDataModelIs this property event announcing a change this table should display?Note that events will come both from the NamedBeans and also from the manager
- Overrides:
matchPropertyNamein classBeanTableDataModel<SignalMast>- Parameters:
e- the event to match- Returns:
- true if the property name is of interest, false otherwise
-
configValueColumn
Customize the SignalMast Value (Aspect) column to show an appropriate ComboBox of available Aspects when the TableDataModel is being called from ListedTableAction.- Overrides:
configValueColumnin classBeanTableDataModel<SignalMast>- Parameters:
table- a JTable of Signal Masts
-
configureButton
Set column width.- Overrides:
configureButtonin classBeanTableDataModel<SignalMast>- Returns:
- a button to fit inside the VALUE column
-
clearAspectVector
Clear the old aspect comboboxes and force them to be rebuilt- Parameters:
row- Index of the signal mast (in TableDataModel) to be rebuilt in the HashMaps
-
getAspectEditorBox
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
Holds a HashMap of valid aspects per signal mast used by getEditorBox()- Parameters:
row- Index number (in TableDataModel)- Returns:
- The Vector of valid aspect names for this mast to show in the JComboBox
-
getClassName
-
getClassDescription
-