Class DirTreeAdapter

java.lang.Object
ca.corbett.extras.dirtree.DirTreeAdapter
All Implemented Interfaces:
DirTreeListener

public class DirTreeAdapter extends Object implements DirTreeListener
An adapter class for DirTreeListener with empty method implementations.
Since:
swing-extras 2.7
Author:
scorbo2
  • Constructor Details

    • DirTreeAdapter

      public DirTreeAdapter()
  • Method Details

    • selectionWillChange

      public boolean selectionWillChange(DirTree source, File newSelectedDir)
      Description copied from interface: DirTreeListener
      Invoked before a selection change occurs within the DirTree. You can return false here to veto the selection change.
      Specified by:
      selectionWillChange in interface DirTreeListener
      Parameters:
      source - The DirTree instance triggering this event.
      newSelectedDir - The directory that is about to be selected.
      Returns:
      True to allow the selection change, false to veto it.
    • selectionChanged

      public void selectionChanged(DirTree source, File selectedDir)
      Description copied from interface: DirTreeListener
      Fired when a directory is selected within the DirTree.
      Specified by:
      selectionChanged in interface DirTreeListener
      Parameters:
      source - The DirTree instance triggering this event.
      selectedDir - The newly selected directory.
    • showHiddenFilesChanged

      public void showHiddenFilesChanged(DirTree source, boolean showHiddenFiles)
      Description copied from interface: DirTreeListener
      Fired when the "show hidden files" setting is changed.
      Specified by:
      showHiddenFilesChanged in interface DirTreeListener
      Parameters:
      source - The DirTree instance triggering this event.
      showHiddenFiles - The new state of the "show hidden files" setting.
    • treeLocked

      public void treeLocked(DirTree source, File lockDir)
      Description copied from interface: DirTreeListener
      Fired when a DirTree instance is locked to a specific subdirectory (like chroot).
      Specified by:
      treeLocked in interface DirTreeListener
      Parameters:
      source - The DirTree instance triggering this event.
      lockDir - The subdirectory to which the DirTree is now locked.
    • treeUnlocked

      public void treeUnlocked(DirTree source)
      Description copied from interface: DirTreeListener
      Fired when a DirTree instance is unlocked, and will now show all directories.
      Specified by:
      treeUnlocked in interface DirTreeListener
      Parameters:
      source - The DirTree instance triggering this event.
    • fileDoubleClicked

      public void fileDoubleClicked(DirTree source, File file)
      Description copied from interface: DirTreeListener
      Fired when a file node is double-clicked within the DirTree. This event is only relevant when showFiles is enabled.
      Specified by:
      fileDoubleClicked in interface DirTreeListener
      Parameters:
      source - The DirTree instance triggering this event.
      file - The file that was double-clicked.