Skip to content
This repository has been archived by the owner on Oct 14, 2018. It is now read-only.

JavaFX control for displaying and watching the contents of a directory

License

Notifications You must be signed in to change notification settings

thetric/jfx-directory-viewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jfx-directory-viewer

Travis GitHub release

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.

Motivation

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!

Add as dependency

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'
}

Usage

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();

About

JavaFX control for displaying and watching the contents of a directory

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published