Class CarsTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
jmri.jmrit.operations.OperationsTableModel
jmri.jmrit.operations.rollingstock.cars.gui.CarsTableModel
- All Implemented Interfaces:
PropertyChangeListener,Serializable,EventListener,TableModel
Table Model for edit of cars used by operations
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class jmri.jmrit.operations.OperationsTableModel
OperationsTableModel.MyTableCellRenderer -
Field Summary
FieldsModifier and TypeFieldDescription(package private) CarsTableFrame(package private) CarManager(package private) CarEditFrame(package private) CarSetFramefinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intfinal intFields inherited from class jmri.jmrit.operations.OperationsTableModel
_index, _roadNumber, _table, locationName, showAll, trackNameFields inherited from class javax.swing.table.AbstractTableModel
listenerList -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()intfindCarByRoadNumber(String roadNumber) Search for car by road numbergetCarAtIndex(int index) getCarList(int sort) Class<?>getColumnClass(int col) intgetColumnName(int col) protected ColorgetForegroundColor(int row) intgetSortByName(int sort) getValueAt(int row, int col) (package private) void(package private) voidinitTable(JTable table, CarsTableFrame frame) booleanisCellEditable(int row, int col) voidvoidvoidsetSort(int sort) Not all columns in the Cars table are shown.voidsetValueAt(Object value, int row, int col) voidMethods inherited from class jmri.jmrit.operations.OperationsTableModel
filterList, findRollingStockByRoadNumber, getIndex, initTableMethods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
Field Details
-
carManager
-
SORTBY_NUMBER
- See Also:
-
SORTBY_ROAD
- See Also:
-
SORTBY_TYPE
- See Also:
-
SORTBY_LOCATION
- See Also:
-
SORTBY_DESTINATION
- See Also:
-
SORTBY_TRAIN
- See Also:
-
SORTBY_MOVES
- See Also:
-
SORTBY_KERNEL
- See Also:
-
SORTBY_LOAD
- See Also:
-
SORTBY_COLOR
- See Also:
-
SORTBY_BUILT
- See Also:
-
SORTBY_OWNER
- See Also:
-
SORTBY_RFID
- See Also:
-
SORTBY_RWE
- See Also:
-
SORTBY_RWL
- See Also:
-
SORTBY_ROUTE
- See Also:
-
SORTBY_DIVISION
- See Also:
-
SORTBY_FINALDESTINATION
- See Also:
-
SORTBY_VALUE
- See Also:
-
SORTBY_WAIT
- See Also:
-
SORTBY_PICKUP
- See Also:
-
SORTBY_LAST
- See Also:
-
SORTBY_COMMENT
- See Also:
-
carList
-
_frame
-
cef
-
csf
-
-
Constructor Details
-
CarsTableModel
-
-
Method Details
-
setSort
Not all columns in the Cars table are shown. This was done to limit the width of the table. Only one column from the following groups is shown at any one time.Load, Color, and RWE Load are grouped together.
Destination, Final Destination, and RWE Destination are grouped together.
Moves, Built, Owner, Value, RFID, Wait, Pickup, and Last are grouped together.
- Parameters:
sort- The integer sort to use.
-
getSortByName
-
getSortByName
-
getForegroundColor
- Overrides:
getForegroundColorin classOperationsTableModel
-
toggleSelectVisible
-
resetCheckboxes
-
findCarByRoadNumber
Search for car by road number- Parameters:
roadNumber- The string road number to search for.- Returns:
- -1 if not found, table row number if found
-
getCarAtIndex
-
getSelectedCarList
-
getCarList
-
initTable
-
initTable
void initTable() -
getRowCount
- Specified by:
getRowCountin interfaceTableModel
-
getColumnCount
- Specified by:
getColumnCountin interfaceTableModel
-
getColumnName
- Specified by:
getColumnNamein interfaceTableModel- Overrides:
getColumnNamein classAbstractTableModel
-
getColumnClass
- Specified by:
getColumnClassin interfaceTableModel- Overrides:
getColumnClassin classAbstractTableModel
-
isCellEditable
- Specified by:
isCellEditablein interfaceTableModel- Overrides:
isCellEditablein classAbstractTableModel
-
getValueAt
- Specified by:
getValueAtin interfaceTableModel
-
setValueAt
- Specified by:
setValueAtin interfaceTableModel- Overrides:
setValueAtin classAbstractTableModel
-
dispose
-
propertyChange
- Specified by:
propertyChangein interfacePropertyChangeListener
-