Package jpicedt.ui.dialog
Class PEFileFilter
- java.lang.Object
-
- javax.swing.filechooser.FileFilter
-
- jpicedt.ui.dialog.PEFileFilter
-
public class PEFileFilter extends javax.swing.filechooser.FileFiltera concrete implementation of FileFilter for LaTeX and rel. file extensions- Since:
- PicEdt 1.1
- Author:
- Sylvain Reynal
-
-
Constructor Summary
Constructors Constructor Description PEFileFilter()Construct a new empty file filterPEFileFilter(java.lang.String extension)Construct a new file filter with the given extension, e.g.PEFileFilter(java.lang.String[] filters)Construct a new file filter with the given array of extensions, e.g.PEFileFilter(java.lang.String[] filters, java.lang.String description)Construct a new file filter with the given array of extensions and the given description.PEFileFilter(java.lang.String extension, java.lang.String description)Construct a new file filter with the given extension (e.g.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaccept(java.io.File f)voidaddExtension(java.lang.String extension)Add a new extension to the file filterjava.lang.StringgetDescription()java.lang.StringgetExtension(java.io.File f)booleanisExtensionListInDescription()voidsetDescription(java.lang.String description)Set the description string for this filtervoidsetExtensionListInDescription(boolean b)Set whether the list of extensions is included in the description string.
-
-
-
Constructor Detail
-
PEFileFilter
public PEFileFilter()
Construct a new empty file filter
-
PEFileFilter
public PEFileFilter(java.lang.String extension)
Construct a new file filter with the given extension, e.g. "tex"
-
PEFileFilter
public PEFileFilter(java.lang.String extension, java.lang.String description)Construct a new file filter with the given extension (e.g. "pst") and description ("Pstricks files")
-
PEFileFilter
public PEFileFilter(java.lang.String[] filters)
Construct a new file filter with the given array of extensions, e.g. new PEFileFilter(String {"gif", "jpg"})
-
PEFileFilter
public PEFileFilter(java.lang.String[] filters, java.lang.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(java.io.File f)
- Specified by:
acceptin classjavax.swing.filechooser.FileFilter- Returns:
- "true" if the given file can be displayed in the file filter
-
getExtension
public java.lang.String getExtension(java.io.File f)
- Returns:
- the extension associated with the given file
-
addExtension
public void addExtension(java.lang.String extension)
Add a new extension to the file filter
-
getDescription
public java.lang.String getDescription()
- Specified by:
getDescriptionin classjavax.swing.filechooser.FileFilter- Returns:
- the file filter description e.g. "Picture files for LaTeX : *.pic, *.tex"
-
setDescription
public void setDescription(java.lang.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.
-
-