Package PamView.dialog
Class PamFileBrowser
java.lang.Object
PamView.dialog.PamFileBrowser
Some useful functions to open up a File Browser
- Author:
- JamieMacaulay
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
csvFileBrowser
(Window parentFrame, String dir, int type) Opens a file browser for .csv files.static String
fileBrowser
(Window parentFrame, String dir, int type, String extension) Opens a file browser for a file.static String
fileBrowser
(Window parentFrame, String dir, int type, String[] fileExtensions) Opens a file browser for a file.static String
fileBrowser
(Window parentFrame, String dir, int type, String[] fileExtensions, String fileDescription) Opens a file browser for a file.static String
fileBrowser
(Window parentFrame, String dir, int type, String extension, String description) Opens a file browser for a file.
-
Field Details
-
OPEN_FILE
public static final int OPEN_FILE- See Also:
-
SAVE_FILE
public static final int SAVE_FILE- See Also:
-
-
Constructor Details
-
PamFileBrowser
public PamFileBrowser()
-
-
Method Details
-
csvFileBrowser
Opens a file browser for .csv files.- Parameters:
parentFrame
- - the framedir
- - 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
Opens a file browser for a file.- Parameters:
parentFrame
- - the framedir
- - 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 framedir
- - directory the file browser begins with.type
- . Type of file browser. Generally an PAMFileBrowser.OPEN_FILE or PAMFileBrowser.SAVE.extension
- - file extension to usedescription
- File Description- Returns:
- String pathname of selected file.
-
fileBrowser
Opens a file browser for a file.- Parameters:
parentFrame
- - the framedir
- - 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 framedir
- - directory the file browser begins with.type
- . Type of file browser. Generally an PAMFileBrowser.OPEN_FILE or PAMFileBrowser.SAVE.fileExtensions
- - file extension to usefileDescription
- - file description- Returns:
- String pathname of selected file.
-