|
JComponentPack 1.5.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.filechooser.FileFilter
com.zfqjava.swing.DefaultFileFilter
public class DefaultFileFilter
DefaultFileFilter provides a default file filter.
| Constructor Summary | |
|---|---|
DefaultFileFilter(String[] ext,
String description)
Constructs a default file filter use the specified ext and desciption. |
|
DefaultFileFilter(String ext,
String description)
Constructs a default file filter use the specified ext and desciption. |
|
| Method Summary | |
|---|---|
boolean |
accept(File f)
|
String |
getDescription()
|
static String |
getExtensionName(File f)
Returns the extension for the specified file, for example "readme.txt" will return "txt". |
static String |
getExtensionName(String name)
Returns the extension for the specified file name, for example "readme.txt" will return "txt". |
static String |
getExtensionName(URL url)
Returns the extension for the specified URL, for example "http://localhost/readme.txt" will return "txt". |
String[] |
getExtensionNames()
Returns all the extension name for this file filter. |
static String |
getNameWithoutExtension(String name)
Returns the file name without extension, for example the file "readme.txt" will return "readme". |
String |
getPreferredExtensionName()
Returns the preferred extension name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultFileFilter(String ext,
String description)
ext and desciption.
ext - the extension namedescription - the description for the extension
NullPointerException - if any parameter is
null.
public DefaultFileFilter(String[] ext,
String description)
ext and desciption.
ext - the extension namesdescription - the description for the extension
NullPointerException - if any parameter is
null.| Method Detail |
|---|
public boolean accept(File f)
accept in class FileFilterpublic String getDescription()
getDescription in class FileFilterpublic String getPreferredExtensionName()
public String[] getExtensionNames()
public static String getExtensionName(File f)
f - the file
public static String getExtensionName(URL url)
url - the url
public static String getExtensionName(String name)
name - the file name
public static String getNameWithoutExtension(String name)
name - the file name
|
JComponentPack 1.5.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||