Class PamFileBrowser

java.lang.Object
PamView.dialog.PamFileBrowser

public class PamFileBrowser extends Object
Some useful functions to open up a File Browser
Author:
JamieMacaulay
  • Field Details

  • Constructor Details

    • PamFileBrowser

      public PamFileBrowser()
  • Method Details

    • csvFileBrowser

      public static String csvFileBrowser(Window parentFrame, String dir, int type)
      Opens a file browser for .csv files.
      Parameters:
      parentFrame - - the frame
      dir - - directory the file browser begins with.
      type - . Type of file browser. Generally an PAMFileBrowser.OPEN_FILE or PAMFileBrowser.SAVE.
      Returns:
      String pathname of selected file.
    • fileBrowser

      public static String fileBrowser(Window parentFrame, String dir, int type, String extension)
      Opens a file browser for a file.
      Parameters:
      parentFrame - - the frame
      dir - - directory the file browser begins with.
      type - . Type of file browser. Generally an PAMFileBrowser.OPEN_FILE or PAMFileBrowser.SAVE.
      extension - - file extension to use
      Returns:
      String pathname of selected file.
    • fileBrowser

      public static String fileBrowser(Window parentFrame, String dir, int type, String extension, String description)
      Opens a file browser for a file.
      Parameters:
      parentFrame - - the frame
      dir - - directory the file browser begins with.
      type - . Type of file browser. Generally an PAMFileBrowser.OPEN_FILE or PAMFileBrowser.SAVE.
      extension - - file extension to use
      description - File Description
      Returns:
      String pathname of selected file.
    • fileBrowser

      public static String fileBrowser(Window parentFrame, String dir, int type, String[] fileExtensions)
      Opens a file browser for a file.
      Parameters:
      parentFrame - - the frame
      dir - - directory the file browser begins with.
      type - . Type of file browser. Generally an PAMFileBrowser.OPEN_FILE or PAMFileBrowser.SAVE.
      extensions - - file extensions to use
      Returns:
      String pathname of selected file.
    • fileBrowser

      public static String fileBrowser(Window parentFrame, String dir, int type, String[] fileExtensions, String fileDescription)
      Opens a file browser for a file.
      Parameters:
      parentFrame - - the frame
      dir - - directory the file browser begins with.
      type - . Type of file browser. Generally an PAMFileBrowser.OPEN_FILE or PAMFileBrowser.SAVE.
      fileExtensions - - file extension to use
      fileDescription - - file description
      Returns:
      String pathname of selected file.