package de.rico.editor.gui.filter;

import java.io.File;

import javax.swing.filechooser.FileFilter;

public class FilterMD2 extends FileFilter
{
	/*
	 * (non-Javadoc)
	 * @see javax.swing.filechooser.FileFilter#accept(java.io.File)
	 */
	@Override
	public boolean accept(File file)
	{
		String filename = file.getName();
		return filename.endsWith(".md2") || filename.endsWith(".MD2")
				|| file.isDirectory();
	}

	/*
	 * (non-Javadoc)
	 * @see javax.swing.filechooser.FileFilter#getDescription()
	 */
	@Override
	public String getDescription()
	{
		return "*.md2 (Quake2 model format)";
	}
}
