import java.io.File;
import javax.swing.*;
import javax.swing.filechooser.*;

public class WOR_Html_Filter extends FileFilter {
	// Accept all directories and all HTM or WOR files.
	public boolean accept(File f) {
		if (f.isDirectory()) {
            return true;
        }

        String ext = f.getName().toLowerCase();
		if (ext != null) {
            if (ext.endsWith( "htm" ) ||
                ext.endsWith( "wor" )) {
				return true;
			}
			else {
                return false;
            }
    	}

        return false;
    }

    // The description of this filter
    public String getDescription() {
        return "HTM & WOR files";
    }
}
