Package jmri.jmrit.picker
Class PickListModel.MemoryPickModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- jmri.jmrit.beantable.BeanTableDataModel<E>
-
- jmri.jmrit.picker.PickListModel<Memory>
-
- jmri.jmrit.picker.PickListModel.MemoryPickModel
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener
,java.io.Serializable
,java.util.EventListener
,javax.swing.table.TableModel
- Enclosing class:
- PickListModel<E extends NamedBean>
static class PickListModel.MemoryPickModel extends PickListModel<Memory>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jmri.jmrit.picker.PickListModel
PickListModel.AudioPickModel, PickListModel.BlockPickModel, PickListModel.EntryExitPickModel, PickListModel.GlobalVariablePickModel, PickListModel.LightPickModel, PickListModel.LogixPickModel, PickListModel.MemoryPickModel, PickListModel.MultiSensorPickModel, PickListModel.OBlockPickModel, PickListModel.ReporterPickModel, PickListModel.SensorPickModel, PickListModel.SignalHeadPickModel, PickListModel.SignalMastPickModel, PickListModel.TurnoutPickModel, PickListModel.WarrantPickModel
-
Nested classes/interfaces inherited from class jmri.jmrit.beantable.BeanTableDataModel
BeanTableDataModel.BeanTableTooltipHeaderRenderer
-
-
Field Summary
Fields Modifier and Type Field Description (package private) MemoryManager
manager
-
Fields inherited from class jmri.jmrit.picker.PickListModel
_listMap, _name, _pickList, _sorter, POSITION_COL, rb, SNAME_COLUMN, UNAME_COLUMN
-
Fields inherited from class jmri.jmrit.beantable.BeanTableDataModel
COMMENTCOL, DELETECOL, NUMCOLUMN, SYSNAMECOL, sysNameList, USERNAMECOL, VALUECOL
-
-
Constructor Summary
Constructors Constructor Description MemoryPickModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Memory
addBean(java.lang.String name)
Return bean with name given in parameter.Memory
addBean(java.lang.String sysName, java.lang.String userName)
boolean
canAddBean()
Check if beans can be added by this model.Manager<Memory>
getManager()
Get the Table Model Bean Manager.-
Methods inherited from class jmri.jmrit.picker.PickListModel
audioPickModelInstance, blockPickModelInstance, clickOn, dispose, entryExitPickModelInstance, getBeanAt, getBeanList, getBeanType, getBySystemName, getByUserName, getColumnClass, getColumnCount, getColumnName, getIndexOf, getMasterClassName, getName, getNamedBeanSet, getNumInstances, getRowCount, getTable, getValue, getValueAt, globalVariablePickModelInstance, isCellEditable, lightPickModelInstance, logixPickModelInstance, makePickTable, makeSorter, memoryPickModelInstance, multiSensorPickModelInstance, oBlockPickModelInstance, propertyChange, reporterPickModelInstance, sensorPickModelInstance, setValueAt, signalHeadPickModelInstance, signalMastPickModelInstance, turnoutPickModelInstance, updateNameList, warrantPickModelInstance
-
Methods inherited from class jmri.jmrit.beantable.BeanTableDataModel
addMouseListenerToHeader, configDeleteColumn, configureButton, configureJTable, configureTable, configValueColumn, copyName, deleteBean, doDelete, editComment, formatToolTip, getCellToolTip, getDisplayDeleteMsg, getFilter, getHeaderTooltip, getPreferredWidth, getPropertyColumnCount, getPropertyColumnDescriptor, isClearUserNameAllowed, makeJTable, matchPropertyName, moveBean, persistTable, printColumns, printTable, removeName, renameBean, setColumnIdentities, setColumnToHoldButton, setDisplayDeleteMsg, setFilter, setManager, setPropertyColumnsVisible, showPopup, showTableHeaderPopup, stopPersistingTable
-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
-
-
-
Field Detail
-
manager
MemoryManager manager
-
-
Constructor Detail
-
MemoryPickModel
MemoryPickModel()
-
-
Method Detail
-
getManager
@Nonnull public Manager<Memory> 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:
getManager
in classPickListModel<Memory>
- Returns:
- current Manager in use by the Model.
-
addBean
public Memory addBean(@Nonnull java.lang.String name) throws java.lang.IllegalArgumentException
Return bean with name given in parameter. Create if needed and possible.- Specified by:
addBean
in classPickListModel<Memory>
- Parameters:
name
- the System name for the Bean.- Returns:
- the Bean or null if not made.
- Throws:
java.lang.IllegalArgumentException
- with reason why Bean cannot be created.
-
addBean
public Memory addBean(@Nonnull java.lang.String sysName, java.lang.String userName) throws java.lang.IllegalArgumentException
- Specified by:
addBean
in classPickListModel<Memory>
- Throws:
java.lang.IllegalArgumentException
-
canAddBean
public boolean canAddBean()
Check if beans can be added by this model.- Specified by:
canAddBean
in classPickListModel<Memory>
- Returns:
- true if model can create beans; false otherwise
-
-