Package jmri.jmrit.beantable
Class MemoryTableDataModel
- All Implemented Interfaces:
PropertyChangeListener,Serializable,EventListener,TableModel
TableDataModel for the Memory Table.
Split from
MemoryTableAction- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class jmri.jmrit.beantable.BeanTableDataModel
BeanTableDataModel.BeanTableTooltipHeaderRenderer, BeanTableDataModel.DateRenderer, BeanTableDataModel.DeleteBeanWorker, BeanTableDataModel.HeaderActionListener, BeanTableDataModel.PopupListener, BeanTableDataModel.TableHeaderListener -
Field Summary
Fields inherited from class jmri.jmrit.beantable.BeanTableDataModel
COMMENTCOL, DELETECOL, NUMCOLUMN, SYSNAMECOL, sysNameList, USERNAMECOL, VALUECOLFields inherited from class javax.swing.table.AbstractTableModel
listenerList -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for use by preferences and messages systemCreate a new Memory Table Data Model. -
Method Summary
Modifier and TypeMethodDescriptionvoidProcess a click on The value cell.voidconfigValueColumn(JTable table) getBySystemName(String name) getByUserName(String name) getCellToolTip(JTable table, int row, int col) Additionally provide Memory value Class in value column.Class<?>getColumnClass(int col) getColumnName(int col) Get the Table Model Bean Manager.protected StringGet the current Bean state value in human readable form.protected booleanIs this property event announcing a change this table should display?voidsetValueAt(Object value, int row, int col) Methods inherited from class jmri.jmrit.beantable.BeanTableDataModel
addEditProperty, addMouseListenerToHeader, allowBlockNameChange, configDeleteColumn, configureJTable, configureTable, copySystemName, copyUserName, deleteBean, dispose, doDelete, editComment, exportToCSV, formatToolTip, getBeanType, getColumnCount, getDisplayDeleteMsg, getFilter, getHeaderTooltip, getPreferredWidth, getPropertyColumnCount, getPropertyColumnDescriptor, getRowCount, getValueAt, isCellEditable, isClearUserNameAllowed, makeJTable, moveBean, persistTable, printColumns, printTable, propertyChange, 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
-
Constructor Details
-
MemoryTableDataModel
Create a new Memory Table Data Model.- Parameters:
mgr- Memory manager to use in the model, default MemoryManager always used.
-
MemoryTableDataModel
public MemoryTableDataModel()Constructor for use by preferences and messages system
-
-
Method Details
-
getValue
Get the current Bean state value in human readable form.- Specified by:
getValuein classBeanTableDataModel<Memory>- Parameters:
name- System name of Bean.- Returns:
- state value in localised human readable form.
-
getManager
Get 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<Memory>- Returns:
- current Manager in use by the Model.
-
getBySystemName
- Specified by:
getBySystemNamein classBeanTableDataModel<Memory>
-
getByUserName
- Specified by:
getByUserNamein classBeanTableDataModel<Memory>
-
getMasterClassName
- Specified by:
getMasterClassNamein classBeanTableDataModel<Memory>
-
clickOn
Process a click on The value cell.- Specified by:
clickOnin classBeanTableDataModel<Memory>- Parameters:
t- the Bean that has been clicked.
-
setValueAt
- Specified by:
setValueAtin interfaceTableModel- Overrides:
setValueAtin classBeanTableDataModel<Memory>
-
getColumnName
- Specified by:
getColumnNamein interfaceTableModel- Overrides:
getColumnNamein classBeanTableDataModel<Memory>
-
getColumnClass
- Specified by:
getColumnClassin interfaceTableModel- Overrides:
getColumnClassin classBeanTableDataModel<Memory>
-
configValueColumn
- Overrides:
configValueColumnin classBeanTableDataModel<Memory>
-
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<Memory>- Parameters:
e- the event to match- Returns:
- true if the property name is of interest, false otherwise
-
configureButton
- Overrides:
configureButtonin classBeanTableDataModel<Memory>
-
getCellToolTip
Additionally provide Memory value Class in value column. Display 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<Memory>- Parameters:
table- The current table.row- The current row.col- The current column.- Returns:
- a formatted tool tip or null if there is none.
-