Package xal.extension.widgets.swing
Class KeyValueFilteredTableModel<T>
java.lang.Object
javax.swing.table.AbstractTableModel
xal.extension.widgets.swing.KeyValueTableModel<T>
xal.extension.widgets.swing.KeyValueFilteredTableModel<T>
- All Implemented Interfaces:
Serializable,TableModel
Key Value Table Model with built in support for filtering through a text
input document
- See Also:
-
Field Summary
Fields inherited from class xal.extension.widgets.swing.KeyValueTableModel
keyValueAdaptorFields inherited from class javax.swing.table.AbstractTableModel
listenerList -
Constructor Summary
ConstructorsConstructorDescriptionEmpty ConstructorKeyValueFilteredTableModel(List<T> records, String... keyPaths) Primary Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidsetInputFilterComponent(JTextComponent component) set the specified text component as the text source for filtering table recordsvoidsetInputFilterDocument(Document document) set the specified text input document as the text source for filtering table recordsvoidsetMatchingKeyPaths(String... keyPaths) set the key paths to use for matchingvoidsetRecords(List<T> records) Overrides the inherited method to set all of the records (before filtering)voidsetValueAt(Object value, int row, int column) Set the value of the specified cellMethods inherited from class xal.extension.widgets.swing.KeyValueTableModel
addKeyValueRecordListener, getColumnClass, getColumnCount, getColumnForKeyPath, getColumnName, getKeyPathForColumn, getRecordAtRow, getRowCount, getRowRecords, getValueAt, isCellEditable, removeKeyValueRecordListener, setColumnClass, setColumnClassForKeyPaths, setColumnEditable, setColumnEditKeyPath, setColumnEditKeyPath, setColumnName, setDataSource, setKeyPathsMethods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
-
Constructor Details
-
KeyValueFilteredTableModel
Primary Constructor- Parameters:
records- the list of objects (one record for each table row)keyPaths- specifies the array of key paths to get the data to display (one key path for each column)
-
KeyValueFilteredTableModel
public KeyValueFilteredTableModel()Empty Constructor
-
-
Method Details
-
setValueAt
Set the value of the specified cell- Specified by:
setValueAtin interfaceTableModel- Overrides:
setValueAtin classKeyValueTableModel<T>
-
setInputFilterDocument
set the specified text input document as the text source for filtering table records -
setInputFilterComponent
set the specified text component as the text source for filtering table records -
setMatchingKeyPaths
set the key paths to use for matching -
setRecords
Overrides the inherited method to set all of the records (before filtering)- Overrides:
setRecordsin classKeyValueTableModel<T>- Parameters:
records- the list of objects
-