001/*
002 * Copyright 2010-2015 Institut Pasteur.
003 * 
004 * This file is part of Icy.
005 * 
006 * Icy is free software: you can redistribute it and/or modify
007 * it under the terms of the GNU General Public License as published by
008 * the Free Software Foundation, either version 3 of the License, or
009 * (at your option) any later version.
010 * 
011 * Icy is distributed in the hope that it will be useful,
012 * but WITHOUT ANY WARRANTY; without even the implied warranty of
013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
014 * GNU General Public License for more details.
015 * 
016 * You should have received a copy of the GNU General Public License
017 * along with Icy. If not, see <http://www.gnu.org/licenses/>.
018 */
019package icy.file;
020
021import icy.gui.frame.progress.FileFrame;
022import icy.sequence.Sequence;
023
024import java.io.File;
025import java.util.List;
026
027import javax.swing.filechooser.FileFilter;
028
029/**
030 * Sequence file exporter interface.<br>
031 * The exporter is directly integrated in the classic <b>Save</b> command menu and in the
032 * {@link Saver} class to open Sequence.<br>
033 * It takes a {@link Sequence} and saves it in {@link File}.
034 * 
035 * @author Stephane
036 */
037public interface SequenceFileExporter
038{
039    /**
040     * Return the supported FileFilter for this exporter.
041     */
042    public List<FileFilter> getFileFilters();
043
044    /**
045     * Save the specified sequence in the specified file.<br>
046     * 
047     * @param sequence
048     *        sequence to save
049     * @param path
050     *        file where we want to save sequence
051     * @param loadingFrame
052     *        progress bar (if available)
053     * @return <code>true</code> if the operation succeed
054     */
055    public boolean save(Sequence sequence, String path, FileFrame loadingFrame);
056}