Provides a JavaFX component displaying the files and directories of a directory as a list. The view is updated automatically if something in the directory has changed.
Sadly JavaFX does not provide such a component out of the box. Although JFX provides file and directory choosers you cannot embed them into your application. This little library wants to change this!
You can get the library via JitPack.io.
// add JitPack.io repository
repositories {
maven { url 'https://jitpack.io' }
}
// add dependency
dependencies {
compile 'com.github.thetric:jfx-directory-viewer:1.0'
}
final DirectoryListView dirListView = new DirectoryListView();
final Path startDir = Paths.get(System.getProperty("user.home"));
// updates list view automatically to the new root path
dirListView.setCurrentDirectory(startDir);
// or
dirListView.currentDirectoryProperty().set()
// clean up after disposing
dirListView.unwatchDirectory();