package de.rico.editor.gui.filter;

import java.io.File;

import javax.swing.filechooser.FileFilter;

/**
 * A file filter for filtering .3ds files.
 * @author Frank Bruns
 */
public class Filter3DS 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(".3ds") || filename.endsWith(".3DS")
					|| file.isDirectory();
	}

	/*
	 * (non-Javadoc)
	 * @see javax.swing.filechooser.FileFilter#getDescription()
	 */
	@Override
	public String getDescription()
	{
		return "*.3ds (3D Studio Max)";
	}
}
