Class TreeNode

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    TreeFolder

    @Entity
    public class TreeNode
    extends PersistentObject
    A class representing a node in a tree. This class can be used for leaf nodes.

    For folders, TreeFolder should be used.

    Author:
    Nils Bühner, Kai Volland, terrestris GmbH & Co. KG
    See Also:
    Serialized Form
    • Constructor Detail

      • TreeNode

        public TreeNode()
        Explicitly adding the default constructor as this is important, e.g. for Hibernate: http://goo.gl/3Cr1pw
      • TreeNode

        public TreeNode​(java.lang.String text)
    • Method Detail

      • getText

        public java.lang.String getText()
        Returns:
        the text
      • setText

        public void setText​(java.lang.String text)
        Parameters:
        text - the text to set
      • getParentFolder

        public TreeFolder getParentFolder()
        Returns:
        the parentFolder
      • setParentFolder

        public void setParentFolder​(TreeFolder parentFolder)
        Parameters:
        parentFolder - the parentFolder to set
      • getIndex

        public int getIndex()
        Returns:
        the index
      • setIndex

        public void setIndex​(int index)
        Parameters:
        index - the index to set
      • isRoot

        public boolean isRoot()
        Returns:
        the root
      • setRoot

        public void setRoot​(boolean root)
        Parameters:
        root - the root to set
      • isLeaf

        public boolean isLeaf()
        Returns:
        the leaf
      • setLeaf

        public void setLeaf​(boolean leaf)
        Parameters:
        leaf - the leaf to set
      • isChecked

        public java.lang.Boolean isChecked()
        Returns:
        the checked
      • setChecked

        public void setChecked​(java.lang.Boolean checked)
        Parameters:
        checked - the checked to set
      • isExpandable

        public boolean isExpandable()
        Returns:
        the expandable
      • setExpandable

        public void setExpandable​(boolean expandable)
        Parameters:
        expandable - the expandable to set
      • isExpanded

        public boolean isExpanded()
        Returns:
        the expanded
      • setExpanded

        public void setExpanded​(boolean expanded)
        Parameters:
        expanded - the expanded to set
      • getIcon

        public java.lang.String getIcon()
        Returns:
        the icon
      • setIcon

        public void setIcon​(java.lang.String icon)
        Parameters:
        icon - the icon to set
      • getIconCls

        public java.lang.String getIconCls()
        Returns:
        the iconCls
      • setIconCls

        public void setIconCls​(java.lang.String iconCls)
        Parameters:
        iconCls - the iconCls to set
      • getqTip

        public java.lang.String getqTip()
        Returns:
        the qTip
      • setqTip

        public void setqTip​(java.lang.String qTip)
        Parameters:
        qTip - the qTip to set
      • getqTitle

        public java.lang.String getqTitle()
        Returns:
        the qTitle
      • setqTitle

        public void setqTitle​(java.lang.String qTitle)
        Parameters:
        qTitle - the qTitle to set
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class PersistentObject
        See Also:
        According to http://stackoverflow.com/questions/27581/overriding-equals -and-hashcode-in-java it is recommended only to use getter-methods when using ORM like Hibernate
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class PersistentObject
        See Also:
        According to http://stackoverflow.com/questions/27581/overriding-equals -and-hashcode-in-java it is recommended only to use getter-methods when using ORM like Hibernate