KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > gjt > sp > jedit > io > VFSFileFilter


1 /*
2  * VFSFileFilter.java - A file filter for the VFS Browser.
3  * :tabSize=4:indentSize=4:noTabs=false:
4  * :folding=explicit:collapseFolds=1:
5  *
6  * Copyright (C) 2006 Marcelo Vanzin
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21  */

22
23 package org.gjt.sp.jedit.io;
24
25 /**
26  * An interface similar to <code>java.io.FilenameFilter</code>, that
27  * is used by {@link org.gjt.sp.jedit.browser.VFSBrowser} to define what
28  * files to show in the directory view.
29  *
30  * @author Marcelo Vanzin
31  * @version $Id$
32  * @since jEdit 4.3pre7
33  */

34 public interface VFSFileFilter {
35
36     public static final String JavaDoc SERVICE_NAME = VFSFileFilter.class.getName();
37
38     /**
39      * Should return whether the entry represented by the given URL
40      * should be listed in the browser view.
41      */

42     public boolean accept(VFSFile file);
43
44     /**
45      * Same thing as {@link #accept(VFSFile)} above, but operates on
46      * the raw URL instead of a VFSFile object.
47      */

48     public boolean accept(String JavaDoc url);
49
50     /**
51      * Returns the description of the filter, to be used in the
52      * VFSBrowser window.
53      */

54     public String JavaDoc getDescription();
55
56 }
57
58
Popular Tags