Package jmri.jmrit.beantable
Class LRouteTableAction.LBeanTableDataModel
java.lang.Object
javax.swing.table.AbstractTableModel
jmri.jmrit.beantable.BeanTableDataModel<Logix>
jmri.jmrit.beantable.LRouteTableAction.LBeanTableDataModel
- All Implemented Interfaces:
PropertyChangeListener
,Serializable
,EventListener
,TableModel
- Enclosing class:
- LRouteTableAction
class LRouteTableAction.LBeanTableDataModel extends BeanTableDataModel<Logix>
-
Nested Class Summary
Nested classes/interfaces inherited from class jmri.jmrit.beantable.BeanTableDataModel
BeanTableDataModel.DeleteBeanWorker, BeanTableDataModel.HeaderActionListener, BeanTableDataModel.PopupListener, BeanTableDataModel.PopupMenuRemoveName, BeanTableDataModel.TableHeaderListener
-
Field Summary
Fields Modifier and Type Field Description static int
EDITCOL
static int
ENABLECOL
protected String
enabledString
Fields inherited from class jmri.jmrit.beantable.BeanTableDataModel
COMMENTCOL, DELETECOL, NUMCOLUMN, SYSNAMECOL, sysNameList, USERNAMECOL, VALUECOL
-
Constructor Summary
Constructors Constructor Description LBeanTableDataModel()
-
Method Summary
Modifier and Type Method Description void
clickOn(Logix t)
Process a click on The value cell.protected void
configDeleteColumn(JTable table)
void
configureTable(JTable table)
Configure a table to have our standard rows and columns.protected void
configValueColumn(JTable table)
protected void
doDelete(Logix logix)
Delete the bean after all the checking has been done.protected String
getBeanType()
Get String of the Single Bean Type.Logix
getBySystemName(String name)
Logix
getByUserName(String name)
Class<?>
getColumnClass(int col)
String
getColumnName(int col)
Manager<Logix>
getManager()
Get the Table Model Bean Manager.protected String
getMasterClassName()
int
getPreferredWidth(int col)
String
getValue(String s)
Get the current Bean state value in human readable form.Object
getValueAt(int row, int col)
SYSNAMECOL returns the actual Bean, NOT the System Name.boolean
isCellEditable(int row, int col)
protected boolean
matchPropertyName(PropertyChangeEvent e)
Is this property event announcing a change this table should display?void
setValueAt(Object value, int row, int col)
protected void
updateNameList()
Override to filter out the LRoutes from the rest of Logix.Methods inherited from class jmri.jmrit.beantable.BeanTableDataModel
addMouseListenerToHeader, allowBlockNameChange, configureButton, configureJTable, copyName, deleteBean, dispose, editComment, formatToolTip, getCellToolTip, getColumnCount, getDisplayDeleteMsg, getPropertyColumnCount, getPropertyColumnDescriptor, getRowCount, makeJTable, moveBean, persistTable, printColumns, printTable, propertyChange, removeName, renameBean, setColumnIdentities, setColumnToHoldButton, setDisplayDeleteMsg, 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 Details
-
ENABLECOL
- See Also:
- Constant Field Values
-
EDITCOL
- See Also:
- Constant Field Values
-
enabledString
-
-
Constructor Details
-
Method Details
-
updateNameList
Override to filter out the LRoutes from the rest of Logix.- Overrides:
updateNameList
in classBeanTableDataModel<Logix>
-
getColumnName
Description copied from class:BeanTableDataModel
- Specified by:
getColumnName
in interfaceTableModel
- Overrides:
getColumnName
in classBeanTableDataModel<Logix>
-
getColumnClass
Description copied from class:BeanTableDataModel
- Specified by:
getColumnClass
in interfaceTableModel
- Overrides:
getColumnClass
in classBeanTableDataModel<Logix>
-
getPreferredWidth
- Overrides:
getPreferredWidth
in classBeanTableDataModel<Logix>
-
isCellEditable
Description copied from class:BeanTableDataModel
- Specified by:
isCellEditable
in interfaceTableModel
- Overrides:
isCellEditable
in classBeanTableDataModel<Logix>
-
getValueAt
Description copied from class:BeanTableDataModel
SYSNAMECOL returns the actual Bean, NOT the System Name.- Specified by:
getValueAt
in interfaceTableModel
- Overrides:
getValueAt
in classBeanTableDataModel<Logix>
-
setValueAt
Description copied from class:BeanTableDataModel
- Specified by:
setValueAt
in interfaceTableModel
- Overrides:
setValueAt
in classBeanTableDataModel<Logix>
-
doDelete
Delete the bean after all the checking has been done.Deactivate the Logix and remove its conditionals.
- Overrides:
doDelete
in classBeanTableDataModel<Logix>
- Parameters:
logix
- NamedBean to delete
-
matchPropertyName
Description copied from class:BeanTableDataModel
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:
matchPropertyName
in classBeanTableDataModel<Logix>
- Parameters:
e
- the event to match- Returns:
- true if the property name is of interest, false otherwise
-
getManager
Description copied from class:BeanTableDataModel
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 classBeanTableDataModel<Logix>
- Returns:
- current Manager in use by the Model.
-
getBySystemName
- Specified by:
getBySystemName
in classBeanTableDataModel<Logix>
-
getByUserName
- Specified by:
getByUserName
in classBeanTableDataModel<Logix>
-
getMasterClassName
- Specified by:
getMasterClassName
in classBeanTableDataModel<Logix>
-
configureTable
Description copied from class:BeanTableDataModel
Configure 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:
configureTable
in classBeanTableDataModel<Logix>
- Parameters:
table
-JTable
to configure
-
clickOn
Description copied from class:BeanTableDataModel
Process a click on The value cell.- Specified by:
clickOn
in classBeanTableDataModel<Logix>
- Parameters:
t
- the Bean that has been clicked.
-
getValue
Description copied from class:BeanTableDataModel
Get the current Bean state value in human readable form.- Specified by:
getValue
in classBeanTableDataModel<Logix>
- Parameters:
s
- System name of Bean.- Returns:
- state value in localised human readable form.
-
configDeleteColumn
- Overrides:
configDeleteColumn
in classBeanTableDataModel<Logix>
-
configValueColumn
- Overrides:
configValueColumn
in classBeanTableDataModel<Logix>
-
getBeanType
Description copied from class:BeanTableDataModel
Get String of the Single Bean Type. In many cases the return is Bundle localised so should not be used for matching Bean types.- Overrides:
getBeanType
in classBeanTableDataModel<Logix>
- Returns:
- Bean Type String.
-