Package jexer.ttree

Class TDirectoryTreeItem

  • All Implemented Interfaces:
    java.lang.Comparable<TWidget>

    public class TDirectoryTreeItem
    extends TTreeItem
    TDirectoryTreeItem is a single item in a disk directory tree view.
    • Constructor Detail

      • TDirectoryTreeItem

        public TDirectoryTreeItem​(TTreeViewWidget view,
                                  java.lang.String text,
                                  boolean expanded)
                           throws java.io.IOException
        Public constructor.
        Parameters:
        view - root TTreeViewWidget
        text - text for this item
        expanded - if true, have it expanded immediately
        Throws:
        java.io.IOException - if a java.io operation throws
      • TDirectoryTreeItem

        public TDirectoryTreeItem​(TTreeViewWidget view,
                                  java.lang.String text,
                                  boolean expanded,
                                  boolean openParents)
                           throws java.io.IOException
        Public constructor.
        Parameters:
        view - root TTreeViewWidget
        text - text for this item
        expanded - if true, have it expanded immediately
        openParents - if true, expand all paths up the root path and return the root path entry
        Throws:
        java.io.IOException - if a java.io operation throws
    • Method Detail

      • getFile

        public final java.io.File getFile()
        Get the File corresponding to this list item.
        Returns:
        the File
      • onExpand

        public final void onExpand()
        Called when this item is expanded or collapsed. this.expanded will be true if this item was just expanded from a mouse click or keypress.
        Overrides:
        onExpand in class TTreeItem