http://www.jpicedt.org

jpicedt.ui.dialog
Class PEFileFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by jpicedt.ui.dialog.PEFileFilter

public class PEFileFilter
extends FileFilter

a concrete implementation of FileFilter for LaTeX and rel. file extensions

Since:
PicEdt 1.1
Author:
Sylvain Reynal

Constructor Summary
PEFileFilter()
          Construct a new empty file filter
PEFileFilter(String extension)
          Construct a new file filter with the given extension, e.g.
PEFileFilter(String[] filters)
          Construct a new file filter with the given array of extensions, e.g.
PEFileFilter(String[] filters, String description)
          Construct a new file filter with the given array of extensions and the given description.
PEFileFilter(String extension, String description)
          Construct a new file filter with the given extension (e.g.
 
Method Summary
 boolean accept(File f)
           
 void addExtension(String extension)
          Add a new extension to the file filter
 String getDescription()
           
 String getExtension(File f)
          Renvoie l'extension d'un fichier, sans le point et éventuellement avec le prefixe "jpe."
 boolean isExtensionListInDescription()
           
 void setDescription(String description)
          Set the description string for this filter
 void setExtensionListInDescription(boolean b)
          Set whether the list of extensions is included in the description string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PEFileFilter

public PEFileFilter()
Construct a new empty file filter


PEFileFilter

public PEFileFilter(String extension)
Construct a new file filter with the given extension, e.g. "tex"


PEFileFilter

public PEFileFilter(String extension,
                    String description)
Construct a new file filter with the given extension (e.g. "pst") and description ("Pstricks files")


PEFileFilter

public PEFileFilter(String[] filters)
Construct a new file filter with the given array of extensions, e.g. new PEFileFilter(String {"gif", "jpg"})


PEFileFilter

public PEFileFilter(String[] filters,
                    String description)
Construct a new file filter with the given array of extensions and the given description. e.g. new PEFileFilter(String {"pic", "tex"}, "Fichiers Picture et Latex")

Method Detail

accept

public boolean accept(File f)
Specified by:
accept in class FileFilter
Returns:
"true" if the given file can be displayed in the file filter

getExtension

public String getExtension(File f)
Renvoie l'extension d'un fichier, sans le point et éventuellement avec le prefixe "jpe.". Par exemple pour toto.tex l'extension est "tex", alors que pour toto.jpe.tex l'extension est "jpe.tex".

Parameters:
f - le fichier dont on cherche l'extension
Returns:
L'extension associée au fichier f passé en paramètre

addExtension

public void addExtension(String extension)
Add a new extension to the file filter


getDescription

public String getDescription()
Specified by:
getDescription in class FileFilter
Returns:
the file filter description e.g. "Picture files for LaTeX : *.pic, *.tex"

setDescription

public void setDescription(String description)
Set the description string for this filter


setExtensionListInDescription

public void setExtensionListInDescription(boolean b)
Set whether the list of extensions is included in the description string.


isExtensionListInDescription

public boolean isExtensionListInDescription()
Returns:
whether the list of extensions is included in the description string.

http://www.jpicedt.org

Submit a bug : syd@jpicedt.org