Package org.jdesktop.swingx
Class JXTreeTable.ListToTreeSelectionModelWrapper
- java.lang.Object
-
- javax.swing.tree.DefaultTreeSelectionModel
-
- org.jdesktop.swingx.JXTreeTable.ListToTreeSelectionModelWrapper
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,javax.swing.tree.TreeSelectionModel
- Enclosing class:
- JXTreeTable
class JXTreeTable.ListToTreeSelectionModelWrapper extends javax.swing.tree.DefaultTreeSelectionModelListToTreeSelectionModelWrapper 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) classJXTreeTable.ListToTreeSelectionModelWrapper.ListSelectionHandlerClass responsible for calling updateSelectedPathsFromSelectedRows when the selection of the list changse.
-
Field Summary
Fields Modifier and Type Field Description protected booleanupdatingListSelectionModelSet to true when we are updating the ListSelectionModel.
-
Constructor Summary
Constructors Constructor Description ListToTreeSelectionModelWrapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.swing.event.ListSelectionListenercreateListSelectionListener()Creates and returns an instance of ListSelectionHandler.(package private) javax.swing.ListSelectionModelgetListSelectionModel()Returns the list selection model.voidresetRowSelection()This is overridden to setupdatingListSelectionModeland message super.protected voidupdateSelectedPathsFromSelectedRows()IfupdatingListSelectionModelis false, this will reset the selected paths from the selected rows in the list selection model.-
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
-
-
-
-
Method Detail
-
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 setupdatingListSelectionModeland message super. This is the only place DefaultTreeSelectionModel alters the ListSelectionModel.- Specified by:
resetRowSelectionin interfacejavax.swing.tree.TreeSelectionModel- Overrides:
resetRowSelectionin classjavax.swing.tree.DefaultTreeSelectionModel
-
createListSelectionListener
protected javax.swing.event.ListSelectionListener createListSelectionListener()
Creates and returns an instance of ListSelectionHandler.
-
updateSelectedPathsFromSelectedRows
protected void updateSelectedPathsFromSelectedRows()
IfupdatingListSelectionModelis false, this will reset the selected paths from the selected rows in the list selection model.
-
-