Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


oracle.javatools.ui.tree.lazy
Interface LazyParent<T>


public interface LazyParent<T>

A LazyParent provides the mechanism for lazy retrieval of children of a node in a tree i.e Children are retrieved at time of first expansion of the parent node.

A LazyParent is contained by a LazyParentNode. When the node is expanded the parent is asked to fetch its children. These children are then embedded into their own nodes and added to the tree. The children may themselves be LazyParents.

The children are fetched in their own SwingWorker, allowing non-UI blocking behavior of the tree. If the retrieval is taking any significant time to complete then a progress node appears in the tree informing the user of the child loading progress.

Usage: Implement LazyParent and create a new LazyParentNode for it, then add the node to a tree containing a DefaultTreeModel


Method Summary
 javax.swing.SwingWorker<java.util.List<T>,java.lang.Object> getChildWorker()
          Fetch the children of a node in the tree.

 

Method Detail

getChildWorker

javax.swing.SwingWorker<java.util.List<T>,java.lang.Object> getChildWorker()
Fetch the children of a node in the tree. The children are returned in a list in the order they will appear in the tree.

Children also may or may not be lazy themselves: If a child in the list also implements LazyParent then it will be wrapped in a LazyParentNode, otherwise the child object will be wrapped in a plain DefaultMutableTreeNode.


Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


Copyright © 1997, 2012, Oracle. All rights reserved.