org.exolab.jms.jndiadministration
Class DatabaseFilter

java.lang.Object
  |
  +--javax.swing.filechooser.FileFilter
        |
        +--org.exolab.jms.jndiadministration.DatabaseFilter

public class DatabaseFilter
extends javax.swing.filechooser.FileFilter

A file filter used by the file chooser to resitrict displayed files to files with a ".db" suffix only.

Version:
$Revision: 1.2 $ $Date: 2003/08/07 13:32:59 $
Author:
Jim Mourikis

Constructor Summary
DatabaseFilter()
          The default constructor does nothing.
 
Method Summary
 boolean accept(java.io.File f)
          All files in a directory are passed to this method to determine if they should be displayed.
 java.lang.String getDescription()
          The file suffix to allow display.
 java.lang.String getSuffix(java.io.File f)
          Get the suffix of the given file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseFilter

public DatabaseFilter()
The default constructor does nothing.
Method Detail

accept

public boolean accept(java.io.File f)
All files in a directory are passed to this method to determine if they should be displayed. The method will allow the display of all directories and all files with the "*.db" suffix.
Overrides:
accept in class javax.swing.filechooser.FileFilter
Parameters:
f - The file to be checked for display.
Returns:
boolean true if the file should be displayed.

getDescription

public java.lang.String getDescription()
The file suffix to allow display.
Overrides:
getDescription in class javax.swing.filechooser.FileFilter
Returns:
String The suffix of all files which can be displayed

getSuffix

public java.lang.String getSuffix(java.io.File f)
Get the suffix of the given file. If the file has no suffix return null
Parameters:
f - The file to check.
Returns:
String the file suffix


Copyright © 1999-2004 The OpenJMS Group. All Rights Reserved.