Package jmri.jmrit.beantable
Class RailComTableDataModel
- java.lang.Object
-
- javax.swing.table.AbstractTableModel
-
- jmri.jmrit.beantable.BeanTableDataModel<IdTag>
-
- jmri.jmrit.beantable.RailComTableDataModel
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener,java.io.Serializable,java.util.EventListener,javax.swing.table.TableModel
public class RailComTableDataModel extends BeanTableDataModel<IdTag>
TableDataModel for the RailCom Table. Split fromRailComTableAction- Since:
- 2.11.4
- See Also:
- Serialized Form
-
-
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 intCLEARCOLstatic intDELETECOLstatic intFUELCOLstatic intLOADCOLstatic intLOCATIONCOLstatic intNUMCOLUMNstatic intROUTINGCOLstatic intSPEEDCOLstatic intTEMPCOLstatic intVALUECOLstatic intWATERCOLstatic intWHENCOLstatic intWHERECOL-
Fields inherited from class jmri.jmrit.beantable.BeanTableDataModel
COMMENTCOL, SYSNAMECOL, sysNameList, USERNAMECOL
-
-
Constructor Summary
Constructors Constructor Description RailComTableDataModel(Manager<IdTag> mgr)Create a new Memory Table Data Model.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclickOn(IdTag t)Process a click on The value cell.javax.swing.JButtonconfigureButton()voidconfigValueColumn(javax.swing.JTable table)protected java.lang.StringgetBeanType()Get String of the Single Bean Type.RailComgetBySystemName(java.lang.String name)RailComgetByUserName(java.lang.String name)java.lang.Class<?>getColumnClass(int col)intgetColumnCount()Get Column Count INCLUDING Bean Property Columns.java.lang.StringgetColumnName(int col)RailComManagergetManager()Get the Table Model Bean Manager.protected java.lang.StringgetMasterClassName()intgetPreferredWidth(int col)java.lang.StringgetValue(java.lang.String name)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?voidsetManager(Manager<IdTag> mgr)Set the Model Bean Manager.voidsetValueAt(java.lang.Object value, int row, int col)-
Methods inherited from class jmri.jmrit.beantable.BeanTableDataModel
addMouseListenerToHeader, allowBlockNameChange, configDeleteColumn, configureJTable, configureTable, copySystemName, copyUserName, deleteBean, dispose, doDelete, editComment, exportToCSV, formatToolTip, getCellToolTip, getDisplayDeleteMsg, getFilter, getHeaderTooltip, getPropertyColumnCount, getPropertyColumnDescriptor, getRowCount, isClearUserNameAllowed, makeJTable, moveBean, persistTable, printColumns, printTable, propertyChange, removeName, renameBean, setColumnIdentities, setColumnToHoldButton, setDisplayDeleteMsg, setFilter, setPropertyColumnsVisible, showPopup, showTableHeaderPopup, stopPersistingTable, updateNameList
-
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
-
-
-
Field Detail
-
VALUECOL
public static final int VALUECOL
- See Also:
- Constant Field Values
-
WHERECOL
public static final int WHERECOL
- See Also:
- Constant Field Values
-
WHENCOL
public static final int WHENCOL
- See Also:
- Constant Field Values
-
CLEARCOL
public static final int CLEARCOL
- See Also:
- Constant Field Values
-
SPEEDCOL
public static final int SPEEDCOL
- See Also:
- Constant Field Values
-
LOADCOL
public static final int LOADCOL
- See Also:
- Constant Field Values
-
TEMPCOL
public static final int TEMPCOL
- See Also:
- Constant Field Values
-
FUELCOL
public static final int FUELCOL
- See Also:
- Constant Field Values
-
WATERCOL
public static final int WATERCOL
- See Also:
- Constant Field Values
-
LOCATIONCOL
public static final int LOCATIONCOL
- See Also:
- Constant Field Values
-
ROUTINGCOL
public static final int ROUTINGCOL
- See Also:
- Constant Field Values
-
DELETECOL
public static final int DELETECOL
- See Also:
- Constant Field Values
-
NUMCOLUMN
public static final int NUMCOLUMN
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RailComTableDataModel
public RailComTableDataModel(Manager<IdTag> mgr)
Create a new Memory Table Data Model.- Parameters:
mgr- Memory manager to use in the model, default MemoryManager always used.
-
-
Method Detail
-
getValue
public java.lang.String getValue(java.lang.String name)
Description copied from class:BeanTableDataModelGet the current Bean state value in human readable form.- Specified by:
getValuein classBeanTableDataModel<IdTag>- Parameters:
name- System name of Bean.- Returns:
- state value in localised human readable form.
-
setManager
public final void setManager(Manager<IdTag> mgr)
Description copied from class:BeanTableDataModelSet the Model Bean Manager. Note that for many Models this may not work as the manager is currently obtained directly from the Action class.- Overrides:
setManagerin classBeanTableDataModel<IdTag>- Parameters:
mgr- Bean Manager that the Model should use.
-
getManager
public RailComManager 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<IdTag>- Returns:
- current Manager in use by the Model.
-
getBySystemName
public RailCom getBySystemName(@Nonnull java.lang.String name)
- Specified by:
getBySystemNamein classBeanTableDataModel<IdTag>
-
getByUserName
public RailCom getByUserName(@Nonnull java.lang.String name)
- Specified by:
getByUserNamein classBeanTableDataModel<IdTag>
-
clickOn
public void clickOn(IdTag t)
Description copied from class:BeanTableDataModelProcess a click on The value cell.- Specified by:
clickOnin classBeanTableDataModel<IdTag>- Parameters:
t- the Bean that has been clicked.
-
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<IdTag>
-
getColumnCount
public int getColumnCount()
Description copied from class:BeanTableDataModelGet Column Count INCLUDING Bean Property Columns.- Specified by:
getColumnCountin interfacejavax.swing.table.TableModel- Overrides:
getColumnCountin classBeanTableDataModel<IdTag>
-
getColumnName
public java.lang.String getColumnName(int col)
Description copied from class:BeanTableDataModel- Specified by:
getColumnNamein interfacejavax.swing.table.TableModel- Overrides:
getColumnNamein classBeanTableDataModel<IdTag>
-
getColumnClass
public java.lang.Class<?> getColumnClass(int col)
Description copied from class:BeanTableDataModel- Specified by:
getColumnClassin interfacejavax.swing.table.TableModel- Overrides:
getColumnClassin classBeanTableDataModel<IdTag>
-
isCellEditable
public boolean isCellEditable(int row, int col)
Description copied from class:BeanTableDataModel- Specified by:
isCellEditablein interfacejavax.swing.table.TableModel- Overrides:
isCellEditablein classBeanTableDataModel<IdTag>
-
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<IdTag>
-
getPreferredWidth
public int getPreferredWidth(int col)
- Overrides:
getPreferredWidthin classBeanTableDataModel<IdTag>
-
configValueColumn
public void configValueColumn(javax.swing.JTable table)
- Overrides:
configValueColumnin classBeanTableDataModel<IdTag>
-
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<IdTag>- Parameters:
e- the event to match- Returns:
- true if the property name is of interest, false otherwise
-
configureButton
public javax.swing.JButton configureButton()
- Overrides:
configureButtonin classBeanTableDataModel<IdTag>
-
getMasterClassName
protected java.lang.String getMasterClassName()
- Specified by:
getMasterClassNamein classBeanTableDataModel<IdTag>
-
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<IdTag>- Returns:
- Bean Type String.
-
-