Package jmri.jmrit.picker
Class PickListModel.OBlockPickModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- jmri.jmrit.beantable.BeanTableDataModel<E>
-
- jmri.jmrit.picker.PickListModel<OBlock>
-
- jmri.jmrit.picker.PickListModel.OBlockPickModel
-
- 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.OBlockPickModel extends PickListModel<OBlock>
-
-
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) OBlockManager
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 OBlockPickModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OBlock
addBean(java.lang.String name)
Return bean with name given in parameter.OBlock
addBean(java.lang.String sysName, java.lang.String userName)
boolean
canAddBean()
Check if beans can be added by this model.Manager<OBlock>
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
OBlockManager manager
-
-
Constructor Detail
-
OBlockPickModel
OBlockPickModel()
-
-
Method Detail
-
getManager
@Nonnull public Manager<OBlock> 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<OBlock>
- Returns:
- current Manager in use by the Model.
-
addBean
public OBlock 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<OBlock>
- 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 OBlock addBean(@Nonnull java.lang.String sysName, java.lang.String userName)
- Specified by:
addBean
in classPickListModel<OBlock>
-
canAddBean
public boolean canAddBean()
Check if beans can be added by this model.- Specified by:
canAddBean
in classPickListModel<OBlock>
- Returns:
- true if model can create beans; false otherwise
-
-