com.jaxfront.swing.ui.editor
Class XUIFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by com.jaxfront.swing.ui.editor.XUIFilter
All Implemented Interfaces:
java.io.FileFilter

public class XUIFilter
extends javax.swing.filechooser.FileFilter
implements java.io.FileFilter

A FileFilter, once implemented, can be set on a File to keep unwanted files from appearing in the directory listing. As the name suggest this class would list only xui-files. For example:

    File file = new File();
    File[] files = file.lastFile(new XUIFilter());
 
Note that this class can also be used for open dialog or save dialog

Version:
1.60
See Also:
FileFilter

Constructor Summary
XUIFilter()
          Creates an instance of XUIFilter
 
Method Summary
 boolean accept(java.io.File f)
          Returns whether the given file is accepted by this filter.
 java.lang.String getDescription()
          The description of this filter.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XUIFilter

public XUIFilter()
Creates an instance of XUIFilter

Method Detail

accept

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

Specified by:
accept in interface java.io.FileFilter
Specified by:
accept in class javax.swing.filechooser.FileFilter
Parameters:
f - a file
Returns:
boolean true, if the given file is accepted by this filter

getDescription

public java.lang.String getDescription()
The description of this filter. For example: "JPG and GIF Images"

Specified by:
getDescription in class javax.swing.filechooser.FileFilter
Returns:
String "XML XUI (*.xui)"
See Also:
FileView.getName(java.io.File)