public abstract class AbstractBrowseNode extends java.lang.Object implements BrowseTreeNode
Modifier and Type | Class and Description |
---|---|
static class |
AbstractBrowseNode.BrowseTreeComparator |
static class |
AbstractBrowseNode.InfoComparator |
protected class |
AbstractBrowseNode.Loader |
protected static class |
AbstractBrowseNode.LoadingStatus |
protected static class |
AbstractBrowseNode.NodeWrapper
Simple wrapper containing a BrowseTreeNode and the index at which the node occurs in this node.
|
Modifier and Type | Field and Description |
---|---|
protected AbstractBrowseNode.LoadingStatus |
childStatus |
protected ErrorNode |
errorNode |
protected static java.util.concurrent.ExecutorService |
executor
Static single-thread executor that will service all child load reqs
|
protected static java.util.Set<TagObjectType> |
folderTypes |
protected NodeBrowseInfo |
info |
protected LoadingNode |
loadingNode |
protected AbstractBrowseNode.Loader |
loadRunner |
protected static LoggerEx |
log |
protected java.util.List<? extends BrowseTreeNode> |
nodeList |
protected java.util.Map<java.lang.String,AbstractBrowseNode.NodeWrapper> |
nodeMap
Map of named nodes used for name-based lookup and quick index lookup
|
protected int[] |
parentIndex |
protected static AbstractBrowseNode.BrowseTreeComparator |
TAG_COMP |
protected TagTreeModel |
treeModel |
protected boolean |
visible |
NO_TYPES
Modifier | Constructor and Description |
---|---|
protected |
AbstractBrowseNode(NodeBrowseInfo info) |
Modifier and Type | Method and Description |
---|---|
void |
blockLoad()
Force this tree node to load it's children (if not already loaded) synchronously.
|
java.util.Enumeration |
children() |
protected AbstractBrowseNode.Loader |
createLoader(boolean synchronous) |
protected java.util.Map<java.lang.String,AbstractBrowseNode.NodeWrapper> |
createNodeMap(java.util.List<? extends BrowseTreeNode> nodeList) |
boolean |
equals(java.lang.Object obj) |
protected abstract java.util.List<BrowseTreeNode> |
executeChildrenBrowse() |
BrowseTreeNode |
findChildNodeByName(java.lang.String name) |
protected void |
fireLightweightChange()
Fires a lightweight change through treeModel.nodesChanged()
|
protected void |
fireNodeChanged()
Fires a heavyweight changethrough treeModel.reload()
|
boolean |
getAllowsChildren() |
BrowseTreeNode |
getChildAt(int idx) |
int |
getChildCount() |
ClientContext |
getClientContext() |
int |
getIndex(javax.swing.tree.TreeNode node) |
NodeBrowseInfo |
getInfo() |
ClientTagManager |
getManager() |
TagPath |
getTagPath()
Returns the tag path for this tree node
|
boolean |
hasChild(java.lang.String name) |
int |
hashCode() |
void |
install(TagTreeModel model,
int index)
Called then the node is created.
|
boolean |
isLeaf() |
boolean |
isMetaNode()
Returns true if this node is a meta node.
|
boolean |
isVisible() |
protected void |
loadChildrenAsync(boolean force) |
protected void |
loadChildrenWithStatus(boolean force,
boolean synchronous) |
protected void |
loadDone(java.util.List<? extends BrowseTreeNode> nodeList,
java.util.Map<java.lang.String,AbstractBrowseNode.NodeWrapper> nodeMap) |
protected void |
loadError(java.lang.Exception ex) |
protected void |
logLoaded() |
void |
maybeBrowseAsync()
Will perform an async browse and load for the children of this node if they have not already been loaded.
|
protected void |
notifyVisibilityChange() |
void |
reload()
Will perform a full browse a reload for the children of this node
|
void |
reloadSynchronous() |
void |
setVisible(boolean visible)
Notifies this node if it is currently displayed or not.
|
void |
uninstall() |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getAllowedNewObjectTypes, getEditRights, getName, getParent, getTooltipText
getTagType
protected static final java.util.Set<TagObjectType> folderTypes
protected static LoggerEx log
protected static AbstractBrowseNode.BrowseTreeComparator TAG_COMP
protected TagTreeModel treeModel
protected int[] parentIndex
protected boolean visible
protected AbstractBrowseNode.LoadingStatus childStatus
protected LoadingNode loadingNode
protected ErrorNode errorNode
protected NodeBrowseInfo info
protected java.util.List<? extends BrowseTreeNode> nodeList
protected java.util.Map<java.lang.String,AbstractBrowseNode.NodeWrapper> nodeMap
protected static java.util.concurrent.ExecutorService executor
protected AbstractBrowseNode.Loader loadRunner
protected AbstractBrowseNode(NodeBrowseInfo info)
public ClientContext getClientContext()
public NodeBrowseInfo getInfo()
getInfo
in interface BrowseTreeNode
getInfo
in interface InfoNode
public TagPath getTagPath()
BrowseTreeNode
getTagPath
in interface BrowseTreeNode
protected java.util.Map<java.lang.String,AbstractBrowseNode.NodeWrapper> createNodeMap(java.util.List<? extends BrowseTreeNode> nodeList)
public void maybeBrowseAsync()
BrowseTreeNode
maybeBrowseAsync
in interface BrowseTreeNode
protected abstract java.util.List<BrowseTreeNode> executeChildrenBrowse() throws java.lang.Exception
java.lang.Exception
protected void loadDone(java.util.List<? extends BrowseTreeNode> nodeList, java.util.Map<java.lang.String,AbstractBrowseNode.NodeWrapper> nodeMap)
protected void logLoaded()
protected void loadError(java.lang.Exception ex)
protected void loadChildrenAsync(boolean force)
protected void loadChildrenWithStatus(boolean force, boolean synchronous)
public void blockLoad()
AsynchronousTreeNode
blockLoad
in interface AsynchronousTreeNode
protected AbstractBrowseNode.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)
hasChild
in interface BrowseTreeNode
public BrowseTreeNode findChildNodeByName(@Nonnull java.lang.String name)
findChildNodeByName
in interface BrowseTreeNode
public BrowseTreeNode getChildAt(int idx)
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(TagTreeModel model, int index)
BrowseTreeNode
install
in interface BrowseTreeNode
index
- The index at which this node occurs in its parentpublic ClientTagManager getManager()
public void uninstall()
uninstall
in interface BrowseTreeNode
public void reload()
BrowseTreeNode
reload
in interface BrowseTreeNode
public void reloadSynchronous()
protected void fireNodeChanged()
protected void fireLightweightChange()
public void setVisible(boolean visible)
BrowseTreeNode
setVisible
in interface BrowseTreeNode
public boolean isVisible()
isVisible
in interface BrowseTreeNode
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()
BrowseTreeNode
isMetaNode
in interface BrowseTreeNode