Package jmri.jmrit.logix
Class WarrantTableModel
- All Implemented Interfaces:
PropertyChangeListener,Serializable,EventListener,TableModel
Table Model for the Warrant List
This file is part of JMRI.
This file is part of JMRI.
JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.
JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-
Nested Class Summary
Nested classes/interfaces inherited from class jmri.jmrit.beantable.BeanTableDataModel
BeanTableDataModel.BeanTableTooltipHeaderRenderer -
Field Summary
FieldsModifier and TypeFieldDescription(package private) WarrantTableFrame(package private) WarrantManagerstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int(package private) static Stringstatic final int(package private) static Color(package private) static Colorstatic final int(package private) static String(package private) static Stringstatic final intstatic final intstatic final int(package private) static StringFields inherited from class jmri.jmrit.beantable.BeanTableDataModel
COMMENTCOL, DELETECOL, NUMCOLUMN, SYSNAMECOL, sysNameList, USERNAMECOL, VALUECOLFields inherited from class javax.swing.table.AbstractTableModel
listenerList -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddHeaderListener(JTable table) protected voidprotected StringcheckAddressInUse(Warrant warrant) voidProcess a click on The value cell.protected StringGet String of the Single Bean Type.getBySystemName(String name) getByUserName(String name) Class<?>getColumnClass(int col) intGet Column Count INCLUDING Bean Property Columns.getColumnName(int col) Get the Table Model Bean Manager.protected StringintgetPreferredWidth(int col) protected intintGet the current Bean state value in human readable form.getValueAt(int row, int col) SYSNAMECOL returns the actual Bean, NOT the System Name.protected WarrantgetWarrant(String name) getWarrantAt(int index) protected voidvoidinit()Preserve current listeners so that there is no gap to miss a propertyChangebooleanisCellEditable(int row, int col) voidvoidremoveWarrant(Warrant w, boolean deregister) Removes any warrant, not just NXWarrantvoidsetValueAt(Object value, int row, int col) Methods inherited from class jmri.jmrit.beantable.BeanTableDataModel
addMouseListenerToHeader, configDeleteColumn, configureButton, configureJTable, configureTable, configValueColumn, copySystemName, copyUserName, deleteBean, dispose, doDelete, editComment, exportToCSV, formatToolTip, getCellToolTip, getDisplayDeleteMsg, getFilter, getHeaderTooltip, getPropertyColumnCount, getPropertyColumnDescriptor, isClearUserNameAllowed, makeJTable, matchPropertyName, moveBean, persistTable, printColumns, printTable, removeName, renameBean, setColumnIdentities, setColumnToHoldButton, setDisplayDeleteMsg, setFilter, setManager, setPropertyColumnsVisible, showPopup, showTableHeaderPopup, stopPersistingTable, updateNameListMethods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
Field Details
-
WARRANT_COLUMN
- See Also:
-
ROUTE_COLUMN
- See Also:
-
TRAIN_NAME_COLUMN
- See Also:
-
ADDRESS_COLUMN
- See Also:
-
ALLOCATE_COLUMN
- See Also:
-
DEALLOC_COLUMN
- See Also:
-
AUTO_RUN_COLUMN
- See Also:
-
MANUAL_RUN_COLUMN
- See Also:
-
CONTROL_COLUMN
- See Also:
-
EDIT_COLUMN
- See Also:
-
DELETE_COLUMN
- See Also:
-
NUMCOLS
- See Also:
-
_manager
-
_frame
-
myGreen
-
myGold
-
GREEN_LED
-
YELLOW_LED
-
OFF_LED
-
RED_LED
-
-
Constructor Details
-
WarrantTableModel
-
-
Method Details
-
addHeaderListener
-
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<Warrant>- Returns:
- current Manager in use by the Model.
-
getBySystemName
- Specified by:
getBySystemNamein classBeanTableDataModel<Warrant>
-
getValue
Description copied from class:BeanTableDataModelGet the current Bean state value in human readable form.- Specified by:
getValuein classBeanTableDataModel<Warrant>- Parameters:
name- System name of Bean.- Returns:
- state value in localised human readable form.
-
getByUserName
- Specified by:
getByUserNamein classBeanTableDataModel<Warrant>
-
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<Warrant>- Returns:
- Bean Type String.
-
clickOn
Description copied from class:BeanTableDataModelProcess a click on The value cell.- Specified by:
clickOnin classBeanTableDataModel<Warrant>- Parameters:
t- the Bean that has been clicked.
-
getMasterClassName
- Specified by:
getMasterClassNamein classBeanTableDataModel<Warrant>
-
init
Preserve current listeners so that there is no gap to miss a propertyChange -
haltAllTrains
-
addNXWarrant
-
removeWarrant
Removes any warrant, not just NXWarrant- Parameters:
w- Warrantderegister- deregister warrant
-
getWarrantAt
-
getWarrant
-
checkAddressInUse
-
getRowCount
Description copied from class:BeanTableDataModel- Specified by:
getRowCountin interfaceTableModel- Overrides:
getRowCountin classBeanTableDataModel<Warrant>
-
getRow
-
getColumnCount
Description copied from class:BeanTableDataModelGet Column Count INCLUDING Bean Property Columns.- Specified by:
getColumnCountin interfaceTableModel- Overrides:
getColumnCountin classBeanTableDataModel<Warrant>
-
getColumnName
Description copied from class:BeanTableDataModel- Specified by:
getColumnNamein interfaceTableModel- Overrides:
getColumnNamein classBeanTableDataModel<Warrant>
-
isCellEditable
Description copied from class:BeanTableDataModel- Specified by:
isCellEditablein interfaceTableModel- Overrides:
isCellEditablein classBeanTableDataModel<Warrant>
-
getColumnClass
Description copied from class:BeanTableDataModel- Specified by:
getColumnClassin interfaceTableModel- Overrides:
getColumnClassin classBeanTableDataModel<Warrant>
-
getPreferredWidth
- Overrides:
getPreferredWidthin classBeanTableDataModel<Warrant>
-
getValueAt
Description copied from class:BeanTableDataModelSYSNAMECOL returns the actual Bean, NOT the System Name.- Specified by:
getValueAtin interfaceTableModel- Overrides:
getValueAtin classBeanTableDataModel<Warrant>
-
setValueAt
Description copied from class:BeanTableDataModel- Specified by:
setValueAtin interfaceTableModel- Overrides:
setValueAtin classBeanTableDataModel<Warrant>
-
propertyChange
Description copied from class:BeanTableDataModel- Specified by:
propertyChangein interfacePropertyChangeListener- Overrides:
propertyChangein classBeanTableDataModel<Warrant>
-