Interface FileSelector

  • All Known Implementing Classes:
    FileSelectorImpl

    public interface FileSelector
    The FileSelector interface defines the interface for file selector which is used to select files.
    Version:
    1.0 06/16/2006
    Author:
    Hailong Wang, Ph.D
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      javax.swing.filechooser.FileFilter getFileFilter()
      Returns the file filter used by FileSelector.
      java.lang.String[] getSelectedFileNames()
      Returns the selected file names.
      void setFileFilter​(javax.swing.filechooser.FileFilter fileFilter)
      Sets the file filter to the FileSelector.
      void showOpenDialog​(java.awt.Component parent)
      Shows the open dialog to retrieve the user's input, the approve button will be "Open", and title will be "Open Image", only files are displayed, multi selection will be allowed.
      void showSaveAsDialog​(java.awt.Component parent)
      Shows the save as dialog to retrieve the user's input, the approve button will be "Save", and title will be "Save Image As", only file are displayed, multi selection is not allowed.
      void showSaveDialog​(java.awt.Component parent)
      Shows the open dialog to retrieve the user's input, the approve button will be "Save", and title will be "Save Image", only directory are displayed, multi selection is not allowed.
    • Method Detail

      • getSelectedFileNames

        java.lang.String[] getSelectedFileNames()
        Returns the selected file names. Notes: I want this interface to cover the SRB file selection. So I used the string array as the return type.
        Returns:
        the selected file names.
      • getFileFilter

        javax.swing.filechooser.FileFilter getFileFilter()
        Returns the file filter used by FileSelector.
        Returns:
        the file filter used by FileSelector.
      • setFileFilter

        void setFileFilter​(javax.swing.filechooser.FileFilter fileFilter)
        Sets the file filter to the FileSelector.
        Parameters:
        fileFilter - the new file filter.
      • showOpenDialog

        void showOpenDialog​(java.awt.Component parent)
        Shows the open dialog to retrieve the user's input, the approve button will be "Open", and title will be "Open Image", only files are displayed, multi selection will be allowed.
        Parameters:
        parent - the parent component
      • showSaveDialog

        void showSaveDialog​(java.awt.Component parent)
        Shows the open dialog to retrieve the user's input, the approve button will be "Save", and title will be "Save Image", only directory are displayed, multi selection is not allowed.
        Parameters:
        parent - the parent component
      • showSaveAsDialog

        void showSaveAsDialog​(java.awt.Component parent)
        Shows the save as dialog to retrieve the user's input, the approve button will be "Save", and title will be "Save Image As", only file are displayed, multi selection is not allowed.
        Parameters:
        parent - the parent component