Package jmri.jmrit.automat.monitor
Class AutomatTableDataModel
java.lang.Object
javax.swing.table.AbstractTableModel
jmri.jmrit.automat.monitor.AutomatTableDataModel
- All Implemented Interfaces:
Serializable,TableModel
Table data model for display of Automat instances.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final int(package private) static final int(package private) static final int(package private) AutomatSummary(package private) static final intFields inherited from class javax.swing.table.AbstractTableModel
listenerList -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigureTable(JTable table) Configure a table to have our standard rows and columns.voiddispose()Class<?>getColumnClass(int col) Note that this returns String even for columns that contain buttons.intgetColumnName(int col) intgetPreferredWidth(int col) intgetValueAt(int row, int col) booleanisCellEditable(int row, int col) (package private) voidsetColumnToHoldButton(JTable table, int column, JButton sample) Service method to setup a column so that it will hold a button for its valuesvoidsetValueAt(Object value, int row, int col) Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
Field Details
-
NAMECOL
- See Also:
-
TURNSCOL
- See Also:
-
KILLCOL
- See Also:
-
NUMCOLUMN
- See Also:
-
summary
-
-
Constructor Details
-
AutomatTableDataModel
public AutomatTableDataModel()
-
-
Method Details
-
getColumnCount
-
getRowCount
-
getColumnName
- Specified by:
getColumnNamein interfaceTableModel- Overrides:
getColumnNamein classAbstractTableModel
-
getColumnClass
Note that this returns String even for columns that contain buttons.- Specified by:
getColumnClassin interfaceTableModel- Overrides:
getColumnClassin classAbstractTableModel
-
isCellEditable
- Specified by:
isCellEditablein interfaceTableModel- Overrides:
isCellEditablein classAbstractTableModel
-
getValueAt
-
getPreferredWidth
-
setValueAt
- Specified by:
setValueAtin interfaceTableModel- Overrides:
setValueAtin classAbstractTableModel
-
configureTable
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.- Parameters:
table- the table to configure
-
setColumnToHoldButton
Service method to setup a column so that it will hold a button for its values- Parameters:
table- the table in which to configure the columncolumn- the position of the configured columnsample- typical button, used for size
-
dispose
-