Class JTreeTable.ListToTreeSelectionModelWrapper

java.lang.Object
javax.swing.tree.DefaultTreeSelectionModel
com.iamsoft.util.ui.swing.JTreeTable.ListToTreeSelectionModelWrapper
All Implemented Interfaces:
Serializable, Cloneable, TreeSelectionModel
Enclosing class:
JTreeTable

public class JTreeTable.ListToTreeSelectionModelWrapper extends 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.
See Also:
  • Field Details

    • updatingListSelectionModel

      protected boolean updatingListSelectionModel
      Set to true when we are updating the ListSelectionModel.
  • Constructor Details

    • ListToTreeSelectionModelWrapper

      public ListToTreeSelectionModelWrapper()
  • Method Details

    • resetRowSelection

      public void resetRowSelection()
      This is overridden to set updatingListSelectionModel and message super. This is the only place DefaultTreeSelectionModel alters the ListSelectionModel.
      Specified by:
      resetRowSelection in interface TreeSelectionModel
      Overrides:
      resetRowSelection in class DefaultTreeSelectionModel
    • createListSelectionListener

      protected ListSelectionListener createListSelectionListener()
      Creates and returns an instance of ListSelectionHandler.
    • updateSelectedPathsFromSelectedRows

      public void updateSelectedPathsFromSelectedRows()
      If updatingListSelectionModel is false, this will reset the selected paths from the selected rows in the list selection model.