public abstract class AbstractTagPathTreeNode extends java.lang.Object implements TagPathTreeNode
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractTagPathTreeNode.Loader |
protected static class |
AbstractTagPathTreeNode.LoadingStatus |
protected static class |
AbstractTagPathTreeNode.NodeWrapper
Simple wrapper containing a TagPathTreeNode and the index at which the node occurs in this node.
|
protected static class |
AbstractTagPathTreeNode.TagTreeNodeComparator |
Modifier and Type | Field and Description |
---|---|
protected ErrorNode |
errorNode |
protected static java.util.concurrent.ExecutorService |
executor
Static single-thread executor that will service all child load reqs
|
protected LoadingNode |
loadingNode |
protected AbstractTagPathTreeNode.Loader |
loadRunner |
protected static org.apache.log4j.Logger |
log |
protected java.util.List<? extends TagPathTreeNode> |
nodeList |
protected java.util.Map<java.lang.String,AbstractTagPathTreeNode.NodeWrapper> |
nodeMap
Map of named nodes used for name-based lookup and quick index lookup
|
protected int[] |
parentIndex |
protected AbstractTagPathTreeNode.LoadingStatus |
status |
protected static AbstractTagPathTreeNode.TagTreeNodeComparator |
TAG_COMP |
protected SQLTagTreeModel |
treeModel |
protected boolean |
visible |
Modifier | Constructor and Description |
---|---|
protected |
AbstractTagPathTreeNode() |
Modifier and Type | Method and Description |
---|---|
void |
blockLoad()
Tells the node to load its children synchronously - blocking until they're loaded
|
protected void |
checkChildren(boolean force) |
protected void |
checkChildren(boolean force,
boolean synchronous) |
java.util.Enumeration |
children() |
protected AbstractTagPathTreeNode.Loader |
createLoader(boolean synchronous) |
protected java.util.Map<java.lang.String,AbstractTagPathTreeNode.NodeWrapper> |
createNodeMap(java.util.List<? extends TagPathTreeNode> nodeList) |
boolean |
equals(java.lang.Object obj) |
TagPathTreeNode |
findChildNodeByName(java.lang.String name)
Returns a child tree node identified by the given name, or null if none was found by that name.
|
protected void |
fireLightweightChange()
Fires a lightweight change through treeModel.nodesChanged()
|
protected void |
fireNodeChanged()
Fires a heavyweight changethrough treeModel.reload()
|
boolean |
getAllowsChildren() |
TagPathTreeNode |
getChildAt(int idx)
Narrowed return type from getChildAt in TreeNode
|
int |
getChildCount() |
int |
getIndex(javax.swing.tree.TreeNode node) |
ClientTagManager |
getManager()
Returns the root ClientTagManager that loaded this node
|
boolean |
hasChild(java.lang.String name)
Returns a boolean indicating if this node has a child of the given name
|
int |
hashCode() |
void |
install(SQLTagTreeModel model,
int index)
Called then the node is created.
|
boolean |
isLeaf() |
boolean |
isMetaNode()
Returns true if this node is a meta node.
|
boolean |
isVisible() |
abstract java.util.List<? extends TagPathTreeNode> |
loadChildren() |
protected void |
loadDone(java.util.List<? extends TagPathTreeNode> nodeList,
java.util.Map<java.lang.String,AbstractTagPathTreeNode.NodeWrapper> nodeMap) |
protected void |
loadError(java.lang.Exception ex) |
protected void |
logLoaded() |
protected void |
notifyVisibilityChange() |
void |
reload() |
void |
reloadSynchronous() |
void |
setVisible(boolean visible)
Notifies this node if it is currently displayed or not.
|
void |
uninstall()
Called when the node is destroyed.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getName, getParent, getTagPath, getTooltipText
protected static org.apache.log4j.Logger log
protected static AbstractTagPathTreeNode.TagTreeNodeComparator TAG_COMP
protected SQLTagTreeModel treeModel
protected int[] parentIndex
protected boolean visible
protected AbstractTagPathTreeNode.LoadingStatus status
protected LoadingNode loadingNode
protected ErrorNode errorNode
protected java.util.List<? extends TagPathTreeNode> nodeList
protected java.util.Map<java.lang.String,AbstractTagPathTreeNode.NodeWrapper> nodeMap
protected static java.util.concurrent.ExecutorService executor
protected AbstractTagPathTreeNode.Loader loadRunner
protected java.util.Map<java.lang.String,AbstractTagPathTreeNode.NodeWrapper> createNodeMap(java.util.List<? extends TagPathTreeNode> nodeList)
public abstract java.util.List<? extends TagPathTreeNode> loadChildren() throws java.lang.Exception
java.lang.Exception
protected void loadDone(java.util.List<? extends TagPathTreeNode> nodeList, java.util.Map<java.lang.String,AbstractTagPathTreeNode.NodeWrapper> nodeMap)
protected void logLoaded()
protected void loadError(java.lang.Exception ex)
protected void checkChildren(boolean force)
protected void checkChildren(boolean force, boolean synchronous)
public void blockLoad()
TagPathTreeNode
blockLoad
in interface TagPathTreeNode
blockLoad
in interface AsynchronousTreeNode
protected AbstractTagPathTreeNode.Loader createLoader(boolean synchronous)
public java.util.Enumeration children()
children
in interface javax.swing.tree.TreeNode
public int getChildCount()
getChildCount
in interface javax.swing.tree.TreeNode
public int getIndex(javax.swing.tree.TreeNode node)
getIndex
in interface javax.swing.tree.TreeNode
public boolean hasChild(java.lang.String name)
TagPathTreeNode
hasChild
in interface TagPathTreeNode
public TagPathTreeNode findChildNodeByName(java.lang.String name)
TagPathTreeNode
findChildNodeByName
in interface TagPathTreeNode
public TagPathTreeNode getChildAt(int idx)
TagPathTreeNode
getChildAt
in interface TagPathTreeNode
getChildAt
in interface javax.swing.tree.TreeNode
public boolean isLeaf()
isLeaf
in interface javax.swing.tree.TreeNode
public boolean getAllowsChildren()
getAllowsChildren
in interface javax.swing.tree.TreeNode
public void install(SQLTagTreeModel model, int index)
TagPathTreeNode
install
in interface TagPathTreeNode
index
- The index at which this node occurs in its parentpublic ClientTagManager getManager()
TagPathTreeNode
getManager
in interface TagPathTreeNode
public void uninstall()
TagPathTreeNode
uninstall
in interface TagPathTreeNode
public void reload()
reload
in interface TagPathTreeNode
public void reloadSynchronous()
protected void fireNodeChanged()
protected void fireLightweightChange()
public void setVisible(boolean visible)
TagPathTreeNode
setVisible
in interface TagPathTreeNode
public boolean isVisible()
isVisible
in interface TagPathTreeNode
protected void notifyVisibilityChange()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean isMetaNode()
TagPathTreeNode
isMetaNode
in interface TagPathTreeNode