bin
Class OpenFileExtensionFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by bin.OpenFileExtensionFilter

public class OpenFileExtensionFilter
extends javax.swing.filechooser.FileFilter

"Open File" Extension Filter Class

Set-up an extension filter for files, when prompted with "Open" dialogs.

Version:
0.1 - Initial Release
Author:
Richard John Sproston [ richard.sproston@gmail.com || lucky_jackpot@hotmail.com ]

Constructor Summary
OpenFileExtensionFilter(java.lang.String ext0, java.lang.String ext1, java.lang.String ext2, java.lang.String desc)
          Default Constructor for class, with 4 parameters.
 
Method Summary
 boolean accept(java.io.File file)
          This method returns a boolean value, depending on whether the "file" is successfully accepted by the application as being of the correct data-type.
 java.lang.String getDescription()
          This method returns the String description for use in manipulating the constructor's value for this variable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenFileExtensionFilter

public OpenFileExtensionFilter(java.lang.String ext0,
                               java.lang.String ext1,
                               java.lang.String ext2,
                               java.lang.String desc)
Default Constructor for class, with 4 parameters. This is used for the "Open AI File" Dialogue. Set the valid filetypes to be made viewable when searching for files to import into AI Builder.

Parameters:
ext0 - This is used to set a String data-type as a FileFilter extension.
ext1 - This is used to set a String data-type as a FileFilter extension.
ext2 - This is used to set a String data-type as a FileFilter extension.
desc - This is used to provide a String description of the file extension.
Method Detail

accept

public boolean accept(java.io.File file)
This method returns a boolean value, depending on whether the "file" is successfully accepted by the application as being of the correct data-type.

Specified by:
accept in class javax.swing.filechooser.FileFilter
Parameters:
file - The File object to be checked for a comparison.
Returns:
The boolean value returned, depending on whether the "file" to be accepted is a directory or whether the file ends with the appropriate extension.

getDescription

public java.lang.String getDescription()
This method returns the String description for use in manipulating the constructor's value for this variable.

Specified by:
getDescription in class javax.swing.filechooser.FileFilter
Returns:
The String value/content of the variable, for manipulation in the class's constructor (2 params).