public class IlvFileFilter extends FileFilter
Modifier and Type | Field and Description |
---|---|
static int |
READ
Access mode constant value that specifies that this filter can be
used in a file chooser for opening a new file.
|
static int |
WRITE
Access mode constant value that specifies that this filter can be
used in a file chooser for saving a file.
|
Constructor and Description |
---|
IlvFileFilter(IlvFileDocumentTemplate docTemplate,
String extension,
String description)
Constructs an
IlvFileFilter
that filters files with the specified extension . |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(File f)
Determines whether the specified file is accepted by this filter.
|
boolean |
accept(String filename)
Determines whether the specified filename is accepted by this filter.
|
int |
getAccessMode()
Returns the access mode of this filter.
|
String |
getDescription()
Returns the description of this file filter.
|
String |
getExtension()
Returns the file extension that this filters accepts.
|
void |
setAccessMode(int accessMode)
Sets the access mode of this filter.
|
public static final int READ
public static final int WRITE
public IlvFileFilter(IlvFileDocumentTemplate docTemplate, String extension, String description)
IlvFileFilter
that filters files with the specified extension
.docTemplate
- The file document template that this filter is used for.extension
- The extension of files filtered by this object.description
- The description of the files filtered by this object.
This description appears in file choosers initialized with this
file filter.public boolean accept(File f)
accept(String)
method with
name of the specified file as the parameter.accept
in class FileFilter
true
if the file is accepted; false
otherwise.accept(String)
public boolean accept(String filename)
true
if the filename is accepted; false
otherwise.accept(File)
public String getDescription()
getDescription
in class FileFilter
public String getExtension()
public int getAccessMode()
setAccessMode(int)
public void setAccessMode(int accessMode)
accessMode
- A combination of the following values:getAccessMode()
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.