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:
java.beans.PropertyChangeListener
,java.io.Serializable
,java.util.EventListener
,javax.swing.table.TableModel
- Enclosing class:
- LRouteTableAction
class LRouteTableAction.LBeanTableDataModel extends BeanTableDataModel<Logix>
-
-
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 Modifier and Type Field Description static int
EDITCOL
static int
ENABLECOL
protected java.lang.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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clickOn(Logix t)
Process a click on The value cell.protected void
configDeleteColumn(javax.swing.JTable table)
void
configureTable(javax.swing.JTable table)
Configure a table to have our standard rows and columns.protected void
configValueColumn(javax.swing.JTable table)
protected void
doDelete(Logix logix)
Delete the bean after all the checking has been done.protected java.lang.String
getBeanType()
Get String of the Single Bean Type.Logix
getBySystemName(java.lang.String name)
Logix
getByUserName(java.lang.String name)
java.lang.Class<?>
getColumnClass(int col)
java.lang.String
getColumnName(int col)
Manager<Logix>
getManager()
Get the Table Model Bean Manager.protected java.lang.String
getMasterClassName()
int
getPreferredWidth(int col)
java.lang.String
getValue(java.lang.String s)
Get the current Bean state value in human readable form.java.lang.Object
getValueAt(int row, int col)
SYSNAMECOL returns the actual Bean, NOT the System Name.boolean
isCellEditable(int row, int col)
protected boolean
matchPropertyName(java.beans.PropertyChangeEvent e)
Is this property event announcing a change this table should display?void
setValueAt(java.lang.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, exportToCSV, formatToolTip, getCellToolTip, getColumnCount, getDisplayDeleteMsg, getFilter, getHeaderTooltip, getPropertyColumnCount, getPropertyColumnDescriptor, getRowCount, isClearUserNameAllowed, makeJTable, moveBean, persistTable, printColumns, printTable, propertyChange, 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
-
ENABLECOL
public static final int ENABLECOL
- See Also:
- Constant Field Values
-
EDITCOL
public static final int EDITCOL
- See Also:
- Constant Field Values
-
enabledString
protected java.lang.String enabledString
-
-
Constructor Detail
-
LBeanTableDataModel
LBeanTableDataModel()
-
-
Method Detail
-
updateNameList
protected void updateNameList()
Override to filter out the LRoutes from the rest of Logix.- Overrides:
updateNameList
in classBeanTableDataModel<Logix>
-
getColumnName
public java.lang.String getColumnName(int col)
Description copied from class:BeanTableDataModel
- Specified by:
getColumnName
in interfacejavax.swing.table.TableModel
- Overrides:
getColumnName
in classBeanTableDataModel<Logix>
-
getColumnClass
public java.lang.Class<?> getColumnClass(int col)
Description copied from class:BeanTableDataModel
- Specified by:
getColumnClass
in interfacejavax.swing.table.TableModel
- Overrides:
getColumnClass
in classBeanTableDataModel<Logix>
-
getPreferredWidth
public int getPreferredWidth(int col)
- Overrides:
getPreferredWidth
in classBeanTableDataModel<Logix>
-
isCellEditable
public boolean isCellEditable(int row, int col)
Description copied from class:BeanTableDataModel
- Specified by:
isCellEditable
in interfacejavax.swing.table.TableModel
- Overrides:
isCellEditable
in classBeanTableDataModel<Logix>
-
getValueAt
public java.lang.Object getValueAt(int row, int col)
Description copied from class:BeanTableDataModel
SYSNAMECOL returns the actual Bean, NOT the System Name.- Specified by:
getValueAt
in interfacejavax.swing.table.TableModel
- Overrides:
getValueAt
in classBeanTableDataModel<Logix>
-
setValueAt
public void setValueAt(java.lang.Object value, int row, int col)
Description copied from class:BeanTableDataModel
- Specified by:
setValueAt
in interfacejavax.swing.table.TableModel
- Overrides:
setValueAt
in classBeanTableDataModel<Logix>
-
doDelete
protected void doDelete(Logix logix)
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
protected boolean matchPropertyName(java.beans.PropertyChangeEvent e)
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
public Manager<Logix> 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
public Logix getBySystemName(@Nonnull java.lang.String name)
- Specified by:
getBySystemName
in classBeanTableDataModel<Logix>
-
getByUserName
public Logix getByUserName(@Nonnull java.lang.String name)
- Specified by:
getByUserName
in classBeanTableDataModel<Logix>
-
getMasterClassName
protected java.lang.String getMasterClassName()
- Specified by:
getMasterClassName
in classBeanTableDataModel<Logix>
-
configureTable
public void configureTable(javax.swing.JTable table)
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
public void clickOn(Logix t)
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
public java.lang.String getValue(java.lang.String s)
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
protected void configDeleteColumn(javax.swing.JTable table)
- Overrides:
configDeleteColumn
in classBeanTableDataModel<Logix>
-
configValueColumn
protected void configValueColumn(javax.swing.JTable table)
- Overrides:
configValueColumn
in classBeanTableDataModel<Logix>
-
getBeanType
protected java.lang.String 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.
-
-