1
package latexDraw.filters;
5
import javax.swing.filechooser.FileFilter;
8
* This class defines a filter for ps documents (*.ps)<br>
10
* This file is part of LaTeXDraw<br>
11
* Copyright (c) 2005-2008 Arnaud BLOUIN<br>
13
* LaTeXDraw is free software; you can redistribute it and/or modify
14
* it under the terms of the GNU General Public License as published by
15
* the Free Software Foundation; either version 2 of the License, or
16
* (at your option) any later version.<br>
18
* LaTeXDraw is distributed without any warranty; without even the
19
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
20
* PURPOSE. See the GNU General Public License for more details.<br>
23
* @author Arnaud BLOUIN<br>
27
public class PSFilter extends FileFilter
29
public static final String PS_EXTENSION = ".ps";//$NON-NLS-1$
33
public boolean accept(File f)
35
return f!=null && (f.getName().endsWith(PS_EXTENSION)|| f.isDirectory());
41
public String getDescription()
43
return "*" + PS_EXTENSION; //$NON-NLS-1$ //$NON-NLS-2$