|
kiyut.citra 3.7 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.filechooser.FileFilter
kiyut.citra.io.DefaultFileFilter
public class DefaultFileFilter
Defaulft File Filter
| Field Summary | |
|---|---|
protected String |
description
|
protected List<String> |
filters
|
protected String |
fullDescription
|
protected static String |
HIDDEN_FILE
|
protected static String |
TYPE_UNKNOWN
|
protected boolean |
useExtensionsInDescription
|
| Constructor Summary | |
|---|---|
DefaultFileFilter()
|
|
| Method Summary | |
|---|---|
boolean |
accept(File f)
|
void |
addExtension(String extension)
Adds a filetype "dot" extension to filter against. |
String |
getDescription()
Returns the human readable description of this filter. |
String |
getExtension(File f)
Return the extension portion of the file's name . |
boolean |
isExtensionListInDescription()
Returns whether the extension list (.jpg, .gif, etc) should show up in the human readable description. |
void |
setDescription(String description)
Sets the human readable description of this filter. |
void |
setExtensionListInDescription(boolean b)
Determines whether the extension list (.jpg, .gif, etc) should show up in the human readable description. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String TYPE_UNKNOWN
protected static final String HIDDEN_FILE
protected List<String> filters
protected String description
protected String fullDescription
protected boolean useExtensionsInDescription
| Constructor Detail |
|---|
public DefaultFileFilter()
| Method Detail |
|---|
public boolean accept(File f)
accept in class FileFilterpublic String getExtension(File f)
getExtension(java.io.File),
accept(java.io.File)public void addExtension(String extension)
ExampleFileFilter filter = new ExampleFileFilter();
filter.addExtension("jpg");
filter.addExtension("tif");
Note that the "." before the extension is not needed and will be ignored.
public String getDescription()
getDescription in class FileFiltersetDescription(java.lang.String),
setExtensionListInDescription(boolean),
isExtensionListInDescription()public void setDescription(String description)
setDescription(java.lang.String),
setExtensionListInDescription(boolean),
isExtensionListInDescription()public void setExtensionListInDescription(boolean b)
getDescription(),
setDescription(java.lang.String),
isExtensionListInDescription()public boolean isExtensionListInDescription()
getDescription(),
setDescription(java.lang.String),
setExtensionListInDescription(boolean)
|
kiyut.citra 3.7 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||