Class LocalDirectoryLister

java.lang.Object
noaa.coastwatch.gui.open.AbstractDirectoryLister
noaa.coastwatch.gui.open.LocalDirectoryLister
All Implemented Interfaces:
Cloneable, DirectoryLister

public class LocalDirectoryLister extends AbstractDirectoryLister
The LocalDirectoryLister lists directory contents on the local filesystem. This class is mainly useful as a test implementation of the DirectoryLister class, as the JFileChooser provides more extensive directory listing services in a GUI format. The directory name must be an existing local path convertible into a java.io.File object.
Since:
3.2.0
Author:
Peter Hollemans
  • Constructor Details

    • LocalDirectoryLister

      public LocalDirectoryLister()
  • Method Details

    • getParent

      public String getParent(String name)
      Description copied from interface: DirectoryLister
      Gets the parent directory name for the specified directory.
      Parameters:
      name - the name of the directory to get the parent.
      Returns:
      the parent directory. If the directory has no parent, the directory itself is returned.
    • getChild

      public String getChild(String parent, String child)
      Description copied from interface: DirectoryLister
      Gets the full child directory name for the specified parent and child.
      Parameters:
      parent - the parent base directory.
      child - the child directory within the parent.
      Returns:
      the full child directory as a concatentation of parent and child.
    • buildEntryList

      protected List buildEntryList(String name) throws IOException
      Description copied from class: AbstractDirectoryLister
      Builds the list of directory entries.
      Specified by:
      buildEntryList in class AbstractDirectoryLister
      Throws:
      IOException - if an error occurred getting the entries for the new directory.
    • main

      public static void main(String[] argv) throws Exception
      Tests this class.
      Parameters:
      argv - the array of command line parameters.
      Throws:
      Exception