|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.filechooser.FileFilter
devisor2.grid.GUI.dialogs.FilePickerFilter
This class represents the non-customizable file filter for the
application. It provides (via several constructors) all the file filters
needed.
To add a new extension type, do the following:
(1) add a new FILTER_??? constant
(2) add a corresponding case block to the constructor
(3) add a corresponding case block to the getExtensions method
(4) add a corresponding case block to the getSelectedFile method in the FilePicker class
MainActionListener, OptionsActionListener for usage example
Field Summary | |
static int |
FILTER_ALL
Use this filter to accept all files |
static int |
FILTER_BIN
Use this filter to accept binaries |
static int |
FILTER_DEFAULT
Use this filter to accept all supported file types |
static int |
FILTER_DIRECTORIES
Use this filter to accept only directories |
static int |
FILTER_FEAST
Use this filter to accept only files with extension ".feast" |
static int |
FILTER_FEAT
Use this filter to accept only files with extension ".tri" or ".prm" |
static int |
FILTER_PS
Use this filter to accept PostScript files |
static int |
FILTER_UCD
Use this filter to accept only files with extension ".inp" |
Constructor Summary | |
FilePickerFilter()
creates a file filter which accepts *.* |
|
FilePickerFilter(int filterType)
Creates a file filter that accepts only the given file types |
Method Summary | |
boolean |
accept(java.io.File f)
Determines whether the given file should be diaplayed in the FilePicker's file list |
java.lang.String |
getDescription()
Returns a textual description for the current filter. |
java.lang.String[] |
getExtensions()
returns an array of accepted extensions |
int |
getFilterType()
returns the filter type of this instance |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int FILTER_UCD
public static final int FILTER_FEAT
public static final int FILTER_FEAST
public static final int FILTER_ALL
public static final int FILTER_DIRECTORIES
public static final int FILTER_DEFAULT
public static final int FILTER_BIN
public static final int FILTER_PS
Constructor Detail |
public FilePickerFilter()
public FilePickerFilter(int filterType)
filterType
- - one of the FILTER_??? constants declared in this classMethod Detail |
public int getFilterType()
public boolean accept(java.io.File f)
f
- - a file
FileFilter#accepts
public java.lang.String getDescription()
public java.lang.String[] getExtensions()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |