Swing Check Box Tree

A set of components for use with Swing JTrees that provide support for JCheckBox nodes.

License

License

Simplified BSD License
GroupId

GroupId

org.scijava
ArtifactId

ArtifactId

swing-checkbox-tree
Last Version

Last Version

1.0.2
Release Date

Release Date

Type

Type

jar
Description

Description

Swing Check Box Tree
A set of components for use with Swing JTrees that provide support for JCheckBox nodes.
Project URL

Project URL

https://github.com/scijava/swing-checkbox-tree
Project Organization

Project Organization

SciJava
Source Code Management

Source Code Management

https://github.com/scijava/swing-checkbox-tree

Download swing-checkbox-tree

How to add to project

<!-- https://jarcasting.com/artifacts/org.scijava/swing-checkbox-tree/ -->
<dependency>
    <groupId>org.scijava</groupId>
    <artifactId>swing-checkbox-tree</artifactId>
    <version>1.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/org.scijava/swing-checkbox-tree/
implementation 'org.scijava:swing-checkbox-tree:1.0.2'
// https://jarcasting.com/artifacts/org.scijava/swing-checkbox-tree/
implementation ("org.scijava:swing-checkbox-tree:1.0.2")
'org.scijava:swing-checkbox-tree:jar:1.0.2'
<dependency org="org.scijava" name="swing-checkbox-tree" rev="1.0.2">
  <artifact name="swing-checkbox-tree" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.scijava', module='swing-checkbox-tree', version='1.0.2')
)
libraryDependencies += "org.scijava" % "swing-checkbox-tree" % "1.0.2"
[org.scijava/swing-checkbox-tree "1.0.2"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

Swing Checkbox Tree

A check box tree package based on John Zukowski's CheckBox Node Tree Sample code.

You can mix and match DefaultMutableTreeNode and CheckBoxNodeData node types. It also allows check box nodes as non-leaf nodes.

It uses a JCheckBox + JLabel in a JPanel to differentiate between clicking on a check box (to check/uncheck a node) versus a label (to select a node).

The latter example also has code for recursively toggling subtrees in response to boxes being checked or unchecked (see the treeNodesChanged method).

See also this question on StackOverflow.

org.scijava

SciJava

Scientific libraries in Java

Versions

Version
1.0.2
1.0.1
1.0.0