|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.filechooser.FileFilter
com.clearfield.security.BaseFileFilter
public class BaseFileFilter
The filter class which allows the simple setting of file filters.
Copyright © 2006 Clearfield Ltd. This software is distributed under the BSD license. See the accompanying license.txt for details.
| Field Summary | |
|---|---|
protected java.lang.String |
description
|
protected java.lang.String[] |
extensions
|
| Constructor Summary | |
|---|---|
BaseFileFilter(java.lang.String[] extensions,
java.lang.String description)
Constructor for the filter. |
|
| Method Summary | |
|---|---|
boolean |
accept(java.io.File file)
Core function of the filter. |
java.lang.String |
getDescription()
Returns the human readable version of this filter. |
protected java.lang.String |
getExtension(java.io.File file)
Return the extension of the filename . |
protected boolean |
isCorrectExtension(java.lang.String extension)
Determines if the file extension matches those known by the filter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String[] extensions
protected java.lang.String description
| Constructor Detail |
|---|
public BaseFileFilter(java.lang.String[] extensions,
java.lang.String description)
extensions - String array of possible extensions.description - String base human description of the files.| Method Detail |
|---|
public boolean accept(java.io.File file)
accept in class javax.swing.filechooser.FileFilterfile - File to match.
public java.lang.String getDescription()
getDescription in class javax.swing.filechooser.FileFilterprotected boolean isCorrectExtension(java.lang.String extension)
extension - String extension to match
protected java.lang.String getExtension(java.io.File file)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||