
package usda.weru.util.wepsFileChooser2;

import de.schlichtherle.truezip.file.TFile;
import static java.awt.Dialog.ModalityType.*;
import java.awt.Dimension;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.File;
import usda.weru.remoteDataAccess.csip.CsipLmodUtil;
import usda.weru.remoteDataAccess.csip.CsipLmodUtil.lmodType;
import usda.weru.remoteDataAccess.remoteFiles.inetFile.CrLmodFile;
import usda.weru.util.About;
import usda.weru.util.ConfigData;
import usda.weru.util.wepsFileChooser2.WfcFileListTable.showFileNameType;
import usda.weru.weps.Weps;

/**
 *
 * @author mhaas
 */
public class WepsFileChooser2_n extends javax.swing.JDialog implements PropertyChangeListener {
    
    static final long serialVersionUID = 1L;

    protected WepsFileChooser2_n mainDlg;
    protected boolean persistSelectedFile;
    
    protected boolean isOperationChooser = false;
    protected boolean isCropChooser = false;
    protected boolean isSoilChooser = false;
    
    public WepsFileChooser2_n() {
        super();
        setModalityType(APPLICATION_MODAL);
        this.setAlwaysOnTop(true);
        init();
    }
    
    public WepsFileChooser2_n(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        init();
    }
    public WepsFileChooser2_n(java.awt.Window parent, boolean modal) {
//        Dialog.ModalityType modality = modal ? APPLICATION_MODAL : MODELESS;
        super(parent, modal ? APPLICATION_MODAL : MODELESS);
        init();
    }
    private void init() {

        persistSelectedFile = false;
        
        initComponents();
        
        // If there is a way to change the declaration and not do this here, I would do it.
        // Swing editor will break the .form file if changed outside of netbeans.
         if (JT_dirList.getColumnModel().getColumnCount() > 0) {
            JT_dirList.getColumnModel().getColumn(0).setMaxWidth(25);
            JT_dirList.getColumnModel().getColumn(0).setPreferredWidth(25);
         }
        
        mainDlg = this;

        setTitle("Weps File Chooser");
        
        JT_dirList.setup();
        
        // set defaults outside of contructor
        JCB_Path.setElements();

        // hook the path combo and the file display together
        JCB_Path.addPropertyChangeListener(JT_dirList);
        JCB_FileTypes.addPropertyChangeListener(JT_dirList);
        JT_dirList.addPropertyChangeListener(JCB_Path);
        JT_dirList.addPropertyChangeListener(this);
        
        hideFolderButtons();
        
        // set this minimum size for the whole filechooser so all components
        // stay on the screen at all times.
        Dimension minSize = new Dimension(800, 350);
        this.setMinimumSize(minSize);
    }
    
    /**
     * The folder buttons are the buttons for templates.
     * [ System T, Local T, Shared T, CRLmod T ]
     */
    private void hideFolderButtons() {
        loctemp_button.setVisible(false);
        systemp_button.setVisible(false);
        sharetemp_button.setVisible(false);
        crlmod_button.setVisible(false);
    }
    
    public void enableLocalTButtonOnly() {
        loctemp_button.setVisible(true);
    }
    
    public void enableFolderButtons() {
        //System.out.println("allowing buttons!");
        if(isOperationChooser) {
            loctemp_button.setVisible(ConfigData.checkParmValue(ConfigData.loopCheck, "1"));
            systemp_button.setVisible(ConfigData.checkParmValue(ConfigData.manOpDbCheck, "1"));
            sharetemp_button.setVisible(ConfigData.checkParmValue(ConfigData.shopCheck, "1"));
            crlmod_button.setVisible(ConfigData.checkParmValue(ConfigData.cropCheck, "1"));
        } else if(isCropChooser) {
            loctemp_button.setVisible(ConfigData.checkParmValue(ConfigData.locCropCheck, "1"));
            systemp_button.setVisible(ConfigData.checkParmValue(ConfigData.cropDbCheck, "1"));
            sharetemp_button.setVisible(ConfigData.checkParmValue(ConfigData.shaCropCheck, "1"));
            crlmod_button.setVisible(ConfigData.checkParmValue(ConfigData.crlmodCropCheck, "1"));
        } else {
            loctemp_button.setVisible(ConfigData.checkParmValue(ConfigData.locManTemp, "1"));
            systemp_button.setVisible(ConfigData.checkParmValue(ConfigData.sysManTemp, "1"));
            sharetemp_button.setVisible(ConfigData.checkParmValue(ConfigData.shaManTemp, "1"));
            crlmod_button.setVisible(ConfigData.checkParmValue(ConfigData.crlmodEnabled, "1"));
        }
    }
    
