Documentation of 'com.jstatcom.project.ProjectTreeNode' Java class
ProjectTreeNode
com.jstatcom.project

Class ProjectTreeNode

  • All Implemented Interfaces:
    SettingsElement, java.io.Serializable, java.lang.Cloneable, javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode


    public final class ProjectTreeNode
    extends javax.swing.tree.DefaultMutableTreeNode
    implements SettingsElement
    A tree node that represents a project. It is used as element for the ProjectTree.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      ProjectTreeNode(Project project, java.io.File projectFile, boolean isCurrent)
      Creates a tree node for a project.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean equals(java.lang.Object o)
      Overwritessuperclass method to make sure that two project nodes are considered equal if they reference the same project file.
      int hashCode()
      Overwritten because equals was overwritten.
      void setElement()
      Interface method from SettingsElement to restore a setting.
      java.lang.String toString()
      Gets a string representation of this node.
      • Methods inherited from class javax.swing.tree.DefaultMutableTreeNode

        add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ProjectTreeNode

        public ProjectTreeNode(Project project,
                               java.io.File projectFile,
                               boolean isCurrent)
        Creates a tree node for a project.
        Parameters:
        project - the project that this node stands for
        projectFile - the file where the project is stored
        isCurrent - whether this node is the currently loaded project
        Throws:
        java.lang.IllegalArgumentException - if (project == null || projectFile == null)
    • Method Detail

      • equals

        public final boolean equals(java.lang.Object o)
        Overwritessuperclass method to make sure that two project nodes are considered equal if they reference the same project file.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        o - object to compare
        Returns:
        true if o is a ProjectTreeNode that points to the same project file, false otherwise
      • hashCode

        public int hashCode()
        Overwritten because equals was overwritten.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        the hashcode of the project file
      • toString

        public java.lang.String toString()
        Gets a string representation of this node.
        Overrides:
        toString in class javax.swing.tree.DefaultMutableTreeNode
        Returns:
        descriptive string
      • setElement

        public void setElement()
        Interface method from SettingsElement to restore a setting. It adds this node to the project tree if the project file still exists.
        Specified by:
        setElement in interface SettingsElement

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.