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 * @since 5572
013 */
014public class FileFilterAllFiles extends FileFilter {
015
016    private static FileFilterAllFiles instance;
017
018    /**
019     * Replies the unique instance.
020     * @return the unique instance
021     */
022    public static synchronized FileFilterAllFiles getInstance() {
023        if (instance == null) {
024            instance = new FileFilterAllFiles();
025        }
026        return instance;
027    }
028
029    @Override
030    public boolean accept(File f) {
031        return true;
032    }
033
034    @Override
035    public String getDescription() {
036        return tr("All files (*.*)");
037    }
038}