java.lang.Object
javax.swing.tree.DefaultTreeSelectionModel
com.puppycrawl.tools.checkstyle.gui.JTreeTable.ListToTreeSelectionModelWrapper
- All Implemented Interfaces:
- java.lang.Cloneable, java.io.Serializable, javax.swing.tree.TreeSelectionModel
- Enclosing class:
- JTreeTable
- class JTreeTable.ListToTreeSelectionModelWrapper
- extends javax.swing.tree.DefaultTreeSelectionModel
ListToTreeSelectionModelWrapper extends DefaultTreeSelectionModel
to listen for changes in the ListSelectionModel it maintains. Once
a change in the ListSelectionModel happens, the paths are updated
in the DefaultTreeSelectionModel.
| Methods inherited from class javax.swing.tree.DefaultTreeSelectionModel |
addPropertyChangeListener, addSelectionPath, addSelectionPaths, addTreeSelectionListener, arePathsContiguous, canPathsBeAdded, canPathsBeRemoved, clearSelection, clone, fireValueChanged, getLeadSelectionPath, getLeadSelectionRow, getListeners, getMaxSelectionRow, getMinSelectionRow, getPropertyChangeListeners, getRowMapper, getSelectionCount, getSelectionMode, getSelectionPath, getSelectionPaths, getSelectionRows, getTreeSelectionListeners, insureRowContinuity, insureUniqueness, isPathSelected, isRowSelected, isSelectionEmpty, notifyPathChange, removePropertyChangeListener, removeSelectionPath, removeSelectionPaths, removeTreeSelectionListener, setRowMapper, setSelectionMode, setSelectionPath, setSelectionPaths, toString, updateLeadIndex |
updatingListSelectionModel
protected boolean updatingListSelectionModel
- Set to true when we are updating the ListSelectionModel.
JTreeTable.ListToTreeSelectionModelWrapper
public JTreeTable.ListToTreeSelectionModelWrapper()
getListSelectionModel
javax.swing.ListSelectionModel getListSelectionModel()
- Returns the list selection model. ListToTreeSelectionModelWrapper
listens for changes to this model and updates the selected paths
accordingly.
resetRowSelection
public void resetRowSelection()
- This is overridden to set
updatingListSelectionModel
and message super. This is the only place DefaultTreeSelectionModel
alters the ListSelectionModel.
createListSelectionListener
private javax.swing.event.ListSelectionListener createListSelectionListener()
- Creates and returns an instance of ListSelectionHandler.
updateSelectedPathsFromSelectedRows
protected void updateSelectedPathsFromSelectedRows()
- If
updatingListSelectionModel is false, this will
reset the selected paths from the selected rows in the list
selection model.