|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.filechooser.FileFilter
org.josql.filters.JoSQLSwingFileFilter
public class JoSQLSwingFileFilter
A FileFilter that uses a JoSQL statement to provide the filtering.
The value returned by the accept(File) method is determined by executing the
WHERE clause of a JoSQL statement on each File passed in. This just uses an instance of:
JoSQLFileFilter to do it's job, see that class for details of usage.
| Constructor Summary | |
|---|---|
JoSQLSwingFileFilter(Query q)
Init this file filter with the query already built and parsed. |
|
JoSQLSwingFileFilter(String q)
Init this file filter with the query. |
|
| Method Summary | |
|---|---|
boolean |
accept(File f)
Apply the WHERE clause of the statement to the File passed in. |
String |
getDescription()
Return the description for the filter. |
JoSQLFileFilter |
getJoSQLFileFilter()
Get the file filter being used "under the hoodie" in the accept(File) method. |
void |
setDescription(String d)
Set the description that should be used. |
void |
setJoSQLFileFilter(JoSQLFileFilter ff)
Set the JoSQLFileFilter that should be used to handle the accept(File) method. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JoSQLSwingFileFilter(String q)
throws QueryParseException
q - The query.
QueryParseException - If there is an issue with the parsing of the query,
or if the FROM class is not File.
public JoSQLSwingFileFilter(Query q)
throws IllegalStateException,
QueryParseException
q - The query.
IllegalStateException - If the Query object has not been parsed.
QueryParseException - If the FROM class is not File.| Method Detail |
|---|
public void setJoSQLFileFilter(JoSQLFileFilter ff)
accept(File) method.
ff - The file filter.public void setDescription(String d)
d - The description.public String getDescription()
getDescription in class FileFilterpublic JoSQLFileFilter getJoSQLFileFilter()
accept(File) method.
You should also check that file filter to see if an exception has occurred.
public boolean accept(File f)
File passed in.
This is just a wrapper call to: JoSQLFileFilter.accept(File).
accept in class FileFilterf - The file to evaluate the WHERE on.
true if the WHERE clause evaluates to true.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||