Class AbstractBrowseNode
- java.lang.Object
-
- com.inductiveautomation.ignition.client.tags.tree.node.AbstractBrowseNode
-
- All Implemented Interfaces:
BrowseTreeNode
,InfoNode
,AsynchronousTreeNode
,javax.swing.tree.TreeNode
- Direct Known Subclasses:
AllProvidersNode
,DatasetColumnTreeNode
,RootTagManagerNode
,TagTreeNode
,UdtDefBrowseNode
public abstract class AbstractBrowseNode extends java.lang.Object implements BrowseTreeNode
-
-
Nested Class Summary
Nested Classes Modifier and Type Class 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.
-
Field Summary
Fields Modifier and Type Field 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 reqsprotected 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 lookupprotected int[]
parentIndex
protected static AbstractBrowseNode.BrowseTreeComparator
TAG_COMP
protected TagTreeModel
treeModel
protected boolean
visible
-
Fields inherited from interface com.inductiveautomation.ignition.client.tags.tree.node.BrowseTreeNode
NO_TYPES
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractBrowseNode(NodeBrowseInfo info)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method 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 nodeboolean
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 nodevoid
reloadSynchronous()
void
setVisible(boolean visible)
Notifies this node if it is currently displayed or not.java.lang.String
toString()
void
uninstall()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.inductiveautomation.ignition.client.tags.tree.node.BrowseTreeNode
getAllowedNewObjectTypes, getEditRights, getName, getParent, getTooltipText
-
Methods inherited from interface com.inductiveautomation.ignition.client.tags.tree.node.InfoNode
getTagType
-
-
-
-
Field Detail
-
folderTypes
protected static final java.util.Set<TagObjectType> folderTypes
-
log
protected static LoggerEx log
-
TAG_COMP
protected static AbstractBrowseNode.BrowseTreeComparator TAG_COMP
-
treeModel
protected TagTreeModel treeModel
-
parentIndex
protected int[] parentIndex
-
visible
protected boolean visible
-
childStatus
protected AbstractBrowseNode.LoadingStatus childStatus
-
loadingNode
protected LoadingNode loadingNode
-
errorNode
protected ErrorNode errorNode
-
info
protected NodeBrowseInfo info
-
nodeList
protected java.util.List<? extends BrowseTreeNode> nodeList
-
nodeMap
protected java.util.Map<java.lang.String,AbstractBrowseNode.NodeWrapper> nodeMap
Map of named nodes used for name-based lookup and quick index lookup
-
executor
protected static java.util.concurrent.ExecutorService executor
Static single-thread executor that will service all child load reqs
-
loadRunner
protected AbstractBrowseNode.Loader loadRunner
-
-
Constructor Detail
-
AbstractBrowseNode
protected AbstractBrowseNode(NodeBrowseInfo info)
-
-
Method Detail
-
getClientContext
public ClientContext getClientContext()
-
getInfo
public NodeBrowseInfo getInfo()
- Specified by:
getInfo
in interfaceBrowseTreeNode
- Specified by:
getInfo
in interfaceInfoNode
-
getTagPath
public TagPath getTagPath()
Description copied from interface:BrowseTreeNode
Returns the tag path for this tree node- Specified by:
getTagPath
in interfaceBrowseTreeNode
-
createNodeMap
protected java.util.Map<java.lang.String,AbstractBrowseNode.NodeWrapper> createNodeMap(java.util.List<? extends BrowseTreeNode> nodeList)
-
maybeBrowseAsync
public void maybeBrowseAsync()
Description copied from interface:BrowseTreeNode
Will perform an async browse and load for the children of this node if they have not already been loaded.- Specified by:
maybeBrowseAsync
in interfaceBrowseTreeNode
-
executeChildrenBrowse
protected abstract java.util.List<BrowseTreeNode> executeChildrenBrowse() throws java.lang.Exception
- Throws:
java.lang.Exception
-
loadDone
protected void loadDone(java.util.List<? extends BrowseTreeNode> nodeList, java.util.Map<java.lang.String,AbstractBrowseNode.NodeWrapper> nodeMap)
-
logLoaded
protected void logLoaded()
-
loadError
protected void loadError(java.lang.Exception ex)
-
loadChildrenAsync
protected void loadChildrenAsync(boolean force)
-
loadChildrenWithStatus
protected void loadChildrenWithStatus(boolean force, boolean synchronous)
-
blockLoad
public void blockLoad()
Description copied from interface:AsynchronousTreeNode
Force this tree node to load it's children (if not already loaded) synchronously.- Specified by:
blockLoad
in interfaceAsynchronousTreeNode
-
createLoader
protected AbstractBrowseNode.Loader createLoader(boolean synchronous)
-
children
public java.util.Enumeration children()
- Specified by:
children
in interfacejavax.swing.tree.TreeNode
-
getChildCount
public int getChildCount()
- Specified by:
getChildCount
in interfacejavax.swing.tree.TreeNode
-
getIndex
public int getIndex(javax.swing.tree.TreeNode node)
- Specified by:
getIndex
in interfacejavax.swing.tree.TreeNode
-
hasChild
public boolean hasChild(java.lang.String name)
- Specified by:
hasChild
in interfaceBrowseTreeNode
-
findChildNodeByName
public BrowseTreeNode findChildNodeByName(@Nonnull java.lang.String name)
- Specified by:
findChildNodeByName
in interfaceBrowseTreeNode
-
getChildAt
public BrowseTreeNode getChildAt(int idx)
- Specified by:
getChildAt
in interfacejavax.swing.tree.TreeNode
-
isLeaf
public boolean isLeaf()
- Specified by:
isLeaf
in interfacejavax.swing.tree.TreeNode
-
getAllowsChildren
public boolean getAllowsChildren()
- Specified by:
getAllowsChildren
in interfacejavax.swing.tree.TreeNode
-
install
public void install(TagTreeModel model, int index)
Description copied from interface:BrowseTreeNode
Called then the node is created.- Specified by:
install
in interfaceBrowseTreeNode
index
- The index at which this node occurs in its parent
-
getManager
public ClientTagManager getManager()
-
uninstall
public void uninstall()
- Specified by:
uninstall
in interfaceBrowseTreeNode
-
reload
public void reload()
Description copied from interface:BrowseTreeNode
Will perform a full browse a reload for the children of this node- Specified by:
reload
in interfaceBrowseTreeNode
-
reloadSynchronous
public void reloadSynchronous()
-
fireNodeChanged
protected void fireNodeChanged()
Fires a heavyweight changethrough treeModel.reload()
-
fireLightweightChange
protected void fireLightweightChange()
Fires a lightweight change through treeModel.nodesChanged()
-
setVisible
public void setVisible(boolean visible)
Description copied from interface:BrowseTreeNode
Notifies this node if it is currently displayed or not.- Specified by:
setVisible
in interfaceBrowseTreeNode
-
isVisible
public boolean isVisible()
- Specified by:
isVisible
in interfaceBrowseTreeNode
-
notifyVisibilityChange
protected void notifyVisibilityChange()
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
isMetaNode
public boolean isMetaNode()
Description copied from interface:BrowseTreeNode
Returns true if this node is a meta node. (Like a loading node). Don't try to use the tag path of a Meta node- Specified by:
isMetaNode
in interfaceBrowseTreeNode
-
-