Class SelectedFileChooser

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class SelectedFileChooser extends JFileChooser
Custom file chooser for selecting files rather than opening them or saving them.
See Also:
  • Field Details

  • Constructor Details

    • SelectedFileChooser

      public SelectedFileChooser(boolean allowNewFile)
      Constructor.
      Parameters:
      allowNewFile - true if a file name can be typed into this component's text field; false otherwise
    • SelectedFileChooser

      public SelectedFileChooser(File currentDirectory, boolean allowNewFile)
      Constructor specifying a current directory.
      Parameters:
      currentDirectory - the current directory for this component
      allowNewFile - true if a file name can be typed into this component's text field; false otherwise
    • SelectedFileChooser

      public SelectedFileChooser(File currentDirectory, FileSystemView fsv, boolean allowNewFile)
      Constructor specifying a current directory and file system view.
      Parameters:
      currentDirectory - the current directory for this component
      fsv - the file system view
      allowNewFile - true if a file name can be typed into this component's text field; false otherwise
    • SelectedFileChooser

      public SelectedFileChooser(String currentDirectoryPath, boolean allowNewFile)
      Constructor specifying a current directory and file system view.
      Parameters:
      currentDirectoryPath - the current directory for this component
      allowNewFile - true if a file name can be typed into this component's text field; false otherwise
    • SelectedFileChooser

      public SelectedFileChooser(FileSystemView fsv, boolean allowNewFile)
      Constructor specifying a file system view.
      Parameters:
      fsv - the file system view
      allowNewFile - true if a file name can be typed into this component's text field; false otherwise
  • Method Details

    • getAllowNewFile

      public boolean getAllowNewFile()
    • showSelectDialog

      public int showSelectDialog(Component parent, String approveButtonText, String resetButtonText)
    • showSelectDialog

      public int showSelectDialog(Component parent)