001 // License: GPL. For details, see LICENSE file. 002 package org.openstreetmap.josm.gui.util; 003 004 import static org.openstreetmap.josm.tools.I18n.tr; 005 006 import java.io.File; 007 008 import javax.swing.filechooser.FileFilter; 009 010 /** 011 * A FileFilter that accepts all files. 012 */ 013 public class FileFilterAllFiles extends FileFilter { 014 015 private static FileFilterAllFiles INSTANCE; 016 017 public static FileFilterAllFiles getInstance() { 018 if (INSTANCE == null) { 019 INSTANCE = new FileFilterAllFiles(); 020 } 021 return INSTANCE; 022 } 023 024 @Override 025 public boolean accept(File f) { 026 return true; 027 } 028 029 @Override 030 public String getDescription() { 031 return tr("All files (*.*)"); 032 } 033 }