Package docking.widgets.table
Class RowObjectSelectionManager<T>
- java.lang.Object
- 
- javax.swing.DefaultListSelectionModel
- 
- docking.widgets.table.RowObjectSelectionManager<T>
 
 
- 
- Type Parameters:
- T- the row type
 - All Implemented Interfaces:
- SelectionManager,- java.io.Serializable,- java.lang.Cloneable,- java.util.EventListener,- javax.swing.event.TableModelListener,- javax.swing.ListSelectionModel
 
 public class RowObjectSelectionManager<T> extends javax.swing.DefaultListSelectionModel implements SelectionManager A class to track and restore selections made in a table. We use this in the docking environment primarily due to the heavy usage of filtering for most tables. As tables are filtered, the contents change (and then change back when the filter is removed). It is nice to be able to filter a table, select an item of interest, and then unfilter the table to see that item in more context.- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description RowObjectSelectionManager(javax.swing.JTable table, RowObjectTableModel<T> model)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSelectionManagerListener(SelectionManagerListener listener)voidclearSavedSelection()voidclearSelection()voiddispose()protected voidfireValueChanged(int firstIndex, int lastIndex, boolean isAdjusting)voidremoveSelectionManagerListener(SelectionManagerListener listener)voidtableChanged(javax.swing.event.TableModelEvent e)protected java.util.List<T>translateRowsToValues(int[] viewRows)- 
Methods inherited from class javax.swing.DefaultListSelectionModeladdListSelectionListener, addSelectionInterval, clone, fireValueChanged, fireValueChanged, getAnchorSelectionIndex, getLeadSelectionIndex, getListeners, getListSelectionListeners, getMaxSelectionIndex, getMinSelectionIndex, getSelectionMode, getValueIsAdjusting, insertIndexInterval, isLeadAnchorNotificationEnabled, isSelectedIndex, isSelectionEmpty, moveLeadSelectionIndex, removeIndexInterval, removeListSelectionListener, removeSelectionInterval, setAnchorSelectionIndex, setLeadAnchorNotificationEnabled, setLeadSelectionIndex, setSelectionInterval, setSelectionMode, setValueIsAdjusting, toString
 - 
Methods inherited from class java.lang.Objectequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface javax.swing.ListSelectionModeladdListSelectionListener, addSelectionInterval, getAnchorSelectionIndex, getLeadSelectionIndex, getMaxSelectionIndex, getMinSelectionIndex, getSelectedIndices, getSelectedItemsCount, getSelectionMode, getValueIsAdjusting, insertIndexInterval, isSelectedIndex, isSelectionEmpty, removeIndexInterval, removeListSelectionListener, removeSelectionInterval, setAnchorSelectionIndex, setLeadSelectionIndex, setSelectionInterval, setSelectionMode, setValueIsAdjusting
 
- 
 
- 
- 
- 
Constructor Detail- 
RowObjectSelectionManagerpublic RowObjectSelectionManager(javax.swing.JTable table, RowObjectTableModel<T> model)
 
- 
 - 
Method Detail- 
addSelectionManagerListenerpublic void addSelectionManagerListener(SelectionManagerListener listener) - Specified by:
- addSelectionManagerListenerin interface- SelectionManager
 
 - 
removeSelectionManagerListenerpublic void removeSelectionManagerListener(SelectionManagerListener listener) - Specified by:
- removeSelectionManagerListenerin interface- SelectionManager
 
 - 
disposepublic void dispose() - Specified by:
- disposein interface- SelectionManager
 
 - 
clearSavedSelectionpublic void clearSavedSelection() - Specified by:
- clearSavedSelectionin interface- SelectionManager
 
 - 
clearSelectionpublic void clearSelection() - Specified by:
- clearSelectionin interface- javax.swing.ListSelectionModel
- Overrides:
- clearSelectionin class- javax.swing.DefaultListSelectionModel
 
 - 
fireValueChangedprotected void fireValueChanged(int firstIndex, int lastIndex, boolean isAdjusting)- Overrides:
- fireValueChangedin class- javax.swing.DefaultListSelectionModel
 
 - 
translateRowsToValuesprotected java.util.List<T> translateRowsToValues(int[] viewRows) 
 - 
tableChangedpublic void tableChanged(javax.swing.event.TableModelEvent e) - Specified by:
- tableChangedin interface- javax.swing.event.TableModelListener
 
 
- 
 
-