|
Apache JMeter 1.9 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.filechooser.FileFilter | +--org.apache.jmeter.config.ExtensionsFileFilter
This FileFilter allows for a list of file extensions to be set that it will filter on. This design was taken from the ExampleFileFilter used in How to Use File Choosers, a section in The Java Tutorial. Here is an example of how to use the file filter for JMX files, that have the .jmx extension.
ExtensionsFileFilter filter = new ExtensionsFileFilter(); filter.addExtension("jmx"); filter.setDescription("JMeter (*.jmx)"); FileChooser fileChooser = new FileChooser(); fileChooser.setFileFilter(fileFilter);
Constructor Summary | |
ExtensionsFileFilter()
Default Constructor. |
Method Summary | |
boolean |
accept(File pFile)
Determines whether to accept the passed File or not. |
void |
addExtension(String pExtension)
Add an extension to the list of extensions to filter on. |
String |
getDescription()
Returns a descriptive string detailing the file extensions being filtered. |
void |
removeExtension(String pExtension)
Removes an extension from the list of extensions to filter on. |
void |
setDescription(String pDescription)
Set the description of the extensions being filtered on. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ExtensionsFileFilter()
Method Detail |
public void addExtension(String pExtension)
pExtension
- The extension to add.public void removeExtension(String pExtension)
pExtension
- The extension to remove.public void setDescription(String pDescription)
pDescription
- the detailed description of the extensions being
filtered on.public String getDescription()
getDescription
in class FileFilter
FileFilter.getDescription()
public boolean accept(File pFile)
accept
in class FileFilter
pFile
- The file to check whether we should accept or not.
|
Apache JMeter 1.9 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |