com.tensegrity.gui.swing.dialog.graphfilechooser
Class TemplatesFileFilter

java.lang.Object
  extended byjavax.swing.filechooser.FileFilter
      extended bycom.tensegrity.gui.swing.dialog.graphfilechooser.CustomFileFilter
          extended bycom.tensegrity.gui.swing.dialog.graphfilechooser.TemplatesFileFilter
All Implemented Interfaces:
ExtendedFileFilter

public class TemplatesFileFilter
extends CustomFileFilter

The TemplatesFileFilter allows you to add an additionial criteria to the filefilter semantic. This class allows to pass a string, which has to be part of the Filename to let the CustomFileFilter.accept(File) return true.

Version:
$Id: TemplatesFileFilter.java,v 1.2 2004/06/02 11:48:14 GillesIachelini Exp $
Author:
GillesIachelini

Field Summary
 
Fields inherited from class com.tensegrity.gui.swing.dialog.graphfilechooser.CustomFileFilter
uiManager
 
Constructor Summary
TemplatesFileFilter(int type, java.lang.String nameString, java.lang.String extension, UIManager uiManager)
          Creates a new TemplatesFileFilter.
 
Method Summary
 boolean accept(java.io.File f)
          Checks if the given file is accepted by this filter
 java.lang.String getDescription()
          Returns the description of this file filter
 
Methods inherited from class com.tensegrity.gui.swing.dialog.graphfilechooser.CustomFileFilter
getExtensionList, getType, getValidFilename, openInViewer, supportsOpenInViewer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplatesFileFilter

public TemplatesFileFilter(int type,
                           java.lang.String nameString,
                           java.lang.String extension,
                           UIManager uiManager)
Creates a new TemplatesFileFilter. Pass a String which is required to be part of the Filename to be accepted by this filter.

Parameters:
type - type identifier for this filter.
nameString - partial string to be contained in the file name.
extension - the extension for the filtered files.
uiManager - the UIManger to obtain localized text from.
Method Detail

accept

public boolean accept(java.io.File f)
Description copied from class: CustomFileFilter
Checks if the given file is accepted by this filter

Overrides:
accept in class CustomFileFilter
Parameters:
f - The file to check
Returns:
Returns true, if the file is approved

getDescription

public java.lang.String getDescription()
Description copied from class: CustomFileFilter
Returns the description of this file filter

Overrides:
getDescription in class CustomFileFilter
Returns:
the description of this file filter


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.