Skip to content

Java Swing JTree model with a hierarchy of filesystem directories.

License

Notifications You must be signed in to change notification settings

synapticloopltd/directory-tree

This branch is 11 commits ahead of, 6 commits behind parubok/directory-tree:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
synapticloop
Jun 7, 2021
69d0489 · Jun 7, 2021

History

92 Commits
Mar 13, 2021
Mar 13, 2021
Jun 7, 2021
Jun 7, 2021
Jun 7, 2021
Jun 7, 2021
Mar 13, 2021
Jun 7, 2021
Jun 7, 2021
Mar 13, 2021
Jun 7, 2021
Jun 7, 2021
Jun 7, 2021
Jun 7, 2021

Repository files navigation

License

This was forked from https://github.com/parubok/directory-tree/

directory-tree

The goal of this project is to provide an efficient and convenient implementation of Java Swing JTree model with a hierarchy of a local filesystem directories (e.g. for directory chooser component).

Note: Though the model itself does not provide any builtin support for asynchronous operations, it can be built and prepopulated (via DirTreeModel.getTreePath) on any thread and then passed to the EDT.

Example:

import org.swingk.io.dirtree.DirTreeModel;
import org.swingk.io.dirtree.DefaultNodeFactory;
import org.swingk.io.dirtree.DirTreeUtils;

import javax.swing.JTree;

var model = new DirTreeModel<>(DirTreeUtils.NAME_COMPARATOR, true, true, new DefaultNodeFactory());
JTree tree = new JTree();
DirTreeUtils.configureTree(tree, model);

A demo application is provided. See org.swingk.io.dirtree.demo.Demo.

This library is packaged as a Java 9 module org.swingk.io.dirtree (with a single dependency on a system module java.desktop).

This project has no external dependencies (except JUnit 5, for testing).

Requires Java 11 or later.

About

Java Swing JTree model with a hierarchy of filesystem directories.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%