Package jmri.jmrit.picker
Class PickListModel.SensorPickModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- jmri.jmrit.beantable.BeanTableDataModel<E>
-
- jmri.jmrit.picker.PickListModel<Sensor>
-
- jmri.jmrit.picker.PickListModel.SensorPickModel
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener
,java.io.Serializable
,java.util.EventListener
,javax.swing.table.TableModel
- Direct Known Subclasses:
PickListModel.MultiSensorPickModel
- Enclosing class:
- PickListModel<E extends NamedBean>
static class PickListModel.SensorPickModel extends PickListModel<Sensor>
-
-
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) SensorManager
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 SensorPickModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Sensor
addBean(java.lang.String name)
Return bean with name given in parameter.Sensor
addBean(java.lang.String sysName, java.lang.String userName)
boolean
canAddBean()
Check if beans can be added by this model.Manager<Sensor>
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
SensorManager manager
-
-
Constructor Detail
-
SensorPickModel
SensorPickModel()
-
-
Method Detail
-
getManager
@Nonnull public Manager<Sensor> 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<Sensor>
- Returns:
- current Manager in use by the Model.
-
addBean
public Sensor 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<Sensor>
- 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 Sensor addBean(@Nonnull java.lang.String sysName, java.lang.String userName) throws java.lang.IllegalArgumentException
- Specified by:
addBean
in classPickListModel<Sensor>
- Throws:
java.lang.IllegalArgumentException
-
canAddBean
public boolean canAddBean()
Check if beans can be added by this model.- Specified by:
canAddBean
in classPickListModel<Sensor>
- Returns:
- true if model can create beans; false otherwise
-
-