com.bea.wlpi.client.common
Class ExtensionFileFilter
java.lang.Object
|
+--javax.swing.filechooser.FileFilter
|
+--com.bea.wlpi.client.common.ExtensionFileFilter
- public class ExtensionFileFilter
- extends javax.swing.filechooser.FileFilter
FileChooser
filter that discriminates by file extension.
Constructor Summary |
ExtensionFileFilter(java.lang.String description)
Create an ExtensionFileFilter with the specified description. |
Method Summary |
boolean |
accept(java.io.File f)
Whether the given file is accepted by the filter. |
void |
addExtension(java.lang.String extension)
Add another extension to the list of those recognized by the filter. |
java.lang.String |
getDescription()
The description of this filter. |
void |
setDescription(java.lang.String description)
Set the description. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExtensionFileFilter
public ExtensionFileFilter(java.lang.String description)
- Create an
ExtensionFileFilter
with the specified description.
- Parameters:
description
- text to appear in the "Files of type" list.
accept
public boolean accept(java.io.File f)
- Whether the given file is accepted by the filter.
- Overrides:
accept
in class javax.swing.filechooser.FileFilter
- Parameters:
f
- The file to test.- Returns:
true
if the filter accepted the file, otherwise
false
.
addExtension
public void addExtension(java.lang.String extension)
- Add another extension to the list of those recognized by the filter.
- Parameters:
extension
- extension (excluding the '.' character).
setDescription
public void setDescription(java.lang.String description)
- Set the description.
- Parameters:
description
- Text to appear in the "Files of type" list.- See Also:
getDescription()
getDescription
public java.lang.String getDescription()
- The description of this filter. For example: "JPG and GIF Images."
- Overrides:
getDescription
in class javax.swing.filechooser.FileFilter
- Returns:
- Text to appear in the "Files of type" list.
- See Also:
setDescription(java.lang.String)
BEA WebLogic Process Integrator is a trademark of BEA Systems, Inc.
Copyright (c) 2001 BEA Systems, Inc.
All rights reserved.