package com.axis.innovators.box.events;


import java.io.File;

/**
 * 当程序接受到了文件时触发
 * @author tzdwindows 7
 */
public class OpenFileEvents {
    private final File filePath;
    private final String extension;
    private boolean isContinue;

    /**
     * 构造函数
     * @param filePath 文件路径
     * @param extension 文件后缀
     */
    public OpenFileEvents(String filePath, String extension) {
        this.filePath = new File(filePath);
        this.extension = extension;
        isContinue = true;
    }

    /**
     * 获取文件路径
     * @return 文件路径
     */
    public File getFilePath() {
        return filePath;
    }

    /**
     * 获取文件后缀
     * @return 文件后缀
     */
    public String getExtension() {
        return extension;
    }

    public boolean isContinue() {
        return isContinue;
    }

    /**
     * 希望程序继续执行后面的操作
     * @param isContinue 是否继续
     */
    public void setContinue(boolean isContinue) {
        this.isContinue = isContinue;
    }
}
