001// License: GPL. For details, see LICENSE file. 002package org.openstreetmap.josm.gui.util; 003 004import static org.openstreetmap.josm.tools.I18n.tr; 005 006import java.io.File; 007 008import javax.swing.filechooser.FileFilter; 009 010/** 011 * A FileFilter that accepts all files. 012 */ 013public 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}