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
[legend]

List of all members.

Classes

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

Author:
Thierry LEFORT 3 mars 08
Bernard BOU <bbou@ac-toulouse.fr>

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

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

Create loading node

Returns:
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

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

Whether the node is leaf

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

Perform the loading

Parameters:
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.

Parameters:
thisTree tree
Returns:
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

Parameters:
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

Parameters:
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

Parameters:
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

Parameters:
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