    public void enableFolderButtonsSave() {
        //System.out.println("allowing buttons!");
        if(isOperationChooser) {
            loctemp_button.setVisible(ConfigData.checkParmValue(ConfigData.loopCheck, "1"));
            systemp_button.setVisible(false);
            sharetemp_button.setVisible(ConfigData.checkParmValue(ConfigData.shopCheck, "1"));
            crlmod_button.setVisible(false);
        } else if(isCropChooser) {
            loctemp_button.setVisible(ConfigData.checkParmValue(ConfigData.locCropCheck, "1"));
            systemp_button.setVisible(false);
            sharetemp_button.setVisible(ConfigData.checkParmValue(ConfigData.shaCropCheck, "1"));
            crlmod_button.setVisible(false);
        } else {
           loctemp_button.setVisible(ConfigData.checkParmValue(ConfigData.locManTemp, "1"));
            systemp_button.setVisible(false);
            sharetemp_button.setVisible(ConfigData.checkParmValue(ConfigData.shaManTemp, "1"));
            crlmod_button.setVisible(false); 
        }
        
    }
    
    public void setPersistSelectedFile (boolean setVal) {
        persistSelectedFile = setVal;
    }
    
    protected void doSelectButtonAction () {
        
    }
    
    public void setOperationChooser() {
        isOperationChooser = true;
        loctemp_button.setText("Local Op");
        sharetemp_button.setText("Shared Op");
        systemp_button.setText("System Op");
        crlmod_button.setText("CRLMOD Op");
    }
    
    public void setCropChooser() {
        isCropChooser = true;
        loctemp_button.setText("Local C/R");
        sharetemp_button.setText("Shared C/R");
        systemp_button.setText("System C/R");
        crlmod_button.setText("CRLMOD C/R");
    }
    
    public void setSoilChooser() {
        isSoilChooser = true;
        loctemp_button.setText("Local Soil");
    }
    
    /**
     * This handles the selecting of a file from the two ways it could be done. 
     * One is using the select button, the other is with a double click from the
     * interface.
     * @param evt 
     */
    @Override
    public void propertyChange(PropertyChangeEvent evt) {
        // Select button
        if (evt.getPropertyName().equals(WfcFileListTable.propChangeCmdStrFileSected)) {
            //File f = (File)evt.getNewValue();
//            JTF_SelectedFile.setText("");
            doSelectButtonAction();
        } else if (evt.getPropertyName().equals(WfcFileListTable.propChangeCmdSetFilename)) {
        // Double click fired
            showFileNameType type = null;
            if (evt.getOldValue() instanceof showFileNameType) {
                type = (showFileNameType)evt.getOldValue();
            }
            File f = (File)evt.getNewValue();
//            System.out.println("New Path Value: " + f.getAbsolutePath() + " New name: "+ f.getName());
            if (f != null && !persistSelectedFile && (type == null || type == showFileNameType.Mouse)) {
                // Settin this to absolute or canonical will brick the fileChooser. Path will double itself
                if(!hasRunDir(f)){
                    // This stops the adding of a Runs folder when making weps run.
                    JTF_SelectedFile.setText("");
                }else{
                    JTF_SelectedFile.setText(f.getName());
                }
            }
        }
    }
    
    /*
    * This Helps to check if there is an extra "Runs" Directory that is 
        about to be added.
    */
    private boolean hasRunDir(File file){
        File[] list = file.listFiles();
        if(list!=null)
        for (File fil : list){
            if ("Runs".equalsIgnoreCase(fil.getName())){
                return true;
            }
        }
        return false;
    }
    
