Package jexer

Class TDirectoryList

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

    public class TDirectoryList
    extends TList
    TDirectoryList shows the files within a directory.
    • Constructor Detail

      • TDirectoryList

        public TDirectoryList​(TWidget parent,
                              java.lang.String path,
                              int x,
                              int y,
                              int width,
                              int height)
        Public constructor.
        Parameters:
        parent - parent widget
        path - directory path, must be a directory
        x - column relative to parent
        y - row relative to parent
        width - width of text area
        height - height of text area
      • TDirectoryList

        public TDirectoryList​(TWidget parent,
                              java.lang.String path,
                              int x,
                              int y,
                              int width,
                              int height,
                              TAction action)
        Public constructor.
        Parameters:
        parent - parent widget
        path - directory path, must be a directory
        x - column relative to parent
        y - row relative to parent
        width - width of text area
        height - height of text area
        action - action to perform when an item is selected (enter or double-click)
      • TDirectoryList

        public TDirectoryList​(TWidget parent,
                              java.lang.String path,
                              int x,
                              int y,
                              int width,
                              int height,
                              TAction action,
                              TAction singleClickAction)
        Public constructor.
        Parameters:
        parent - parent widget
        path - directory path, must be a directory
        x - column relative to parent
        y - row relative to parent
        width - width of text area
        height - height of text area
        action - action to perform when an item is selected (enter or double-click)
        singleClickAction - action to perform when an item is selected (single-click)
      • TDirectoryList

        public TDirectoryList​(TWidget parent,
                              java.lang.String path,
                              int x,
                              int y,
                              int width,
                              int height,
                              TAction action,
                              TAction singleClickAction,
                              java.util.List<java.lang.String> filters)
        Public constructor.
        Parameters:
        parent - parent widget
        path - directory path, must be a directory
        x - column relative to parent
        y - row relative to parent
        width - width of text area
        height - height of text area
        action - action to perform when an item is selected (enter or double-click)
        singleClickAction - action to perform when an item is selected (single-click)
        filters - a list of strings that files must match to be displayed
    • Method Detail

      • setPath

        public void setPath​(java.lang.String path)
        Set the new path to display.
        Parameters:
        path - new path to list files for
      • getPath

        public java.io.File getPath()
        Get the path that is being displayed.
        Returns:
        the path