public class WinFileFilter extends FileFilter
Constructor and Description |
---|
WinFileFilter()
Creates a file filter.
|
WinFileFilter(String extension)
Creates a file filter that accepts files with the given extension.
|
WinFileFilter(String[] filters)
Creates a file filter from the given string array.
|
WinFileFilter(String[] filters,
String description)
Creates a file filter from the given string array and description.
|
WinFileFilter(String extension,
String description)
Creates a file filter that accepts the given file type.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(File f)
Return true if this file should be shown in the directory pane, false if it
shouldn't.
|
void |
addExtension(String extension)
Adds a filetype "dot" extension to filter against.
|
String |
getDescription()
Returns the human readable description of this filter.
|
String |
getExtension(File f)
Return the extension portion of the file's name .
|
boolean |
isExtensionListInDescription()
Returns whether the extension list (.jpg, .gif, etc) should show up in the
human readable description.
|
void |
setDescription(String description)
Sets the human readable description of this filter.
|
void |
setExtensionListInDescription(boolean b)
Determines whether the extension list (.jpg, .gif, etc) should show up in
the human readable description.
|
public WinFileFilter()
addExtension(java.lang.String)
public WinFileFilter(String extension)
addExtension(java.lang.String)
public WinFileFilter(String extension, String description)
addExtension(java.lang.String)
public WinFileFilter(String[] filters)
addExtension(java.lang.String)
public WinFileFilter(String[] filters, String description)
addExtension(java.lang.String)
public boolean accept(File f)
accept
in class FileFilter
getExtension(java.io.File)
,
FileFilter.accept(java.io.File)
public void addExtension(String extension)
public String getDescription()
getDescription
in class FileFilter
setDescription
,
setExtensionListInDescription
,
isExtensionListInDescription
,
FileFilter.getDescription()
public void setDescription(String description)
setDescription
,
setExtensionListInDescription
,
isExtensionListInDescription
public void setExtensionListInDescription(boolean b)
getDescription
,
setDescription
,
isExtensionListInDescription
public boolean isExtensionListInDescription()
getDescription
,
setDescription
,
setExtensionListInDescription
Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© © Mindus SARL, 2024. All rights reserved.