    protected void close () {
        dispose();
    }
    
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings({"unchecked","rawtypes", "serial"})
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        JB_Close = new javax.swing.JButton();
        JB_Select = new javax.swing.JButton();
        JCB_Path = new usda.weru.util.wepsFileChooser2.WfcPathComboBox();
        JB_Details = new javax.swing.JToggleButton();
        jLabel3 = new javax.swing.JLabel();
        JTF_SelectedFile = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        JCB_FileTypes = new usda.weru.util.wepsFileChooser2.WfcFileTypeComboBox();
        JL_CustomMessage = new javax.swing.JLabel();
        JSCP_DirPane = new javax.swing.JScrollPane();
        JT_dirList = new usda.weru.util.wepsFileChooser2.WfcFileListTable();
        jLabel2 = new javax.swing.JLabel();
        filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(18, 18), new java.awt.Dimension(18, 18), new java.awt.Dimension(18, 18));
        JB_ProjDir = new javax.swing.JButton();
        JB_HomeDir = new javax.swing.JButton();
        JP_Accessory = new javax.swing.JPanel();
        JB_UpDir = new javax.swing.JButton();
        JB_DefaultDir = new javax.swing.JButton();
        systemp_button = new javax.swing.JButton();
        loctemp_button = new javax.swing.JButton();
        sharetemp_button = new javax.swing.JButton();
        crlmod_button = new javax.swing.JButton();
        JB_dbDir = new javax.swing.JButton();
        Display_path_label = new javax.swing.JLabel();
        JB_newDir = new javax.swing.JButton();
        JB_DefaultDir1 = new javax.swing.JButton();
        jCheckBoxRecursive = new javax.swing.JCheckBox();
        jCheckBoxInPlace = new javax.swing.JCheckBox();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setMinimumSize(new java.awt.Dimension(0, 291));
        setModal(true);
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent evt) {
                formWindowClosing(evt);
            }
        });

        JB_Close.setText("Cancel");
        JB_Close.setMargin(new java.awt.Insets(2, 8, 2, 8));
        JB_Close.setMaximumSize(new java.awt.Dimension(200, 25));
        JB_Close.setMinimumSize(new java.awt.Dimension(70, 25));
        JB_Close.setPreferredSize(new java.awt.Dimension(70, 25));
        JB_Close.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JB_CloseActionPerformed(evt);
            }
        });

        JB_Select.setText("Select");
        JB_Select.setMargin(new java.awt.Insets(2, 8, 2, 8));
        JB_Select.setMaximumSize(new java.awt.Dimension(200, 25));
        JB_Select.setMinimumSize(new java.awt.Dimension(70, 25));
        JB_Select.setPreferredSize(new java.awt.Dimension(70, 25));
        JB_Select.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JB_SelectActionPerformed(evt);
            }
        });
        JB_Select.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                JB_SelectPropertyChange(evt);
            }
        });

        JCB_Path.setEditable(true);
        JCB_Path.setToolTipText(JCB_Path.getSelectedDir().getAbsolutePath());

        JB_Details.setFont(new java.awt.Font("Tahoma", 0, 9)); // NOI18N
        JB_Details.setText("List Details");
        JB_Details.setMaximumSize(new java.awt.Dimension(53, 27));
        JB_Details.setMinimumSize(new java.awt.Dimension(53, 27));
        JB_Details.setPreferredSize(new java.awt.Dimension(53, 27));
        JB_Details.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JB_DetailsActionPerformed(evt);
            }
        });

        jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel3.setText("File:  ");
        jLabel3.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
        jLabel3.setPreferredSize(new java.awt.Dimension(24, 18));

        JTF_SelectedFile.setMargin(new java.awt.Insets(2, 2, 0, 2));

        jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel5.setText("File types: ");
        jLabel5.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);

        JCB_FileTypes.setEditable(true);
        JCB_FileTypes.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                JCB_FileTypesPropertyChange(evt);
            }
        });

        JL_CustomMessage.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        JL_CustomMessage.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);

        JSCP_DirPane.setToolTipText("");

        JT_dirList.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "icon", "name", "type", "date", "size (bytes)"
            }
        ) {
            Class[] types = new Class [] {
                javax.swing.ImageIcon.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        JT_dirList.setColumnSelectionAllowed(true);
        JT_dirList.setIntercellSpacing(new java.awt.Dimension(5, 1));
        JT_dirList.setShowHorizontalLines(false);
        JSCP_DirPane.setViewportView(JT_dirList);
        JT_dirList.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        if (JT_dirList.getColumnModel().getColumnCount() > 0) {
            JT_dirList.getColumnModel().getColumn(0).setPreferredWidth(6);
            JT_dirList.getColumnModel().getColumn(0).setMaxWidth(6);
            JT_dirList.getColumnModel().getColumn(1).setPreferredWidth(600);
            JT_dirList.getColumnModel().getColumn(2).setMinWidth(36);
            JT_dirList.getColumnModel().getColumn(2).setPreferredWidth(36);
            JT_dirList.getColumnModel().getColumn(3).setMinWidth(172);
            JT_dirList.getColumnModel().getColumn(3).setPreferredWidth(172);
            JT_dirList.getColumnModel().getColumn(4).setMinWidth(72);
            JT_dirList.getColumnModel().getColumn(4).setPreferredWidth(72);
        }

        jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel2.setText("Path: ");
        jLabel2.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);

        JB_ProjDir.setFont(new java.awt.Font("Tahoma", 0, 9)); // NOI18N
        JB_ProjDir.setText("Proj Dir");
        JB_ProjDir.setToolTipText("Project Directory");
        JB_ProjDir.setMargin(new java.awt.Insets(2, 2, 2, 2));
        JB_ProjDir.setMaximumSize(new java.awt.Dimension(41, 27));
        JB_ProjDir.setMinimumSize(new java.awt.Dimension(41, 27));
        JB_ProjDir.setPreferredSize(new java.awt.Dimension(41, 27));
        JB_ProjDir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JB_projDirActionPerformed(evt);
            }
        });

        JB_HomeDir.setFont(new java.awt.Font("Tahoma", 0, 9)); // NOI18N
        JB_HomeDir.setText("Home");
        JB_HomeDir.setToolTipText("Home Directory");
        JB_HomeDir.setMargin(new java.awt.Insets(2, 2, 2, 2));
        JB_HomeDir.setMaximumSize(new java.awt.Dimension(33, 27));
        JB_HomeDir.setMinimumSize(new java.awt.Dimension(33, 27));
        JB_HomeDir.setPreferredSize(new java.awt.Dimension(33, 27));
        JB_HomeDir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JB_HomeDirActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout JP_AccessoryLayout = new javax.swing.GroupLayout(JP_Accessory);
        JP_Accessory.setLayout(JP_AccessoryLayout);
        JP_AccessoryLayout.setHorizontalGroup(
            JP_AccessoryLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        JP_AccessoryLayout.setVerticalGroup(
            JP_AccessoryLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 11, Short.MAX_VALUE)
        );

        JB_UpDir.setFont(new java.awt.Font("Tahoma", 0, 9)); // NOI18N
        JB_UpDir.setIcon(new javax.swing.ImageIcon(getClass().getResource("/usda/weru/resources/updir.gif"))); // NOI18N
        JB_UpDir.setToolTipText("Up Directory");
        JB_UpDir.setMargin(new java.awt.Insets(2, 2, 2, 2));
        JB_UpDir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JB_UpDirActionPerformed(evt);
            }
        });

        JB_DefaultDir.setFont(new java.awt.Font("Tahoma", 0, 9)); // NOI18N
        JB_DefaultDir.setText("Cfg Def Loc");
        JB_DefaultDir.setToolTipText("Config Default Location");
        JB_DefaultDir.setMargin(new java.awt.Insets(2, 2, 2, 2));
        JB_DefaultDir.setMaximumSize(new java.awt.Dimension(39, 27));
        JB_DefaultDir.setMinimumSize(new java.awt.Dimension(39, 27));
        JB_DefaultDir.setPreferredSize(new java.awt.Dimension(39, 27));
        JB_DefaultDir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JB_DefaultDirActionPerformed(evt);
            }
        });

        systemp_button.setFont(new java.awt.Font("Tahoma", 0, 9)); // NOI18N
        systemp_button.setText("System T");
        systemp_button.setToolTipText("System Templates");
        systemp_button.setMargin(new java.awt.Insets(2, 2, 2, 2));
        systemp_button.setMaximumSize(new java.awt.Dimension(27, 27));
        systemp_button.setMinimumSize(new java.awt.Dimension(27, 27));
        systemp_button.setPreferredSize(new java.awt.Dimension(27, 27));
        systemp_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JB_SysTempActionPerformed(evt);
            }
        });

        loctemp_button.setFont(new java.awt.Font("Tahoma", 0, 9)); // NOI18N
        loctemp_button.setText("Local T");
        loctemp_button.setToolTipText("Local Templates");
        loctemp_button.setMargin(new java.awt.Insets(2, 2, 2, 2));
        loctemp_button.setMaximumSize(new java.awt.Dimension(66, 27));
        loctemp_button.setMinimumSize(new java.awt.Dimension(66, 27));
        loctemp_button.setPreferredSize(new java.awt.Dimension(66, 27));
        loctemp_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JB_LocTempActionPerformed(evt);
            }
        });

        sharetemp_button.setFont(new java.awt.Font("Tahoma", 0, 9)); // NOI18N
        sharetemp_button.setText("Shared T");
        sharetemp_button.setToolTipText("Shared Templates");
        sharetemp_button.setMargin(new java.awt.Insets(2, 2, 2, 2));
        sharetemp_button.setMaximumSize(new java.awt.Dimension(75, 27));
        sharetemp_button.setMinimumSize(new java.awt.Dimension(75, 27));
        sharetemp_button.setPreferredSize(new java.awt.Dimension(75, 27));
        sharetemp_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JB_ShaTempActionPerformed(evt);
            }
        });

        crlmod_button.setFont(new java.awt.Font("Tahoma", 0, 9)); // NOI18N
        crlmod_button.setText("CRLMOD T");
        crlmod_button.setMargin(new java.awt.Insets(2, 2, 2, 2));
        crlmod_button.setMaximumSize(new java.awt.Dimension(55, 27));
        crlmod_button.setMinimumSize(new java.awt.Dimension(55, 27));
        crlmod_button.setPreferredSize(new java.awt.Dimension(55, 27));
        crlmod_button.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JB_CrLmodActionPerformed(evt);
            }
        });

        JB_dbDir.setFont(new java.awt.Font("Tahoma", 0, 9)); // NOI18N
        JB_dbDir.setText("Database");
        JB_dbDir.setMargin(new java.awt.Insets(2, 2, 2, 2));
        JB_dbDir.setMaximumSize(new java.awt.Dimension(79, 27));
        JB_dbDir.setMinimumSize(new java.awt.Dimension(79, 27));
        JB_dbDir.setPreferredSize(new java.awt.Dimension(79, 27));
        JB_dbDir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JB_dbDirActionPerformed(evt);
            }
        });

        Display_path_label.setText("PATH");

        JB_newDir.setIcon(new javax.swing.ImageIcon(getClass().getResource("/usda/weru/resources/folder.gif"))); // NOI18N
        JB_newDir.setToolTipText("New Directory");
        JB_newDir.setMargin(new java.awt.Insets(2, 2, 2, 2));
        JB_newDir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JB_newDirActionPerformed(evt);
            }
        });

        JB_DefaultDir1.setFont(new java.awt.Font("Tahoma", 0, 9)); // NOI18N
        JB_DefaultDir1.setText("Def Loc");
        JB_DefaultDir1.setToolTipText("Default Location");
        JB_DefaultDir1.setMargin(new java.awt.Insets(2, 2, 2, 2));
        JB_DefaultDir1.setMaximumSize(new java.awt.Dimension(39, 27));
        JB_DefaultDir1.setMinimumSize(new java.awt.Dimension(39, 27));
        JB_DefaultDir1.setPreferredSize(new java.awt.Dimension(39, 27));
        JB_DefaultDir1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                JB_DefaultDir1ActionPerformed(evt);
            }
        });

        jCheckBoxRecursive.setFont(new java.awt.Font("Segoe UI", 1, 12)); // NOI18N
        jCheckBoxRecursive.setText("Recursive");
        jCheckBoxRecursive.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);

        jCheckBoxInPlace.setVisible(false);
        jCheckBoxInPlace.setFont(new java.awt.Font("Segoe UI", 1, 12)); // NOI18N
        jCheckBoxInPlace.setText("In Place");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(filler1, javax.swing.GroupLayout.PREFERRED_SIZE, 8, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(JCB_FileTypes, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(JTF_SelectedFile))
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(JB_Close, javax.swing.GroupLayout.DEFAULT_SIZE, 116, Short.MAX_VALUE)
                            .addComponent(JB_Select, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel2)
                            .addComponent(JB_DefaultDir1, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(Display_path_label)
                                .addGap(0, 0, Short.MAX_VALUE))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(JB_DefaultDir, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(systemp_button, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(loctemp_button, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(sharetemp_button, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(crlmod_button, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(JB_dbDir, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(JB_ProjDir, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(JB_HomeDir, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 32, Short.MAX_VALUE)
                                .addComponent(jCheckBoxRecursive, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jCheckBoxInPlace)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(JB_newDir, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(JB_UpDir)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(JB_Details, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(JCB_Path, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                    .addComponent(JSCP_DirPane))
                .addGap(18, 18, 18)
                .addComponent(JP_Accessory, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGroup(layout.createSequentialGroup()
                .addGap(120, 120, 120)
                .addComponent(JL_CustomMessage, javax.swing.GroupLayout.PREFERRED_SIZE, 528, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(JL_CustomMessage, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel2)
                    .addComponent(JCB_Path, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addComponent(Display_path_label)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(JB_DefaultDir, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(systemp_button, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(loctemp_button, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(sharetemp_button, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(crlmod_button, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(JB_dbDir, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(JB_ProjDir, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(JB_HomeDir, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(JB_DefaultDir1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jCheckBoxInPlace)
                                .addComponent(jCheckBoxRecursive))
                            .addComponent(JB_UpDir, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(JB_newDir, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(JB_Details, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(JP_Accessory, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGap(85, 85, 85))
                    .addComponent(JSCP_DirPane, javax.swing.GroupLayout.DEFAULT_SIZE, 96, Short.MAX_VALUE))
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                            .addComponent(JTF_SelectedFile, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(JB_Select, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(JCB_FileTypes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel5)
                            .addComponent(JB_Close, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(49, 49, 49)
                        .addComponent(filler1, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE))))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void JB_CloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JB_CloseActionPerformed
        close();
    }//GEN-LAST:event_JB_CloseActionPerformed

    private void JB_SelectActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JB_SelectActionPerformed
        doSelectButtonAction();
    }//GEN-LAST:event_JB_SelectActionPerformed

    private void JB_DetailsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JB_DetailsActionPerformed
        JT_dirList.showDetails(JB_Details.isSelected());
    }//GEN-LAST:event_JB_DetailsActionPerformed

    private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing
        //
    }//GEN-LAST:event_formWindowClosing

    private void JB_projDirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JB_projDirActionPerformed
        JCB_Path.selectProjDir();
        JT_dirList.fireClearFilename(showFileNameType.Mouse);
    }//GEN-LAST:event_JB_projDirActionPerformed

    private void JB_HomeDirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JB_HomeDirActionPerformed
        JCB_Path.selectHomeDir();
        JT_dirList.fireClearFilename(showFileNameType.Mouse);
    }//GEN-LAST:event_JB_HomeDirActionPerformed

    private void JB_UpDirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JB_UpDirActionPerformed
        JCB_Path.upOneDir();
        JT_dirList.fireClearFilename(showFileNameType.Mouse);
    }//GEN-LAST:event_JB_UpDirActionPerformed

    
    
    
    public boolean crlmoded = false;
    /**
     * Set the directory for clicking the "Def Loc" or default location button
     * in the file chooser. Does not set the initial directory the file chooser
     * opens up into!
     *
     * @param file
     */
    public void setCrlmodBool( boolean crlbool) {
        crlmoded = crlbool;
    }
    public boolean getCrlmodBool(){
        return crlmoded;
    }
    private void JB_DefaultDirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JB_DefaultDirActionPerformed
        
        
        if(this.JL_CustomMessage.getText().contains("Select")
                &&this.JL_CustomMessage.getText().contains("Run")){
            JCB_Path.selectProjDir();
            JCB_Path.selectDir(new TFile(JCB_Path.selectedItem.file.getPath(),"Runs").getAbsolutePath());
            
        }else{
            JCB_Path.selectDefaultDir();
        }
        
        if(!this.persistSelectedFile) {
            JTF_SelectedFile.setText("");
        }     
        
    }//GEN-LAST:event_JB_DefaultDirActionPerformed

    private void JB_SelectPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_JB_SelectPropertyChange
        if (evt.getPropertyName().contentEquals("text")) {
            int diff = JB_Select.getPreferredSize().width - JB_Select.getSize().width;
            if (diff > 0) {
                Dimension d = this.getSize();
                d.width += diff + 6;
                this.setSize(d);
            }
        }
    }//GEN-LAST:event_JB_SelectPropertyChange

    private void JB_SysTempActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JB_SysTempActionPerformed
        if(isOperationChooser) {
            System.out.println("Loading System Operation Location");
            JCB_Path.selectDir(Weps.getInstance().cd.getData(ConfigData.SystemOpDB));
        } else if(isCropChooser) {
            System.out.println("Loading System Crop Location");
            JCB_Path.selectDir(Weps.getInstance().cd.getData(ConfigData.SystemCropDB));
        } else {
            System.out.println("Loading System Management Location");
            JCB_Path.selectDir(Weps.getInstance().cd.getData(ConfigData.ManTemp));
        }
    }//GEN-LAST:event_JB_SysTempActionPerformed

    private void JB_LocTempActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JB_LocTempActionPerformed
        if (isOperationChooser) {
            System.out.println("Loading Local Operation Location");
            JCB_Path.selectDir(Weps.getInstance().cd.getData(ConfigData.LocalOpDB));
        } else if (isCropChooser) {
            System.out.println("Loading Local Crop Location");
            JCB_Path.selectDir(Weps.getInstance().cd.getData(ConfigData.LocalCropDB));
        } else if (isSoilChooser) {
            System.out.println("Loading Local Soil Location");
            JCB_Path.selectDir(Weps.getInstance().cd.getData(ConfigData.LocalSoilDB));
        } else {
            System.out.println("Loading Local Management Location");
            JCB_Path.selectDir(Weps.getInstance().cd.getData(ConfigData.LocalManDB));
        }
    }//GEN-LAST:event_JB_LocTempActionPerformed

    private void JB_ShaTempActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JB_ShaTempActionPerformed
        if(isOperationChooser) {
            System.out.println("Loading Shared Operation Location");
            JCB_Path.selectDir(Weps.getInstance().cd.getData(ConfigData.shopLocation));
        } else if(isCropChooser) {
            System.out.println("Loading Shared Crop Location");
            JCB_Path.selectDir(Weps.getInstance().cd.getData(ConfigData.localResidueRecords));
        } else {
            System.out.println("Loading Shared Management Location");
            JCB_Path.selectDir(Weps.getInstance().cd.getData(ConfigData.SharedManDB));
        }
    }//GEN-LAST:event_JB_ShaTempActionPerformed

    private void JB_CrLmodActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JB_CrLmodActionPerformed
        File rootFile;
        if(isOperationChooser) {
            boolean uncategorized = ConfigData.checkParmValue(ConfigData.noCat,"1");
            if(uncategorized){
                TFile uncatFolder = new TFile(About.getOpDirUncat());
                JCB_Path.addAndSelectItem(uncatFolder);
            }else{
                rootFile = new CrLmodFile("CRLMOD Operations", lmodType.lmodOperation);
                rootFile.listFiles();
                JCB_Path.addAndSelectItem(rootFile);
            }
        } else if(isCropChooser) {
            System.out.println("Loading CRLMOD Crop Location");
            //rootFile = new CrLmodFile("CrLmod Crops and Residues", lmodType.lmodCrop);
            rootFile = new TFile(About.getWepsCacheDir(), CsipLmodUtil.WepsCacheDirNameCrop);
            //rootFile.listFiles();
            JCB_Path.addAndSelectItem(rootFile);
        } else {
            System.out.println("Loading CRLMOD Management Location");
            rootFile = new CrLmodFile("CRLMOD Managements", lmodType.lmodManagement);
            rootFile.listFiles();
            JCB_Path.addAndSelectItem(rootFile);
        }
    }//GEN-LAST:event_JB_CrLmodActionPerformed

    public void defaultToCrLmod() {
        File rootFile;
        if(isOperationChooser) {
            boolean uncategorized = ConfigData.checkParmValue(ConfigData.noCat,"1");
            if(uncategorized){
                System.out.println("Loading CRLMOD Uncat Operation Location");
//                TFile uncatFolder = new TFile(About.getOpDirUncat());
                rootFile = new TFile(About.getOpDirUncat());
            }else{
                System.out.println("Loading CRLMOD Operation Location");
                rootFile = new CrLmodFile("CRLMOD Operations", lmodType.lmodOperation);
            }
//            System.out.println("Loading CRLMOD Operation Location");
//            rootFile = new CrLmodFile("CRLMOD Operations", lmodType.lmodOperation);
        } else if(isCropChooser) {
            System.out.println("Loading CRLMOD Crop Location");
            rootFile = new TFile(About.getWepsCacheDir(), CsipLmodUtil.WepsCacheDirNameCrop);
        } else {
            System.out.println("Loading CRLMOD Management Location");
            rootFile = new CrLmodFile("CRLMOD Managements", lmodType.lmodManagement);
        }
        rootFile.listFiles();
        JCB_Path.addAndSelectItem(rootFile);
    }
    private int counter = 0;
    private void JCB_FileTypesPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_JCB_FileTypesPropertyChange
        fileTypesAction();
    }//GEN-LAST:event_JCB_FileTypesPropertyChange

    private void JB_dbDirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JB_dbDirActionPerformed
        JCB_Path.selectDbDir();
    }//GEN-LAST:event_JB_dbDirActionPerformed

    private void JB_newDirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JB_newDirActionPerformed
        createNewDirectory();
    }//GEN-LAST:event_JB_newDirActionPerformed

    private void JB_DefaultDir1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_JB_DefaultDir1ActionPerformed
        // this is what happens if there is crlmod for operations       
        if(this.getCrlmodBool()){
            
            JB_CrLmodActionPerformed(evt);
        }else{
        if((this.JL_CustomMessage.getText().contains("Delete")||(this.JL_CustomMessage.getText().contains("Select")))
                &&this.JL_CustomMessage.getText().contains("Run")){
            JCB_Path.selectDefaultDir();//.selectConfDefaultDir();
            
        }else if((this.JL_CustomMessage.getText().contains("Delete"))
                &&this.JL_CustomMessage.getText().contains("Management")){
            JCB_Path.selectDefaultDir();//.selectConfDefaultDir();
            
        }else if((this.JL_CustomMessage.getText().contains("Delete"))
                &&this.JL_CustomMessage.getText().contains("Soil File")){
            JCB_Path.selectDefaultDir();//.selectConfDefaultDir();
            
        }
        else{
//            JCB_Path.selectProjParentDir();
            JCB_Path.selectDefaultDir();
        }
        if(!this.persistSelectedFile) {
            JTF_SelectedFile.setText("");
        }
        }
    }//GEN-LAST:event_JB_DefaultDir1ActionPerformed

    protected void createNewDirectory() {
        
    }
    
    public void setDBDir(File dbDir) {
        JCB_Path.setDbDir(dbDir);
    }
    
    protected void fileTypesAction() {
        
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    public javax.swing.JLabel Display_path_label;
    private javax.swing.JButton JB_Close;
    public javax.swing.JButton JB_DefaultDir;
    private javax.swing.JButton JB_DefaultDir1;
    private javax.swing.JToggleButton JB_Details;
    protected javax.swing.JButton JB_HomeDir;
    private javax.swing.JButton JB_ProjDir;
    protected javax.swing.JButton JB_Select;
    protected javax.swing.JButton JB_UpDir;
    protected javax.swing.JButton JB_dbDir;
    protected javax.swing.JButton JB_newDir;
    protected usda.weru.util.wepsFileChooser2.WfcFileTypeComboBox JCB_FileTypes;
    protected usda.weru.util.wepsFileChooser2.WfcPathComboBox JCB_Path;
    protected javax.swing.JLabel JL_CustomMessage;
    protected javax.swing.JPanel JP_Accessory;
    private javax.swing.JScrollPane JSCP_DirPane;
    protected javax.swing.JTextField JTF_SelectedFile;
    protected usda.weru.util.wepsFileChooser2.WfcFileListTable JT_dirList;
    public javax.swing.JButton crlmod_button;
    private javax.swing.Box.Filler filler1;
    public javax.swing.JCheckBox jCheckBoxInPlace;
    public javax.swing.JCheckBox jCheckBoxRecursive;
    private javax.swing.JLabel jLabel2;
    protected javax.swing.JLabel jLabel3;
    protected javax.swing.JLabel jLabel5;
    public javax.swing.JButton loctemp_button;
    public javax.swing.JButton sharetemp_button;
    public javax.swing.JButton systemp_button;
    // End of variables declaration//GEN-END:variables
}
