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
keyValueAdaptor
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
-
Constructor Summary
ConstructorsConstructorDescriptionEmpty ConstructorKeyValueFilteredTableModel
(List<T> records, String... keyPaths) Primary Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
setInputFilterComponent
(JTextComponent component) set the specified text component as the text source for filtering table recordsvoid
setInputFilterDocument
(Document document) set the specified text input document as the text source for filtering table recordsvoid
setMatchingKeyPaths
(String... keyPaths) set the key paths to use for matchingvoid
setRecords
(List<T> records) Overrides the inherited method to set all of the records (before filtering)void
setValueAt
(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, setKeyPaths
Methods 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:
setValueAt
in interfaceTableModel
- Overrides:
setValueAt
in 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:
setRecords
in classKeyValueTableModel<T>
- Parameters:
records
- the list of objects
-