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,Serializable,Cloneable,EventListener,TableModelListener,ListSelectionModel
public class RowObjectSelectionManager<T>
extends 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:
-
Field Summary
Fields inherited from class javax.swing.DefaultListSelectionModel
leadAnchorNotificationEnabled, listenerListFields inherited from interface javax.swing.ListSelectionModel
MULTIPLE_INTERVAL_SELECTION, SINGLE_INTERVAL_SELECTION, SINGLE_SELECTION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidvoiddispose()protected voidfireValueChanged(int firstIndex, int lastIndex, boolean isAdjusting) voidvoidtranslateRowsToValues(int[] viewRows) Methods inherited from class javax.swing.DefaultListSelectionModel
addListSelectionListener, 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, toStringMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface javax.swing.ListSelectionModel
addListSelectionListener, addSelectionInterval, getAnchorSelectionIndex, getLeadSelectionIndex, getMaxSelectionIndex, getMinSelectionIndex, getSelectedIndices, getSelectedItemsCount, getSelectionMode, getValueIsAdjusting, insertIndexInterval, isSelectedIndex, isSelectionEmpty, removeIndexInterval, removeListSelectionListener, removeSelectionInterval, setAnchorSelectionIndex, setLeadSelectionIndex, setSelectionInterval, setSelectionMode, setValueIsAdjusting
-
Constructor Details
-
RowObjectSelectionManager
-
-
Method Details
-
addSelectionManagerListener
- Specified by:
addSelectionManagerListenerin interfaceSelectionManager
-
removeSelectionManagerListener
- Specified by:
removeSelectionManagerListenerin interfaceSelectionManager
-
dispose
public void dispose()- Specified by:
disposein interfaceSelectionManager
-
clearSavedSelection
public void clearSavedSelection()- Specified by:
clearSavedSelectionin interfaceSelectionManager
-
clearSelection
public void clearSelection()- Specified by:
clearSelectionin interfaceListSelectionModel- Overrides:
clearSelectionin classDefaultListSelectionModel
-
fireValueChanged
protected void fireValueChanged(int firstIndex, int lastIndex, boolean isAdjusting) - Overrides:
fireValueChangedin classDefaultListSelectionModel
-
translateRowsToValues
-
tableChanged
- Specified by:
tableChangedin interfaceTableModelListener
-