|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.filechooser.FileFilter
TerpPaintFileFilter
public class TerpPaintFileFilter
TerpPaintFileFilter class creates a file filter. If no filters are added, then all files are accepted. It should work with all operating systems and hardware. The OS is windows. There is no implementation variances. There is no security constaints. There is no external secification.
Field Summary | |
---|---|
private java.lang.String |
description
String which is used for the description of the file. |
private java.util.Hashtable |
filters
Hashtable which is used to store the filters. |
private java.lang.String |
fullDescription
String for the full description of the file. |
private static java.lang.String |
HIDDEN_FILE
String representing hidden file. |
private static java.lang.String |
TYPE_UNKNOWN
String representing unknown file type. |
private boolean |
useExtensionsInDescription
True if the description contains a extension and is false if the description does not contain an extension. |
Constructor Summary | |
---|---|
TerpPaintFileFilter()
Constructor of TerpPaintFileFilter. |
|
TerpPaintFileFilter(java.lang.String extension)
This function creates a file filter that accepts files with the given extension. |
|
TerpPaintFileFilter(java.lang.String[] filters)
This function creates a file filter from the given string array. |
|
TerpPaintFileFilter(java.lang.String[] filters,
java.lang.String description)
This function creates a file filter from the given string array and description. |
|
TerpPaintFileFilter(java.lang.String extension,
java.lang.String description)
This function creates a file filter that accepts the given file type. |
Method Summary | |
---|---|
boolean |
accept(java.io.File f)
Return true if this file should be shown in the directory pane, false if it shouldn't. |
void |
addExtension(java.lang.String extension)
Adds a filetype "dot" extension to filter against. |
java.lang.String |
getDescription()
This function returns a String of the human readable description of this filter. |
java.lang.String |
getExtension(java.io.File f)
This method returns a String object of the extension portion of the file's name. |
boolean |
isExtensionListInDescription()
This function returns whether the extension list (.jpg, .gif, etc) should show up in the human readable description. |
void |
setDescription(java.lang.String description)
Sets the human readable description of this filter. |
void |
setExtensionListInDescription(boolean b)
This function 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 |
---|
private static java.lang.String TYPE_UNKNOWN
private static java.lang.String HIDDEN_FILE
private java.util.Hashtable filters
private java.lang.String description
private java.lang.String fullDescription
private boolean useExtensionsInDescription
Constructor Detail |
---|
public TerpPaintFileFilter()
public TerpPaintFileFilter(java.lang.String extension)
extension
- String that describes the type of file extension.public TerpPaintFileFilter(java.lang.String extension, java.lang.String description)
extension
- String that represents the type of the image file.description
- String used to for the description.public TerpPaintFileFilter(java.lang.String[] filters)
filters
- an Array of String to be used for filters.public TerpPaintFileFilter(java.lang.String[] filters, java.lang.String description)
filters
- an array of String to be used for filters.description
- a String to be used for description of the file.Method Detail |
---|
public boolean accept(java.io.File f)
accept
in class javax.swing.filechooser.FileFilter
f
- File object that contains image.
public java.lang.String getExtension(java.io.File f)
f
- a File that contains the image.
public void addExtension(java.lang.String extension)
extension
- a String to be added to the end of file as a representation of the file extension.public java.lang.String getDescription()
getDescription
in class javax.swing.filechooser.FileFilter
setDescription(java.lang.String)
public void setDescription(java.lang.String description)
description
- a String used to describe the file information.getDescription()
public void setExtensionListInDescription(boolean b)
b
- a boolean value determines true or false of useExtensionInDescription status.public boolean isExtensionListInDescription()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |