类 GenericFileFilter


  • public class GenericFileFilter
    extends FileFilter
    作者:
    yaqiang
    • 构造器详细资料

      • GenericFileFilter

        public GenericFileFilter​(String[] filesExtsIn,
                                 String description)
        This is the constructor - it takes in the following:-
        filesExtsIn - this is the array of file extensions that you wish to create a file filter for.
        description - this is the description that will be displayed in the file chooser dialog box.
    • 方法详细资料

      • accept

        public boolean accept​(File f)
        This is the method to allow a file to bee added to the displayed list or not. This method is called by the model that handles the FileChooser dialog
        指定者:
        accept 在类中 FileFilter
      • getFileExtent

        public String getFileExtent()
        Get file extent
        返回:
        File extent
      • getExtension

        public static String getExtension​(File file)
        This is the method to get the file extension from the file name