Class TagStructurePanel.StructureNode

  • All Implemented Interfaces:
    InfoNode, javax.swing.tree.TreeNode
    Enclosing class:
    TagStructurePanel

    public class TagStructurePanel.StructureNode
    extends java.lang.Object
    implements javax.swing.tree.TreeNode, InfoNode
    • Method Detail

      • setValid

        public void setValid​(boolean valid)
      • getComplexNodesInHierarchy

        public java.util.List<TagStructurePanel.StructureNode> getComplexNodesInHierarchy()
        Returns all of the complex tags (udt def or instance) from the root to this point. Used for getting parameter values.
      • clearChildren

        public void clearChildren()
      • getCachedConfigModel

        public TagConfigurationModel getCachedConfigModel()
        The config model is null until loaded from the gateway, which will happen when we go to edit. After that, we'll hold it and won't load again until we commit or refresh.
      • setCachedConfigModel

        public void setCachedConfigModel​(TagConfigurationModel model)
        Sets the cached model, if not already present.
      • forceSetCachedConfigModel

        public void forceSetCachedConfigModel​(TagConfigurationModel model)
        Sets the cached model even if already present.
      • loadModelDeep

        public void loadModelDeep()
      • markModified

        public void markModified()
      • isModified

        public boolean isModified()
      • isNew

        public boolean isNew()
        For rendering, use isModified to track changes to this object
      • markNew

        public void markNew()
        Happens when we copy overrides- the node was loaded, but didn't know that we were going to make a "new" inherited prop set.
      • isInherited

        public boolean isInherited()
      • isDeleted

        public boolean isDeleted()
        For rendering, use isModified to track changes to this object
      • delete

        public void delete()
      • delete

        public void delete​(boolean isMove)
      • getCurrentParentPath

        protected TagPath getCurrentParentPath()
      • getCurrentPath

        protected TagPath getCurrentPath()
      • getEditPath

        protected TagPath getEditPath()
      • getEdit

        public TagConfiguration getEdit()
        Returns the edit that can be sent to the gateway. The only real trick to this is that we have to be careful of renamed parent nodes. Edits will be applied IN ORDER from shallow to deep along a tree, which means that if a parent is renamed, that will be applied first- then a child edit, even a delete, needs to have a path that matches to the _new path_ of the _original node_.

        In other words, when building the path for the edit, we want the _updated_ parent path with the _original_ name of this node. A rename to this node will be reflected in the new name property on the config.

      • getName

        public java.lang.String getName()
      • getChildAt

        public javax.swing.tree.TreeNode getChildAt​(int childIndex)
        Specified by:
        getChildAt in interface javax.swing.tree.TreeNode
      • getChildCount

        public int getChildCount()
        Specified by:
        getChildCount in interface javax.swing.tree.TreeNode
      • getParent

        public javax.swing.tree.TreeNode getParent()
        Specified by:
        getParent in interface javax.swing.tree.TreeNode
      • getIndex

        public int getIndex​(javax.swing.tree.TreeNode node)
        Specified by:
        getIndex in interface javax.swing.tree.TreeNode
      • getChild

        public TagStructurePanel.StructureNode getChild​(java.lang.String name)
        Returns the child for the given name. If multiple have the same name (due to deletion), we return the non deleted one.
      • getAllowsChildren

        public boolean getAllowsChildren()
        Specified by:
        getAllowsChildren in interface javax.swing.tree.TreeNode
      • isLeaf

        public boolean isLeaf()
        Specified by:
        isLeaf in interface javax.swing.tree.TreeNode
      • children

        public java.util.Enumeration children()
        Specified by:
        children in interface javax.swing.tree.TreeNode
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object