|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectjgGlyphs.GlyphFilter
This is a FileFilter implemenation that filters files based on its extension and starting Characters. Supported extensions are "jpeg" or "jpg", "gif", and "png". To filter on a set of Characters, use the constructor GlyphFilter(String); each Character in the passed string denotes acceptable prefixes. To filter on a starting String, you must wrap the String in a GlyphSet or a String[] and use the appropriate constructor.
| Field Summary | |
protected GlyphSet |
glyphSet
This is the GlyphSet to filter on, if any |
| Constructor Summary | |
GlyphFilter()
Constructor which will accept any starting glyphs. |
|
GlyphFilter(GlyphSet gs)
Constructor that takes a GlyphSet. |
|
GlyphFilter(java.lang.String gc)
Constructs a GlyphFilter using the Characters in the passed String as the list of valid starting Characters. |
|
GlyphFilter(java.lang.String[] ga)
Constructs a GlyphFilter using the supplied array of Strings as the list of glyphs to filter on. |
|
| Method Summary | |
boolean |
accept(java.io.File file)
Accepts a file if it has a supported extension, and optionally if it starts with one of the glyphs specified by the GlyphSet this object was created with. |
protected boolean |
extensionOK(java.io.File file)
Checks that the file has a supported extension. |
protected boolean |
prefixOK(java.io.File file)
Checks that the file starts with one of the glyphs in the internal GlyphSet. |
java.lang.String |
toString()
Returns the string representation of this class. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected GlyphSet glyphSet
| Constructor Detail |
public GlyphFilter()
public GlyphFilter(java.lang.String gc)
gc - the list of valid starting Characters, all together as one String.public GlyphFilter(java.lang.String[] ga)
ga - the String array to filter on.public GlyphFilter(GlyphSet gs)
gs - the GlyphSet to filter on.| Method Detail |
public java.lang.String toString()
public boolean accept(java.io.File file)
accept in interface java.io.FileFilterprotected boolean extensionOK(java.io.File file)
protected boolean prefixOK(java.io.File file)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||