Package ca.corbett.extras.dirtree
Class DirTreeAdapter
java.lang.Object
ca.corbett.extras.dirtree.DirTreeAdapter
- All Implemented Interfaces:
DirTreeListener
An adapter class for DirTreeListener with empty method implementations.
- Since:
- swing-extras 2.7
- Author:
- scorbo2
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfileDoubleClicked(DirTree source, File file) Fired when a file node is double-clicked within the DirTree.voidselectionChanged(DirTree source, File selectedDir) Fired when a directory is selected within the DirTree.booleanselectionWillChange(DirTree source, File newSelectedDir) Invoked before a selection change occurs within the DirTree.voidshowHiddenFilesChanged(DirTree source, boolean showHiddenFiles) Fired when the "show hidden files" setting is changed.voidtreeLocked(DirTree source, File lockDir) Fired when a DirTree instance is locked to a specific subdirectory (like chroot).voidtreeUnlocked(DirTree source) Fired when a DirTree instance is unlocked, and will now show all directories.
-
Constructor Details
-
DirTreeAdapter
public DirTreeAdapter()
-
-
Method Details
-
selectionWillChange
Description copied from interface:DirTreeListenerInvoked before a selection change occurs within the DirTree. You can return false here to veto the selection change.- Specified by:
selectionWillChangein interfaceDirTreeListener- 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
Description copied from interface:DirTreeListenerFired when a directory is selected within the DirTree.- Specified by:
selectionChangedin interfaceDirTreeListener- Parameters:
source- The DirTree instance triggering this event.selectedDir- The newly selected directory.
-
showHiddenFilesChanged
Description copied from interface:DirTreeListenerFired when the "show hidden files" setting is changed.- Specified by:
showHiddenFilesChangedin interfaceDirTreeListener- Parameters:
source- The DirTree instance triggering this event.showHiddenFiles- The new state of the "show hidden files" setting.
-
treeLocked
Description copied from interface:DirTreeListenerFired when a DirTree instance is locked to a specific subdirectory (like chroot).- Specified by:
treeLockedin interfaceDirTreeListener- Parameters:
source- The DirTree instance triggering this event.lockDir- The subdirectory to which the DirTree is now locked.
-
treeUnlocked
Description copied from interface:DirTreeListenerFired when a DirTree instance is unlocked, and will now show all directories.- Specified by:
treeUnlockedin interfaceDirTreeListener- Parameters:
source- The DirTree instance triggering this event.
-
fileDoubleClicked
Description copied from interface:DirTreeListenerFired when a file node is double-clicked within the DirTree. This event is only relevant whenshowFilesis enabled.- Specified by:
fileDoubleClickedin interfaceDirTreeListener- Parameters:
source- The DirTree instance triggering this event.file- The file that was double-clicked.
-