Protege 3.0

edu.stanford.smi.protege.util
Class LazyTreeNode

java.lang.Object
  extended byedu.stanford.smi.protege.util.LazyTreeNode
All Implemented Interfaces:
TreeNode
Direct Known Subclasses:
ClsClsReferenceNode, LazyTreeRoot, ParentChildNode, ReferenceNode, SlotSubslotNode

public abstract class LazyTreeNode
extends Object
implements TreeNode

A tree node that doesn't check its children until it is asked for them. This lazy evaluation alls the system to do "load on demand" from a database.

Author:
Ray Fergerson

Constructor Summary
LazyTreeNode(LazyTreeNode parent, Object userObject)
           
 
Method Summary
 void childAdded(Object o)
           
 void childAdded(Object o, int index)
           
 void childRemoved(Object o)
           
 Enumeration children()
           
protected abstract  LazyTreeNode createNode(Object o)
           
protected  void dispose()
           
static boolean equals(Object o1, Object o2)
           
 boolean getAllowsChildren()
           
 TreeNode getChildAt(int i)
           
 int getChildCount()
           
protected abstract  int getChildObjectCount()
           
protected abstract  Collection getChildObjects()
           
protected abstract  Comparator getComparator()
           
 int getIndex(Object o)
           
 int getIndex(TreeNode node)
           
 LazyTreeNode getLazyTreeNodeParent()
           
 TreeNode getParent()
           
 Object getUserObject()
           
 int getUserObjectIndex(Object o)
           
 boolean isLeaf()
           
 void notifyChildNodeAdded(LazyTreeNode parent, int index, LazyTreeNode child)
           
 void notifyChildNodeRemoved(LazyTreeNode parent, int index, LazyTreeNode child)
           
 void notifyNodeChanged(LazyTreeNode node)
           
 void notifyNodeStructureChanged(LazyTreeNode node)
           
 void reload()
           
 void reload(Object userObject)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LazyTreeNode

public LazyTreeNode(LazyTreeNode parent,
                    Object userObject)
Method Detail

childAdded

public void childAdded(Object o)

childAdded

public void childAdded(Object o,
                       int index)

childRemoved

public void childRemoved(Object o)

children

public Enumeration children()
Specified by:
children in interface TreeNode

createNode

protected abstract LazyTreeNode createNode(Object o)

dispose

protected void dispose()

getAllowsChildren

public boolean getAllowsChildren()
Specified by:
getAllowsChildren in interface TreeNode

getChildAt

public TreeNode getChildAt(int i)
Specified by:
getChildAt in interface TreeNode

getChildCount

public int getChildCount()
Specified by:
getChildCount in interface TreeNode

getChildObjectCount

protected abstract int getChildObjectCount()

getChildObjects

protected abstract Collection getChildObjects()

getComparator

protected abstract Comparator getComparator()

getIndex

public int getIndex(Object o)

getIndex

public int getIndex(TreeNode node)
Specified by:
getIndex in interface TreeNode

getLazyTreeNodeParent

public LazyTreeNode getLazyTreeNodeParent()

getParent

public TreeNode getParent()
Specified by:
getParent in interface TreeNode

getUserObject

public Object getUserObject()

getUserObjectIndex

public int getUserObjectIndex(Object o)

isLeaf

public boolean isLeaf()
Specified by:
isLeaf in interface TreeNode

notifyChildNodeAdded

public void notifyChildNodeAdded(LazyTreeNode parent,
                                 int index,
                                 LazyTreeNode child)

notifyChildNodeRemoved

public void notifyChildNodeRemoved(LazyTreeNode parent,
                                   int index,
                                   LazyTreeNode child)

notifyNodeChanged

public void notifyNodeChanged(LazyTreeNode node)

notifyNodeStructureChanged

public void notifyNodeStructureChanged(LazyTreeNode node)

reload

public void reload()

reload

public void reload(Object userObject)

toString

public String toString()

equals

public static boolean equals(Object o1,
                             Object o2)

Protege 3.0

Submit a bug report or feature request
Protégé is a trademark of Stanford University.
Copyright (c) 1998-2005 Stanford University.