edu.princeton.wordnet.browser.tree.LazyDefaultMutableTreeNode Class Reference

Inherits javax::swing::tree::DefaultMutableTreeNode.

Inherited by edu.princeton.wordnet.pojos.tree.LinksTreeNode.

Collaboration diagram for edu.princeton.wordnet.browser.tree.LazyDefaultMutableTreeNode:
Collaboration graph

List of all members.


class  CancelWorkersAction

Public Member Functions

 LazyDefaultMutableTreeNode ()
abstract MutableTreeNode[] loadChildren (JTree thisTree)
void load (final JTree thisTree)
boolean isLeaf ()

Static Public Attributes

static boolean suicide = true

Protected Member Functions

void setSiblings (final JTree thisTree, final MutableTreeNode...theseSiblings)
void setChildren (final JTree thisTree, final MutableTreeNode...theseChildren)
boolean areChildrenLoaded ()
MutableTreeNode createLoadingNode ()
void reset (final JTree thisTree)
SwingWorker< MutableTreeNode[],
Void > 
createSwingWorker (final JTree thisTree)
void registerSwingWorkerForCancel (final JTree thisTree, final SwingWorker< MutableTreeNode[],?> thisWorker)
void unRegisterSwingWorkerForCancel (final JTree thisTree, final SwingWorker< MutableTreeNode[],?> thisWorker)

Detailed Description

Lazy loading default mutable node

Thierry LEFORT 3 mars 08
Bernard BOU <>

Constructor & Destructor Documentation

edu.princeton.wordnet.browser.tree.LazyDefaultMutableTreeNode.LazyDefaultMutableTreeNode (  ) 

Default Constructor

Member Function Documentation

boolean edu.princeton.wordnet.browser.tree.LazyDefaultMutableTreeNode.areChildrenLoaded (  )  [protected]

Whether children are loaded

true if there are some children
MutableTreeNode edu.princeton.wordnet.browser.tree.LazyDefaultMutableTreeNode.createLoadingNode (  )  [protected]

Create loading node

a new loading node
SwingWorker<MutableTreeNode[], Void> edu.princeton.wordnet.browser.tree.LazyDefaultMutableTreeNode.createSwingWorker ( final JTree  thisTree  )  [protected]

Create worker that will load the nodes

thisTree tree
the newly created SwingWorker
boolean edu.princeton.wordnet.browser.tree.LazyDefaultMutableTreeNode.isLeaf (  ) 

Whether the node is leaf

false, this node can't be a leaf
void edu.princeton.wordnet.browser.tree.LazyDefaultMutableTreeNode.load ( final JTree  thisTree  ) 

Perform the loading

thisTree tree (needed to perform changes)
abstract MutableTreeNode [] edu.princeton.wordnet.browser.tree.LazyDefaultMutableTreeNode.loadChildren ( JTree  thisTree  )  [pure virtual]

This method will be executed in a background thread.

thisTree tree
the Created nodes
void edu.princeton.wordnet.browser.tree.LazyDefaultMutableTreeNode.registerSwingWorkerForCancel ( final JTree  thisTree,
final SwingWorker< MutableTreeNode[],?>  thisWorker 
) [protected]

If the node is cancelable, an escape Action is registered in the tree's InputMap and ActionMap that will cancel the execution

thisTree tree
thisWorker the worker to cancel
void edu.princeton.wordnet.browser.tree.LazyDefaultMutableTreeNode.reset ( final JTree  thisTree  )  [protected]

Reset node

void edu.princeton.wordnet.browser.tree.LazyDefaultMutableTreeNode.setChildren ( final JTree  thisTree,
final MutableTreeNode...  theseChildren 
) [protected]

Define node children

thisTree tree
theseChildren new children nodes
void edu.princeton.wordnet.browser.tree.LazyDefaultMutableTreeNode.setSiblings ( final JTree  thisTree,
final MutableTreeNode...  theseSiblings 
) [protected]

Define siblings and suicide

thisTree tree
theseSiblings new sibling nodes
void edu.princeton.wordnet.browser.tree.LazyDefaultMutableTreeNode.unRegisterSwingWorkerForCancel ( final JTree  thisTree,
final SwingWorker< MutableTreeNode[],?>  thisWorker 
) [protected]

Remove the swingWorker from the cancelable task of the tree

thisTree tree
thisWorker worker thread

Member Data Documentation

Whether parent node kills itself when expanded to children

The documentation for this class was generated from the following file:
 All Classes Namespaces Functions Variables Enumerations
Generated on Tue May 25 16:43:51 2010 for WordNetScope by  doxygen 1.6.3