package org.mbari.seepsearch.ui;

import java.awt.*;
import java.io.*;
import org.mbari.awt.layout.*;
import javax.swing.*;
import javax.swing.border.*;
import java.awt.event.*;
import java.util.Arrays;
import java.util.TreeSet;
import org.mbari.swing.FileOpenPanel1;
import org.mbari.swing.FileSavePanel1;

/**
 * <p><!--Insert summary here--></p>
 *
 * <p>The Seep Search project is a sub-project of the Continental
 * Margin Fluids and Gases project (200010). It involves the analysis of
 * archived ROV data to obtain understanding of seep distritution in Monterey
 * Bay.</p>
 *
 * <p>The Purpose of this Java package is to intercompare ROV Navigation files,
 * VIMS data on seep community observations and the EM-300 bathymetry. We are
 * looking for locations where the ROV navigation files and the EM-300 data
 * have similar depths between the 2 data sets, which implies that the ROV is
 * observing the sea floor.</p><hr><br>
 *
 * <p>MBARI provides this documentation and code &quot;as is&quot;, with no
 * warranty, express or implied, of its quality or consistency. It is provided
 * without support and without obligation on the part of the Monterey Bay
 * Aquarium Research Institute to assist in its use, correction, modification,
 * or enhancement. This information should not be published or distributed to
 * third parties without specific written permission from MBARI.</p><br>
 *
 * Copyright 2002 MBARI.<br>
 * MBARI Proprietary Information. All rights reserved.<br><hr><br>
 *
 * $Log: FileManagerPanel2.java,v $
 * Revision 1.1  2002/02/06 00:39:54  brian
 * Started developing a panel to connect to VARS
 *
 * Revision 1.1  2002/01/30 00:23:56  brian
 * Added comments to all classes and methods. Tested the accuracy of AsciiRasterGridReader and AsciiRasterGridWriter. Also checked the the GridUtil was populating the spatial grids correctly and accurately. The data files generated matched up perfectly with the orginal text files. Also implemented an RovAltitudeFilter class to encapsulate different filtering methods.
 *<br><hr><br>
 *
 * @author  : $Author: brian $
 * @version : $Revision: 1.1 $
 */
public class FileManagerPanel2 extends JPanel {
    final VerticalFlowLayout verticalFlowLayout1 = new VerticalFlowLayout();
    TitledBorder titledBorder3;
    final JFileChooser jFileChooser = new JFileChooser();
    protected final FileOpenPanel1 fileOpenPanel = new FileOpenPanel1();
    protected final FileSavePanel1 fileSavePanel = new FileSavePanel1();
    TitledBorder titledBorder4;

    public FileManagerPanel2() {
        try {
            jbInit();
        }
        catch(Exception ex) {
            ex.printStackTrace();
        }
    }
    void jbInit() throws Exception {
        titledBorder3 = new TitledBorder(BorderFactory.createEtchedBorder(Color.white,new Color(142, 142, 142)),"Specify Output Grid File");
        titledBorder4 = new TitledBorder(BorderFactory.createEtchedBorder(Color.white,new Color(142, 142, 142)),"Select Bathymetry Grid File");
        this.setLayout(verticalFlowLayout1);
        fileSavePanel.setBorder(titledBorder3);
        fileSavePanel.setChooser(jFileChooser);
        fileOpenPanel.setBorder(titledBorder4);
        fileOpenPanel.setChooser(jFileChooser);
        this.add(fileOpenPanel, null);
        this.add(fileSavePanel, null);

    }


    public File getInputFile() {
        return fileOpenPanel.getFile();
    }

    public File getOutputFile() {
        return fileSavePanel.getFile();
    }

}