net.java.sip.communicator.util.swing
Class SipCommFileFilter
java.lang.Object
javax.swing.filechooser.FileFilter
net.java.sip.communicator.util.swing.SipCommFileFilter
- All Implemented Interfaces:
- FilenameFilter
- Direct Known Subclasses:
- ImagePickerDialog.ImageFileFilter, SoundFilter, WhiteboardFileFilter
public abstract class SipCommFileFilter
- extends FileFilter
- implements FilenameFilter
The purpose of this interface is to provide an generic file filter type for
the SipCommFileChooser, which is used either as an AWT FileDialog, either as
a Swing JFileChooser.
Both of these dialogs use their own filter type, FileFilter (class) for
JFileChooser and FilenameFilter (interface) for FileDialog.
SipCommFileFilter acts as both an implementation and an heritage from these
two filters. To use a your own file filter with a SipCommFileChooser, you
just have to extend from SipCommFileFilter and redefine at least the method
'public boolean accept(File f)' which is described in the Java FileFilter
class.
You won't have to redefine 'public boolean accept(File dir, String name)'
from the Java FilenameFilter interface since it's done here: the method is
transfered toward the accept method of Java FileFilter class.
- Author:
- Valentin Martinet
|
Method Summary |
boolean |
accept(File dir,
String name)
Avoid to be obliged to implement
'public boolean accept(File dir, String name)'
in your own file filter. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SipCommFileFilter
public SipCommFileFilter()
accept
public boolean accept(File dir,
String name)
- Avoid to be obliged to implement
'public boolean accept(File dir, String name)'
in your own file filter.
- Specified by:
accept in interface FilenameFilter
- Parameters:
dir - file's parent directoryname - file's name
- Returns:
- boolean if the file is accepted or not
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.