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


public class ImageFileView extends FileView {
    ImageIcon jpgIcon = Utils.createImageIcon("jpgIcon.gif");

    public String getName(File f) {
        return null;
    }

    public String getDescription(File f) {
        return null;
    }

    public Boolean isTraversable(File f) {
        return null;
    }

    public String getTypeDescription(File f) {
        String extension = Utils.getExtension(f);
        String type = null;

        if (extension != null) {
            if (extension.equals(Utils.jpg)) {
                type = "JPEG Image";
            }
        }
        return type;
    }

    public Icon getIcon(File f) {
        String extension = Utils.getExtension(f);
        Icon icon = null;

        if (extension != null) {
            if (extension.equals(Utils.jpg)) {
                icon = jpgIcon;
            }
        }
        return icon;
    }
}
