Package jmri.jmrit.beantable.signalmast
Class SignalMastLogicTableDataModel
java.lang.Object
javax.swing.table.AbstractTableModel
jmri.jmrit.beantable.BeanTableDataModel<SignalMastLogic>
jmri.jmrit.beantable.signalmast.SignalMastLogicTableDataModel
- All Implemented Interfaces:
PropertyChangeListener,Serializable,EventListener,TableModel
Create a SignalMastLogic Table Data Model.
Code originally from SignalMastLogicTableAction
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class jmri.jmrit.beantable.BeanTableDataModel
BeanTableDataModel.BeanTableTooltipHeaderRenderer -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int(package private) final SignallingActionstatic 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 TypeMethodDescriptionvoidProcess a click on The value cell.protected voidconfigDeleteColumn(JTable table) voidconfigureTable(JTable table) Configure a table to have our standard rows and columns.(package private) voiddeleteLogic(int row) voiddispose()Removes property change listeners from Beans.(package private) voideditLogic(int row) protected StringGet String of the Single Bean Type.getBySystemName(String name) getByUserName(String name) getCellToolTip(JTable table, int row, int col) Display the comment text for the current row as a tool tip.Class<?>getColumnClass(int col) intGet Column Count INCLUDING Bean Property Columns.getColumnName(int col) getDestMastFromRow(int row) getLogicFromRow(int row) protected SignalMastLogicManagerGet the Table Model Bean Manager.protected StringintgetPreferredWidth(int col) intGet 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?voidprotected voidsetColumnIdentities(JTable table) Set identities for any columns that need an identity.voidsetSuppressUpdate(boolean newVal) voidsetValueAt(Object value, int row, int col) protected voidDisplay popup menu when right clicked on table cell.protected voidMethods inherited from class jmri.jmrit.beantable.BeanTableDataModel
addMouseListenerToHeader, configureButton, configureJTable, configValueColumn, copySystemName, copyUserName, deleteBean, doDelete, editComment, exportToCSV, formatToolTip, getDisplayDeleteMsg, getFilter, getHeaderTooltip, getPropertyColumnCount, getPropertyColumnDescriptor, isClearUserNameAllowed, makeJTable, moveBean, persistTable, printColumns, printTable, removeName, renameBean, setColumnToHoldButton, setDisplayDeleteMsg, setFilter, setManager, setPropertyColumnsVisible, showTableHeaderPopup, stopPersistingTableMethods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
Field Details
-
SOURCECOL
- See Also:
-
SOURCEAPPCOL
- See Also:
-
DESTCOL
- See Also:
-
DESTAPPCOL
- See Also:
-
COMCOL
- See Also:
-
DELCOL
- See Also:
-
ENABLECOL
- See Also:
-
EDITLOGICCOL
- See Also:
-
MAXSPEEDCOL
- See Also:
-
COLUMNCOUNT
- See Also:
-
sigLog
-
-
Constructor Details
-
SignalMastLogicTableDataModel
public SignalMastLogicTableDataModel()
-
-
Method Details
-
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<SignalMastLogic>- Returns:
- current Manager in use by the Model.
-
getValue
Description copied from class:BeanTableDataModelGet the current Bean state value in human readable form.- Specified by:
getValuein classBeanTableDataModel<SignalMastLogic>- Parameters:
s- System name of Bean.- Returns:
- state value in localised human readable form.
-
getMasterClassName
- Specified by:
getMasterClassNamein classBeanTableDataModel<SignalMastLogic>
-
clickOn
Description copied from class:BeanTableDataModelProcess a click on The value cell.- Specified by:
clickOnin classBeanTableDataModel<SignalMastLogic>- Parameters:
t- the Bean that has been clicked.
-
updateNameList
- Overrides:
updateNameListin classBeanTableDataModel<SignalMastLogic>
-
setSuppressUpdate
-
propertyChange
Description copied from class:BeanTableDataModel- Specified by:
propertyChangein interfacePropertyChangeListener- Overrides:
propertyChangein classBeanTableDataModel<SignalMastLogic>
-
matchPropertyName
Is 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<SignalMastLogic>- Parameters:
e- the event to match- Returns:
- true if the property name is of interest, false otherwise
-
getColumnCount
Description copied from class:BeanTableDataModelGet Column Count INCLUDING Bean Property Columns.- Specified by:
getColumnCountin interfaceTableModel- Overrides:
getColumnCountin classBeanTableDataModel<SignalMastLogic>
-
getRowCount
Description copied from class:BeanTableDataModel- Specified by:
getRowCountin interfaceTableModel- Overrides:
getRowCountin classBeanTableDataModel<SignalMastLogic>
-
getValueAt
Description copied from class:BeanTableDataModelSYSNAMECOL returns the actual Bean, NOT the System Name.- Specified by:
getValueAtin interfaceTableModel- Overrides:
getValueAtin classBeanTableDataModel<SignalMastLogic>
-
setValueAt
Description copied from class:BeanTableDataModel- Specified by:
setValueAtin interfaceTableModel- Overrides:
setValueAtin classBeanTableDataModel<SignalMastLogic>
-
getColumnName
Description copied from class:BeanTableDataModel- Specified by:
getColumnNamein interfaceTableModel- Overrides:
getColumnNamein classBeanTableDataModel<SignalMastLogic>
-
getColumnClass
Description copied from class:BeanTableDataModel- Specified by:
getColumnClassin interfaceTableModel- Overrides:
getColumnClassin classBeanTableDataModel<SignalMastLogic>
-
isCellEditable
Description copied from class:BeanTableDataModel- Specified by:
isCellEditablein interfaceTableModel- Overrides:
isCellEditablein classBeanTableDataModel<SignalMastLogic>
-
editLogic
-
deleteLogic
-
getDestMastFromRow
-
getLogicFromRow
-
getPreferredWidth
- Overrides:
getPreferredWidthin classBeanTableDataModel<SignalMastLogic>
-
configureTable
Description copied from class:BeanTableDataModelConfigure 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. This also persists the table user interface state.- Overrides:
configureTablein classBeanTableDataModel<SignalMastLogic>- Parameters:
table-JTableto configure
-
getBySystemName
- Specified by:
getBySystemNamein classBeanTableDataModel<SignalMastLogic>
-
getByUserName
- Specified by:
getByUserNamein classBeanTableDataModel<SignalMastLogic>
-
dispose
Description copied from class:BeanTableDataModelRemoves property change listeners from Beans.- Overrides:
disposein classBeanTableDataModel<SignalMastLogic>
-
configDeleteColumn
- Overrides:
configDeleteColumnin classBeanTableDataModel<SignalMastLogic>
-
getBeanType
Description copied from class:BeanTableDataModelGet String of the Single Bean Type. In many cases the return is Bundle localised so should not be used for matching Bean types.- Overrides:
getBeanTypein classBeanTableDataModel<SignalMastLogic>- Returns:
- Bean Type String.
-
showPopup
Description copied from class:BeanTableDataModelDisplay popup menu when right clicked on table cell.Copy UserName Rename Remove UserName Move Edit Comment Delete
- Overrides:
showPopupin classBeanTableDataModel<SignalMastLogic>- Parameters:
e- source event.
-
setColumnIdentities
Description copied from class:BeanTableDataModelSet identities for any columns that need an identity. It is recommended that all columns get a constant identity to prevent identities from being subject to changes due to translation.The default implementation sets column identities to the String
Column#where#is the model index for the column. Note that if the TableColumnModel is aXTableColumnModel, the index includes hidden columns.- Overrides:
setColumnIdentitiesin classBeanTableDataModel<SignalMastLogic>- Parameters:
table- the table to set identities for.
-
getCellToolTip
Description copied from class:BeanTableDataModelDisplay the comment text for the current row as a tool tip. Most of the bean tables use the standard model with comments in column 3.- Overrides:
getCellToolTipin classBeanTableDataModel<SignalMastLogic>- Parameters:
table- The current table.row- The current row.col- The current column.- Returns:
- a formatted tool tip or null if there is none.
-