Class SwingFileChooser

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private javax.swing.JFileChooser jFileChooser
      The JFileChooser which we use for this.
    • Constructor Summary

      Constructors 
      Constructor Description
      SwingFileChooser​(java.io.File file)
      Constructs a new SwingFileChooser.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addChoosableFileFilter​(javax.swing.filechooser.FileFilter filter)
      Adds a filter to the list of user choosable file filters.
      javax.swing.ActionMap getActionMap()
      Gets the list of action names.
      javax.swing.filechooser.FileFilter[] getChoosableFileFilters()
      Gets the list of user choosable file filters.
      java.io.File getCurrentDirectory()
      Returns the current directory.
      javax.swing.filechooser.FileFilter getFileFilter()
      Returns the currently selected file filter.
      java.io.File getSelectedFile()
      Returns the selected file.
      java.io.File[] getSelectedFiles()
      Returns a list of selected files if the file chooser is set to allow multiple selection.
      boolean isMultiSelectionEnabled()
      Returns true if multiple files can be selected.
      void setAcceptAllFileFilterUsed​(boolean b)
      Determines whether the AcceptAll FileFilter is used as an available choice in the choosable filter list.
      void setCurrentDirectory​(java.io.File f)
      Sets the current directory.
      void setDialogTitle​(java.lang.String title)
      Sets the string that goes in the JFileChooser window's title bar.
      void setFileFilter​(javax.swing.filechooser.FileFilter cff)
      Sets the current file filter.
      void setFileSelectionMode​(int selectionMode)
      Sets the JFileChooser to allow the user to just select files, just select directories, or select both files and directories.
      void setMultiSelectionEnabled​(boolean multiple)
      Sets the file chooser to allow multiple file selections.
      void setSelectedFile​(java.io.File file)
      Sets the selected file.
      int showOpenDialog​(java.awt.Component parent)
      Pops up an "Open File" file chooser dialog.
      int showSaveDialog​(java.awt.Component parent)
      Pops up a "Save File" file chooser dialog.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait