WebLogic Integration


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.

Author:
Copyright © 2000, 2001 BEA Systems, Inc. All Rights Reserved.

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
 

Constructor Detail

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.
Method Detail

accept

public boolean accept(java.io.File f)
Whether the given file is accepted by the filter.

Parameters:
f - The file to test.
Returns:
true if the filter accepted the file, otherwise false.
Overrides:
accept in class javax.swing.filechooser.FileFilter

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."

Returns:
Text to appear in the "Files of type" list.
Overrides:
getDescription in class javax.swing.filechooser.FileFilter
See Also:
setDescription(java.lang.String)

WebLogic Integration

WebLogic Integration (WLI)