Class Node

    • Field Detail

      • m_Owner

        protected Tree m_Owner
        the tree this node belongs to.
      • m_Property

        protected String m_Property
        the name of the property.
      • m_NodeType

        protected NodeType m_NodeType
        the node type.
      • m_Initialized

        protected boolean m_Initialized
        whether the node has been initialized.
    • Constructor Detail

      • Node

        public Node​(Tree owner,
                    Node parent,
                    String property,
                    Object obj)
        Initializes the node.
        Parameters:
        owner - the tree this node belongs to
        parent - the parent of this node, null for root
        property - the name of the property the object belongs to
        obj - the obj to display
      • Node

        public Node​(Tree owner,
                    Node parent,
                    String property,
                    Object obj,
                    NodeType type)
        Initializes the node.
        Parameters:
        owner - the tree this node belongs to
        parent - the parent of this node, null for root
        property - the name of the property the object belongs to
        obj - the obj to display
        type - the type of node
    • Method Detail

      • getOwner

        public Tree getOwner()
        Returns the tree this node belongs to.
        Returns:
        the tree
      • addArray

        protected void addArray​(Object obj)
        Adds the array below the parent.
        Parameters:
        obj - the array to add
      • doExpand

        protected void doExpand()
        Adds the properties of this object as children.
      • expand

        public void expand()
        Expands the node (forced).
      • expandIfNecessary

        public void expandIfNecessary()
        Expands the node if necessary.
      • getProperty

        public String getProperty()
        Returns the property.
        Returns:
        the property
      • getNodeType

        public NodeType getNodeType()
        Returns the node type.
        Returns:
        the node type
      • isArray

        public boolean isArray()
        Returns whether the stored object is an array.
        Returns:
        true if the stored object is an array
      • toRepresentation

        public String toRepresentation()
        Returns a string representation of the stored object.
        Returns:
        the string representation
      • toPlainText

        public String toPlainText()
        Returns the property name of the user object.
        Overrides:
        toPlainText in class BaseTreeNode
        Returns:
        the property name
      • getPropertyPath

        public String[] getPropertyPath()
        Returns the property path from the root to this node.
        Returns:
        the individual property names