Graph Common

pl.psnc.graph.io
Class GraphFileFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by pl.psnc.graph.io.GraphFileFilter

public class GraphFileFilter
extends javax.swing.filechooser.FileFilter

GraphFileFilter class - file filter which is used with JFileChooser dialog.

Author:
Dominik Stoklosa (~osa~)
Email address
osa@man.poznan.pl

Field Summary
protected  java.lang.String description
          Description of accepted files.
protected  java.lang.String extension
          Extension of accepted files.
 
Constructor Summary
GraphFileFilter(java.lang.String extension, java.lang.String description)
          Constructs a new filter for the specified extension and description.
 
Method Summary
 boolean accept(java.io.File file)
          Returns true if file is a directory or ends with extension.
 java.lang.String getDescription()
          Get value of the property: description
 java.lang.String getExtension()
          Get value of the property: extension
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

extension

protected java.lang.String extension
Extension of accepted files.


description

protected java.lang.String description
Description of accepted files.

Constructor Detail

GraphFileFilter

public GraphFileFilter(java.lang.String extension,
                       java.lang.String description)
Constructs a new filter for the specified extension and description.

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

accept

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

Specified by:
accept in class javax.swing.filechooser.FileFilter
Parameters:
file - The file to be checked.
Returns:
Returns true if the file is accepted.

getExtension

public java.lang.String getExtension()
Get value of the property: extension

Returns:
the extension

getDescription

public java.lang.String getDescription()
Get value of the property: description

Specified by:
getDescription in class javax.swing.filechooser.FileFilter
Returns:
the description

Graph Common

Copyright 2008 by VLAB Dominik Stoklosa