public final class LazyProgressController
extends java.lang.Object
A controller is not required to use lazy loading nodes - they can be added to the tree and will work as advertised - but the controller does offer additional abilities such as being able to cancel nodes currently in the progress of fetching children.
If used, a controller is intended to track all lazy nodes in a tree, and provide feedback via property changes whether there is at least one node in the tree currently fetching children.
A cancel mechanism is also provided which will cancel any active fetching.
These two things combined are primarily designed to allow a 'stop' ui, such as a button above the lazy tree that can be enabled/disabled as the lazy nodes load, and when pressed can cancel any fetching.
| Modifier and Type | Field and Description | 
|---|---|
static java.lang.String | 
PROPERTY_PROGRESS_ACTIVE
Property informing that there is at least one tracked progress node currently fetching its children. 
 | 
| Constructor and Description | 
|---|
LazyProgressController(javax.swing.JTree tree)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addPropertyChangeListener(java.beans.PropertyChangeListener listener)  | 
void | 
cancelProgress()
Stop any nodes that currently fetching children, and return the nodes to the pre-fetched state 
 | 
boolean | 
isProgressActive()  | 
void | 
removePropertyChangeListener(java.beans.PropertyChangeListener listener)  | 
public static final java.lang.String PROPERTY_PROGRESS_ACTIVE
public void cancelProgress()
public boolean isProgressActive()
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)