java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JScrollPane
com.jackmeng.halcyoninae.cosmos.components.bottompane.filelist.FileList
All Implemented Interfaces:
TabTree, ImageObserver, MenuContainer, Serializable, Accessible, ScrollPaneConstants
Direct Known Subclasses:
LikeList

public class FileList extends JScrollPane implements TabTree
Represents a Pane containing a list of files for only one directory. It will not contain any sub-directories.

This file list can contain any file type, but it will be decided beforehand.

This mechanism suggested by FEATURES#8 and deprecated the original tabs mechanism of 3.0.

Since:
3.1
Author:
Jack Meng
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • getTree

      public JTree getTree()
      Returns:
      The JTree representing this viewport.
    • getFolderInfo

      public PhysicalFolder getFolderInfo()
      Returns:
      A FolderInfo object representing this FileList
    • getRoot

      public DefaultMutableTreeNode getRoot()
      Returns:
      A Node that represents the root node.
    • getFileMap

      public Map<File,DefaultMutableTreeNode> getFileMap()
      Returns:
      Returns the default file map with each File object having a node.
    • revalidateFiles

      public void revalidateFiles()
      This function facilitates reloading the current folder:

      1. If a file doesn't exist anymore, it will be removed 2. If a new file has been added, it will be added into the Tree

      The detection on if a folder exists or not is up to the parent BottomPane BottomPane.

    • remove

      public void remove(String nodeName)
      Description copied from interface: TabTree
      Calls the remove function on the JTree instance.
      Specified by:
      remove in interface TabTree
      Parameters:
      nodeName -
    • getSelectedNode

      public String getSelectedNode(DefaultMutableTreeNode node)
      Description copied from interface: TabTree
      Gets a String representation of a selected node.
      Specified by:
      getSelectedNode in interface TabTree
      Parameters:
      node -
      Returns:
      String
    • getPath

      public String getPath()
      Specified by:
      getPath in interface TabTree
      Returns:
      String
    • isVirtual

      public boolean isVirtual()
      Description copied from interface: TabTree
      Determines if the tree holds a virtual folder.
      Specified by:
      isVirtual in interface TabTree
      Returns:
      boolean
    • sort

      public void sort(TabTree.TabTreeSortMethod e)
      Description copied from interface: TabTree
      Sorts the Tree by some method of mostly (A-Z) alphabetical.
      Specified by:
      sort in interface TabTree
      Parameters:
      e -
    • getFileList

      public FileList getFileList()
      Description copied from interface: TabTree
      Gets the absolue parent FileList object
      Specified by:
      getFileList in interface TabTree
      Returns:
      FileList