JGraphpad Pro
v6.0.5.0


com.jgraph.pad.util
Class JGraphpadFileFilter

java.lang.Object
  extended byjavax.swing.filechooser.FileFilter
      extended bycom.jgraph.pad.util.JGraphpadFileFilter

public class JGraphpadFileFilter
extends FileFilter

Filter for use in a JFileChooser.


Nested Class Summary
static class JGraphpadFileFilter.EditorFileFilter
          Utility file filter to accept editor files, namely .xml and .xml.gz extensions.
static class JGraphpadFileFilter.ImageFileFilter
          Utility file filter to accept all image formats supported by image io.
 
Field Summary
protected  String desc
          Description of accepted files.
protected  String ext
          Extension of accepted files.
 
Constructor Summary
JGraphpadFileFilter(String extension, String description)
          Constructs a new filter for the specified extension and descpription.
 
Method Summary
 boolean accept(File file)
          Returns true if file is a directory or ends with ext.
 String getDescription()
          Returns the description for accepted files.
 String getExtension()
          Returns the extension for accepted files.
 void setExtension(String extension)
          Sets the extension for accepted files.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ext

protected String ext
Extension of accepted files.


desc

protected String desc
Description of accepted files.

Constructor Detail

JGraphpadFileFilter

public JGraphpadFileFilter(String extension,
                           String description)
Constructs a new filter for the specified extension and descpription.

Parameters:
extension - The extension to accept files with.
description - The description of the file format.
Method Detail

accept

public boolean accept(File file)
Returns true if file is a directory or ends with ext.

Parameters:
file - The file to be checked.
Returns:
Returns true if the file is accepted.

getDescription

public String getDescription()
Returns the description for accepted files.

Returns:
Returns the description.

getExtension

public String getExtension()
Returns the extension for accepted files.

Returns:
Returns the extension.

setExtension

public void setExtension(String extension)
Sets the extension for accepted files.

Parameters:
extension - The extension to set.

JGraphpad Pro
v6.0.5.0


Copyright (C) 2005 JGraph.com. All rights reserved.