de.esprit.appsuite.gui.pathtree

## Class PathTreeNode

- java.lang.Object
- - de.esprit.common.util.DumpableObject
  - - de.esprit.appsuite.gui.pathtree.PathTreeNode

- All Implemented Interfaces:
    Renderable, Dumpable, java.lang.Comparable<PathTreeNode>, javax.swing.tree.MutableTreeNode, javax.swing.tree.TreeNode

      public class PathTreeNode
      extends DumpableObject
      implements javax.swing.tree.MutableTreeNode, Renderable, java.lang.Comparable<PathTreeNode>

  This `MutableTreeNode` implementation is used to represent `Path`s in the `PathTreeModel`.
  Author:
    Rainer Buesch

- - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `` | `PathTreeNode(PathInfo rootPathInfo, java.util.Comparator<PathTreeNode> masterComparator)` Constructor for root node
    `protected` | `PathTreeNode(PathTreeNode parent, PathInfo pathInfo, java.util.Comparator<PathTreeNode> childComparator)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Enumeration<PathTreeNode>` | `children()`
    `int` | `compareTo(PathTreeNode o)`
    `boolean` | `equals(java.lang.Object obj)`
    `boolean` | `getAllowsChildren()`
    `PathTreeNode` | `getChildAt(int childIndex)`
    `int` | `getChildCount()`
    `protected PathTreeNodeList` | `getChildList()`
    `static java.util.Comparator<PathTreeNode>` | `getComparatorFrom(PathTreeNode parent)`
    `java.io.File` | `getFile()`
    `int` | `getIndex(javax.swing.tree.TreeNode node)`
    `PathTreeNode` | `getParent()`
    `java.nio.file.Path` | `getPath()`
    `PathInfo` | `getPathInfo()`
    `java.nio.file.Path` | `getRelativePathUnderRoot()`
    `java.awt.Color` | `getRenderColor()`
    `javax.swing.Icon` | `getRenderIcon()`
    `java.lang.String` | `getRenderText()`
    `PathTreeNode` | `getRoot()`
    `void` | `insert(javax.swing.tree.MutableTreeNode child, int index)`
    `boolean` | `isDirectory()`
    `boolean` | `isLeaf()`
    `boolean` | `isLoaded()` Tells whether the child-list yet has been loaded.
    `boolean` | `isRoot()`
    `void` | `remove(int index)`
    `void` | `remove(javax.swing.tree.MutableTreeNode node)`
    `void` | `removeFromParent()`
    `void` | `setLoaded(boolean isLoaded)` If set to false then a reload of the child list is enforced on the next repaint of the tree.
    `void` | `setParent(javax.swing.tree.MutableTreeNode newParent)`
    `void` | `setPathInfo(PathInfo newPathInfo)`
    `void` | `setUserObject(java.lang.Object object)`
    `boolean` | `startsWith(PathInfo wantedPathInfo)`
    `DumpString` | `toDumpString(DumpString s)` This method allows subclasses to add values to the existing DumpString of the superclass.
    `ToString` | `toString(ToString s)` This method allows subclasses to add values to the existing ToString of the superclass.

    - ### Methods inherited from class de.esprit.common.util.DumpableObject

      `configureDumpHeadlineLength, configureDumpMaxElementsPrinted, copyDumpStringValues, copyToStringValues, createDumpHeader, toDumpString, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### PathTreeNode

          public PathTreeNode(PathInfo rootPathInfo,
                      java.util.Comparator<PathTreeNode> masterComparator)

      Constructor for root node

    - #### PathTreeNode

          protected PathTreeNode(PathTreeNode parent,
                      PathInfo pathInfo,
                      java.util.Comparator<PathTreeNode> childComparator)

  - ### Method Detail

    - #### setPathInfo

          public void setPathInfo(PathInfo newPathInfo)

    - #### getChildList

          protected final PathTreeNodeList getChildList()

    - #### isLoaded

          public final boolean isLoaded()

      Tells whether the child-list yet has been loaded.

    - #### setLoaded

          public final void setLoaded(boolean isLoaded)

      If set to false then a reload of the child list is enforced on the next repaint of the tree.

    - #### startsWith

          public final boolean startsWith(PathInfo wantedPathInfo)

    - #### getPathInfo

          public final PathInfo getPathInfo()

    - #### getFile

          public final java.io.File getFile()

    - #### getPath

          public final java.nio.file.Path getPath()

    - #### getRelativePathUnderRoot

          public final java.nio.file.Path getRelativePathUnderRoot()

    - #### getChildAt

          public final PathTreeNode getChildAt(int childIndex)

      Specified by:
        `getChildAt` in interface `javax.swing.tree.TreeNode`

    - #### getChildCount

          public final int getChildCount()

      Specified by:
        `getChildCount` in interface `javax.swing.tree.TreeNode`

    - #### getParent

          public PathTreeNode getParent()

      Specified by:
        `getParent` in interface `javax.swing.tree.TreeNode`

    - #### getRoot

          public final PathTreeNode getRoot()

    - #### isRoot

          public final boolean isRoot()

    - #### getIndex

          public final int getIndex(javax.swing.tree.TreeNode node)

      Specified by:
        `getIndex` in interface `javax.swing.tree.TreeNode`

    - #### getAllowsChildren

          public final boolean getAllowsChildren()

      Specified by:
        `getAllowsChildren` in interface `javax.swing.tree.TreeNode`

    - #### isLeaf

          public final boolean isLeaf()

      Specified by:
        `isLeaf` in interface `javax.swing.tree.TreeNode`

    - #### isDirectory

          public final boolean isDirectory()

    - #### children

          public final java.util.Enumeration<PathTreeNode> children()

      Specified by:
        `children` in interface `javax.swing.tree.TreeNode`

    - #### getRenderIcon

          public javax.swing.Icon getRenderIcon()

      Specified by:
        `getRenderIcon` in interface `Renderable`

    - #### getRenderText

          public java.lang.String getRenderText()

      Specified by:
        `getRenderText` in interface `Renderable`

    - #### getRenderColor

          public java.awt.Color getRenderColor()

      Specified by:
        `getRenderColor` in interface `Renderable`

    - #### insert

          public final void insert(javax.swing.tree.MutableTreeNode child,
                    int index)

      Specified by:
        `insert` in interface `javax.swing.tree.MutableTreeNode`

    - #### remove

          public final void remove(int index)

      Specified by:
        `remove` in interface `javax.swing.tree.MutableTreeNode`

    - #### remove

          public final void remove(javax.swing.tree.MutableTreeNode node)

      Specified by:
        `remove` in interface `javax.swing.tree.MutableTreeNode`

    - #### setUserObject

          public final void setUserObject(java.lang.Object object)

      Specified by:
        `setUserObject` in interface `javax.swing.tree.MutableTreeNode`

    - #### removeFromParent

          public final void removeFromParent()

      Specified by:
        `removeFromParent` in interface `javax.swing.tree.MutableTreeNode`

    - #### setParent

          public final void setParent(javax.swing.tree.MutableTreeNode newParent)

      Specified by:
        `setParent` in interface `javax.swing.tree.MutableTreeNode`

    - #### compareTo

          public final int compareTo(PathTreeNode o)

      Specified by:
        `compareTo` in interface `java.lang.Comparable<PathTreeNode>`

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### toString

          public ToString toString(ToString s)

      Description copied from interface: `Dumpable`
      This method allows subclasses to add values to the existing ToString of the superclass. Usually subclasses only need to override this method.
      Specified by:
        `toString` in interface `Dumpable`
      Overrides:
        `toString` in class `DumpableObject`

    - #### toDumpString

          public DumpString toDumpString(DumpString s)

      Description copied from interface: `Dumpable`
      This method allows subclasses to add values to the existing DumpString of the superclass. Usually subclasses only need to override this method.
      Specified by:
        `toDumpString` in interface `Dumpable`
      Overrides:
        `toDumpString` in class `DumpableObject`

    - #### getComparatorFrom

          public static java.util.Comparator<PathTreeNode> getComparatorFrom(PathTreeNode parent)

Copyright © 2014 EsprIT-Systems. All Rights Reserved.