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 intEDITCOLstatic intENABLECOL-
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 voidclickOn(Logix t)Process a click on The value cell.protected voidconfigDeleteColumn(javax.swing.JTable table)voidconfigureTable(javax.swing.JTable table)Configure a table to have our standard rows and columns.protected voidconfigValueColumn(javax.swing.JTable table)protected voiddoDelete(Logix logix)Delete the bean after all the checking has been done.protected java.lang.StringgetBeanType()Get String of the Single Bean Type.LogixgetBySystemName(java.lang.String name)LogixgetByUserName(java.lang.String name)java.lang.Class<?>getColumnClass(int col)java.lang.StringgetColumnName(int col)Manager<Logix>getManager()Get the Table Model Bean Manager.protected java.lang.StringgetMasterClassName()intgetPreferredWidth(int col)java.lang.StringgetValue(java.lang.String s)Get the current Bean state value in human readable form.java.lang.ObjectgetValueAt(int row, int col)SYSNAMECOL returns the actual Bean, NOT the System Name.booleanisCellEditable(int row, int col)protected booleanmatchPropertyName(java.beans.PropertyChangeEvent e)Is this property event announcing a change this table should display?voidsetValueAt(java.lang.Object value, int row, int col)protected voidupdateNameList()Override to filter out the LRoutes from the rest of Logix.-
Methods inherited from class jmri.jmrit.beantable.BeanTableDataModel
addMouseListenerToHeader, allowBlockNameChange, configureButton, configureJTable, copySystemName, copyUserName, 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
-
-
Constructor Detail
-
LBeanTableDataModel
LBeanTableDataModel()
-
-
Method Detail
-
updateNameList
protected void updateNameList()
Override to filter out the LRoutes from the rest of Logix.- Overrides:
updateNameListin classBeanTableDataModel<Logix>
-
getColumnName
public java.lang.String getColumnName(int col)
Description copied from class:BeanTableDataModel- Specified by:
getColumnNamein interfacejavax.swing.table.TableModel- Overrides:
getColumnNamein classBeanTableDataModel<Logix>
-
getColumnClass
public java.lang.Class<?> getColumnClass(int col)
Description copied from class:BeanTableDataModel- Specified by:
getColumnClassin interfacejavax.swing.table.TableModel- Overrides:
getColumnClassin classBeanTableDataModel<Logix>
-
getPreferredWidth
public int getPreferredWidth(int col)
- Overrides:
getPreferredWidthin classBeanTableDataModel<Logix>
-
isCellEditable
public boolean isCellEditable(int row, int col)
Description copied from class:BeanTableDataModel- Specified by:
isCellEditablein interfacejavax.swing.table.TableModel- Overrides:
isCellEditablein classBeanTableDataModel<Logix>
-
getValueAt
public java.lang.Object getValueAt(int row, int col)
Description copied from class:BeanTableDataModelSYSNAMECOL returns the actual Bean, NOT the System Name.- Specified by:
getValueAtin interfacejavax.swing.table.TableModel- Overrides:
getValueAtin classBeanTableDataModel<Logix>
-
setValueAt
public void setValueAt(java.lang.Object value, int row, int col)
Description copied from class:BeanTableDataModel- Specified by:
setValueAtin interfacejavax.swing.table.TableModel- Overrides:
setValueAtin 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:
doDeletein classBeanTableDataModel<Logix>- Parameters:
logix- NamedBean to delete
-
matchPropertyName
protected boolean matchPropertyName(java.beans.PropertyChangeEvent e)
Description copied from class:BeanTableDataModelIs 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:
matchPropertyNamein 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:BeanTableDataModelGet 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:
getManagerin classBeanTableDataModel<Logix>- Returns:
- current Manager in use by the Model.
-
getBySystemName
public Logix getBySystemName(@Nonnull java.lang.String name)
- Specified by:
getBySystemNamein classBeanTableDataModel<Logix>
-
getByUserName
public Logix getByUserName(@Nonnull java.lang.String name)
- Specified by:
getByUserNamein classBeanTableDataModel<Logix>
-
getMasterClassName
protected java.lang.String getMasterClassName()
- Specified by:
getMasterClassNamein classBeanTableDataModel<Logix>
-
configureTable
public void configureTable(javax.swing.JTable table)
Description copied from class:BeanTableDataModelConfigure 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:
configureTablein classBeanTableDataModel<Logix>- Parameters:
table-JTableto configure
-
clickOn
public void clickOn(Logix t)
Description copied from class:BeanTableDataModelProcess a click on The value cell.- Specified by:
clickOnin classBeanTableDataModel<Logix>- Parameters:
t- the Bean that has been clicked.
-
getValue
public java.lang.String getValue(java.lang.String s)
Description copied from class:BeanTableDataModelGet the current Bean state value in human readable form.- Specified by:
getValuein 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:
configDeleteColumnin classBeanTableDataModel<Logix>
-
configValueColumn
protected void configValueColumn(javax.swing.JTable table)
- Overrides:
configValueColumnin classBeanTableDataModel<Logix>
-
getBeanType
protected java.lang.String getBeanType()
Description copied from class:BeanTableDataModelGet String of the Single Bean Type. In many cases the return is Bundle localised so should not be used for matching Bean types.- Overrides:
getBeanTypein classBeanTableDataModel<Logix>- Returns:
- Bean Type String.
-
-