|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--amber.type.server.FileFilter
| Field Summary | |
protected java.io.File |
baseDirectory
This holds the base directory below which the object will fail the accept. |
protected java.util.Vector |
filters
This holds the various filters to implement. |
protected int |
selectedFilter
The filter which is currently in effect. |
| Constructor Summary | |
FileFilter()
Default Constructor. |
|
FileFilter(java.util.Vector filters)
Initialising Constructor. |
|
| Method Summary | |
boolean |
accept(java.io.File dir,
java.lang.String name)
Tests if a specified file should be included in a file list. |
void |
addFilter(FileFilterData filter)
This function adds a specific FileFilterData to the current pool of filters. |
java.io.File |
getBaseDirectory()
This returns the base directory for this filter. |
FileFilterData |
getFilter(int index)
This function gets the specific FileFilterData from the current pool of filters. |
java.util.Vector |
getFilters()
Gets the data in the following variable: This holds the various filters to implement. |
int |
getFiltersSize()
Gets the data in the following variable: The number of filters in the filters vector. |
int |
getSelectedFilter()
Gets the data in the following variable: The filter which is currently in effect. |
protected boolean |
isHigherDirectory(java.io.File dir)
Checks to see if the directory is higher than the base directory. |
void |
removeFilter(FileFilterData filter)
This function removes a specific FileFilterData from the current pool of filters. |
void |
setBaseDirectory(java.io.File directory)
This sets the base directory for this filter. |
void |
setFilters(java.util.Vector data)
Sets the data in the following variable: This holds the various filters to implement. |
void |
setSelectedFilter(FileFilterData data)
Sets the data in the following variable: The filter which is currently in effect. |
void |
setSelectedFilter(int data)
Sets the data in the following variable: The filter which is currently in effect. |
java.lang.String |
toString()
This function returns the String form of the data. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.util.Vector filters
protected java.io.File baseDirectory
protected int selectedFilter
| Constructor Detail |
public FileFilter()
public FileFilter(java.util.Vector filters)
filters - This holds the various filters to implement.| Method Detail |
public java.util.Vector getFilters()
public int getFiltersSize()
public int getSelectedFilter()
public void setFilters(java.util.Vector data)
data - Vector containing the data to set the variable to.public void setSelectedFilter(int data)
data - int containing the data to set the variable to.public void setSelectedFilter(FileFilterData data)
data - FileFilterData containing the data to set the variable to.public void addFilter(FileFilterData filter)
filter - FileFilterData containing a new filter.public FileFilterData getFilter(int index)
index - int index of the filter to get.public void removeFilter(FileFilterData filter)
filter - FileFilterData containing the filter to remove.
public boolean accept(java.io.File dir,
java.lang.String name)
accept in interface java.io.FilenameFilterdir - File directory in which the file was found.name - String name of the file to test.protected boolean isHigherDirectory(java.io.File dir)
dir - File containing the directory to check.public void setBaseDirectory(java.io.File directory)
directory - File containing the base directory.public java.io.File getBaseDirectory()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||