private void editConfigurationFileMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_editConfigurationFileMenuItemActionPerformed
        //
        int returnVal = fileChooser.showOpenDialog(this);
        //
        if (returnVal == JFileChooser.APPROVE_OPTION) 
        {
            //
            File vesselConfigurationXmlFile = fileChooser.getSelectedFile();
            //
            final String file_string = vesselConfigurationXmlFile.getAbsolutePath();
            //
            DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
            //
            try 
            {
                //
                DocumentBuilder dbuilder = dbFactory.newDocumentBuilder();
                //
                Document doc = dbuilder.parse(vesselConfigurationXmlFile);
                //
                doc.getDocumentElement().normalize();
                //
                final NodeList configurationFile = doc.getElementsByTagName("configurationFile");
                //This could be "pmsfsa" for example.
                Node configurationCode = configurationFile.item(0);
                //
                Element configurationCodeElement = (Element) configurationCode;
                //
                float meter_to_count_unit_conversion_factor=(float) 5.4;
                //
                switch (configurationCodeElement.getElementsByTagName("configurationCode").item(0).getTextContent()) 
                {
                    //
                    case "\"pfsmpa\"":
                    {
                        //Open the vessel configuration file editor.
                        java.awt.EventQueue.invokeLater(new Runnable() 
                        {
                           /*
                            * Description:
                            *
                            * Example:
                            *
                            * Status:
                            */
                            @Override
                            public void run() 
                            {
                                //
                                Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
                                //
                                Configuration dialog = new Configuration(new javax.swing.JFrame(), true);
                                //
                                dialog.setLocation((dim.width-dialog.getContentPane().getWidth())/2, (dim.height-dialog.getContentPane().getHeight())/2);
                                //
                                dialog.addWindowListener(new java.awt.event.WindowAdapter() 
                                {
                                    //
                                });
                                //
                                
                                //
                                Element configurationFileNameElement = (Element) configurationFile.item(0);
                                //
                                Element port_forward_distance_to_ocean_surface_element = (Element) configurationFile.item(0);
                                //
                                Element port_forward_distance_to_starboard_middle_element = (Element) configurationFile.item(0);
                                //
                                Element port_aft_distance_to_ocean_surface_element = (Element) configurationFile.item(0);
                                //
                                Element port_aft_distance_to_port_forward_element = (Element) configurationFile.item(0);
                                //
                                Element starboard_middle_distance_to_ocean_surface_element = (Element) configurationFile.item(0);
                                //
                                Element starboard_middle_distance_to_port_aft_element = (Element) configurationFile.item(0);
                                //
                                Element alongship_distance_to_port_forward_element = (Element) configurationFile.item(0);
                                //
                                Element distance_from_center_line_element = (Element) configurationFile.item(0);
                                //
                                Element transducer_depth_element = (Element) configurationFile.item(0);
                                //
                                Element depth_of_echosounder_view_centroid_element = (Element) configurationFile.item(0);
                                //
                                Element vessel_width_element = (Element) configurationFile.item(0);
                                
                                Configuration.port_forward_checkbox.setSelected(true);
                                
                                Configuration.starboard_middle_checkbox.setSelected(true);
                                
                                Configuration.port_aft_checkbox.setSelected(true);
                                //
                                Configuration.portForwardHeightFromOceanTextfield.setText(port_forward_distance_to_ocean_surface_element.getElementsByTagName("port_forward_distance_to_ocean_surface").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.portAftHeightFromOceanTextfield.setText(starboard_middle_distance_to_ocean_surface_element.getElementsByTagName("starboard_middle_distance_to_ocean_surface").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.starboardMiddleHeightFromOceanTextfield.setText(port_aft_distance_to_ocean_surface_element.getElementsByTagName("port_aft_distance_to_ocean_surface").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.firstRelativeDistanceInputTextfield.setText(port_forward_distance_to_starboard_middle_element.getElementsByTagName("port_forward_distance_to_starboard_middle").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.secondRelativeDistanceInputTextfield.setText(starboard_middle_distance_to_port_aft_element.getElementsByTagName("starboard_middle_distance_to_port_aft").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.thirdRelativeDistanceInputTextfield.setText(port_aft_distance_to_port_forward_element.getElementsByTagName("port_aft_distance_to_port_forward").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.transducerDepthInputTextfield.setText(transducer_depth_element.getElementsByTagName("transducer_depth").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.targetSphereDepthInputTextfield.setText(depth_of_echosounder_view_centroid_element.getElementsByTagName("depth_of_echosounder_view_centroid").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.alongShipInputTextfield.setText(alongship_distance_to_port_forward_element.getElementsByTagName("alongship_distance_to_port_forward").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.transducerToCenterlineDistanceInputTextfield.setText(distance_from_center_line_element.getElementsByTagName("distance_from_center_line").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.vesselWidthInputTextfield.setText(vessel_width_element.getElementsByTagName("vessel_width").item(0).getTextContent().split("\"")[1]);
                                //configurationFileNameElement
                                Configuration.fileNameInputTextfield.setText(configurationFileNameElement.getElementsByTagName("configurationFileName").item(0).getTextContent().split("\"")[1]);
                                
                                //Enables the relevent fields for the chosen vessel configuration.
                                Configuration.vesselConfigurationSetup();
                                //Enables the height from the ocean input fields if the corresponding downrigger location is chosen.
                                Configuration.OceanHeightTextfieldEnablerSwitch();
                                //
                                dialog.setTitle("Edit Vessel Configuration File");
                                //
                                dialog.setVisible(true);
                            }
                        });
                        //Breaks out of case statement.
                        break;
                    }
                    //In the case of a port middle - starboard forward - starboard aft configuration.
                    case "\"pmsfsa\"":
                    {
                        //Open the vessel configuration file editor.
                        java.awt.EventQueue.invokeLater(new Runnable() 
                        {
                           /*
                            * Description:
                            *
                            * Example:
                            *
                            * Status:
                            */
                            @Override
                            public void run() 
                            {
                                //
                                Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
                                //
                                Configuration dialog = new Configuration(new javax.swing.JFrame(), true);
                                //
                                dialog.setLocation((dim.width-dialog.getContentPane().getWidth())/2, (dim.height-dialog.getContentPane().getHeight())/2);
                                //
                                dialog.addWindowListener(new java.awt.event.WindowAdapter() 
                                {
                                    //
                                });
                                //
                                
                                //
                                Element configurationFileNameElement = (Element) configurationFile.item(0);
                                //
                                Element port_middle_distance_to_ocean_surface_element = (Element) configurationFile.item(0);
                                //
                                Element port_middle_distance_to_starboard_forward_element = (Element) configurationFile.item(0);
                                //
                                Element starboard_forward_distance_to_ocean_surface_element = (Element) configurationFile.item(0);
                                //
                                Element starboard_forward_distance_to_starboard_aft_element = (Element) configurationFile.item(0);
                                //
                                Element starboard_aft_distance_to_ocean_surface_element = (Element) configurationFile.item(0);
                                //
                                Element starboard_aft_distance_to_port_middle_element = (Element) configurationFile.item(0);
                                //
                                Element alongship_distance_to_starboard_forward_element = (Element) configurationFile.item(0);
                                //
                                Element distance_from_center_line_element = (Element) configurationFile.item(0);
                                //
                                Element transducer_depth_element = (Element) configurationFile.item(0);
                                //
                                Element depth_of_echosounder_view_centroid_element = (Element) configurationFile.item(0);
                                //
                                Element vessel_width_element = (Element) configurationFile.item(0);
                                
                                Configuration.port_middle_checkbox.setSelected(true);
                                
                                Configuration.starboard_forward_checkbox.setSelected(true);
                                
                                Configuration.starboard_aft_checkbox.setSelected(true);
                                //
                                Configuration.portMiddleHeightFromOceanTextfield.setText(port_middle_distance_to_ocean_surface_element.getElementsByTagName("port_middle_distance_to_ocean_surface").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.starboardForwardHeightFromOceanTextfield.setText(starboard_forward_distance_to_ocean_surface_element.getElementsByTagName("starboard_forward_distance_to_ocean_surface").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.starboardAftHeightFromOceanTextfield.setText(starboard_aft_distance_to_ocean_surface_element.getElementsByTagName("starboard_aft_distance_to_ocean_surface").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.firstRelativeDistanceInputTextfield.setText(port_middle_distance_to_starboard_forward_element.getElementsByTagName("port_middle_distance_to_starboard_forward").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.secondRelativeDistanceInputTextfield.setText(starboard_forward_distance_to_starboard_aft_element.getElementsByTagName("starboard_forward_distance_to_starboard_aft").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.thirdRelativeDistanceInputTextfield.setText(starboard_aft_distance_to_port_middle_element.getElementsByTagName("starboard_aft_distance_to_port_middle").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.transducerDepthInputTextfield.setText(transducer_depth_element.getElementsByTagName("transducer_depth").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.targetSphereDepthInputTextfield.setText(depth_of_echosounder_view_centroid_element.getElementsByTagName("depth_of_echosounder_view_centroid").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.alongShipInputTextfield.setText(alongship_distance_to_starboard_forward_element.getElementsByTagName("alongship_distance_to_starboard_forward").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.transducerToCenterlineDistanceInputTextfield.setText(distance_from_center_line_element.getElementsByTagName("distance_from_center_line").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.vesselWidthInputTextfield.setText(vessel_width_element.getElementsByTagName("vessel_width").item(0).getTextContent().split("\"")[1]);
                                //configurationFileNameElement
                                Configuration.fileNameInputTextfield.setText(configurationFileNameElement.getElementsByTagName("configurationFileName").item(0).getTextContent().split("\"")[1]);
                                
                                //Enables the relevent fields for the chosen vessel configuration.
                                Configuration.vesselConfigurationSetup();
                                //Enables the height from the ocean input fields if the corresponding downrigger location is chosen.
                                Configuration.OceanHeightTextfieldEnablerSwitch();
                                dialog.setTitle("Edit Vessel Configuration File");
                                dialog.setVisible(true);
                            }
                        });
                        //Breaks out of case statement.
                        break;
                    }

                    case "\"pmsmsapa\"":
                    {
                        //Open the vessel configuration file editor.
                        java.awt.EventQueue.invokeLater(new Runnable() 
                        {
                           /*
                            * Description:
                            *
                            * Example:
                            *
                            * Status:
                            */
                            @Override
                            public void run() 
                            {
                                //
                                Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
                                //
                                Configuration dialog = new Configuration(new javax.swing.JFrame(), true);
                                //
                                dialog.setLocation((dim.width-dialog.getContentPane().getWidth())/2, (dim.height-dialog.getContentPane().getHeight())/2);
                                //
                                dialog.addWindowListener(new java.awt.event.WindowAdapter() 
                                {
                                    //
                                });
                                //
                                
                                //
                                Element configurationFileNameElement = (Element) configurationFile.item(0);
                                //
                                Element port_middle_distance_to_ocean_surface_element = (Element) configurationFile.item(0);
                                //
                                Element starboard_aft_distance_to_ocean_surface_element = (Element) configurationFile.item(0);
                                //
                                Element starboard_middle_distance_to_ocean_surface_element = (Element) configurationFile.item(0);
                                //
                                Element port_middle_distance_to_starboard_middle_element = (Element) configurationFile.item(0);
                                //
                                Element port_aft_distance_to_ocean_surface_element = (Element) configurationFile.item(0);
                                //
                                Element starboard_middle_distance_to_starboard_aft_element = (Element) configurationFile.item(0);
                                //
                                Element starboard_aft_distance_to_port_aft_element = (Element) configurationFile.item(0);
                                //
                                Element port_aft_distance_to_port_middle_element = (Element) configurationFile.item(0);
                                //
                                Element alongship_distance_to_port_middle_element = (Element) configurationFile.item(0);
                                //
                                Element distance_from_center_line_element = (Element) configurationFile.item(0);
                                //
                                Element transducer_depth_element = (Element) configurationFile.item(0);
                                //
                                Element depth_of_echosounder_view_centroid_element = (Element) configurationFile.item(0);
                                //
                                Element vessel_width_element = (Element) configurationFile.item(0);
                                
                                Configuration.port_middle_checkbox.setSelected(true);
                                
                                Configuration.starboard_middle_checkbox.setSelected(true);
                                
                                Configuration.starboard_aft_checkbox.setSelected(true);
                                                           
                                Configuration.port_aft_checkbox.setSelected(true);
                                //
                                Configuration.portMiddleHeightFromOceanTextfield.setText(port_middle_distance_to_ocean_surface_element.getElementsByTagName("port_middle_distance_to_ocean_surface").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.starboardMiddleHeightFromOceanTextfield.setText(starboard_middle_distance_to_ocean_surface_element.getElementsByTagName("starboard_middle_distance_to_ocean_surface").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.starboardAftHeightFromOceanTextfield.setText(starboard_aft_distance_to_ocean_surface_element.getElementsByTagName("starboard_aft_distance_to_ocean_surface").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.portAftHeightFromOceanTextfield.setText(port_aft_distance_to_ocean_surface_element.getElementsByTagName("port_aft_distance_to_ocean_surface").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.firstRelativeDistanceInputTextfield.setText(port_middle_distance_to_starboard_middle_element.getElementsByTagName("port_middle_distance_to_starboard_middle").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.secondRelativeDistanceInputTextfield.setText(starboard_middle_distance_to_starboard_aft_element.getElementsByTagName("starboard_middle_distance_to_starboard_aft").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.thirdRelativeDistanceInputTextfield.setText(starboard_aft_distance_to_port_aft_element.getElementsByTagName("starboard_aft_distance_to_port_aft").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.fourthRelativeDistanceInputTextfield.setText(port_aft_distance_to_port_middle_element.getElementsByTagName("port_aft_distance_to_port_middle").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.transducerDepthInputTextfield.setText(transducer_depth_element.getElementsByTagName("transducer_depth").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.targetSphereDepthInputTextfield.setText(depth_of_echosounder_view_centroid_element.getElementsByTagName("depth_of_echosounder_view_centroid").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.alongShipInputTextfield.setText(alongship_distance_to_port_middle_element.getElementsByTagName("alongship_distance_to_port_middle").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.transducerToCenterlineDistanceInputTextfield.setText(distance_from_center_line_element.getElementsByTagName("distance_from_center_line").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.vesselWidthInputTextfield.setText(vessel_width_element.getElementsByTagName("vessel_width").item(0).getTextContent().split("\"")[1]);
                                //configurationFileNameElement
                                Configuration.fileNameInputTextfield.setText(configurationFileNameElement.getElementsByTagName("configurationFileName").item(0).getTextContent().split("\"")[1]);
                                
                                //Enables the relevent fields for the chosen vessel configuration.
                                Configuration.vesselConfigurationSetup();
                                //Enables the height from the ocean input fields if the corresponding downrigger location is chosen.
                                Configuration.OceanHeightTextfieldEnablerSwitch();
                                dialog.setTitle("Edit Vessel Configuration File");
                                dialog.setVisible(true);
                            }
                        });
                        //Breaks out of case statement.
                        break;
                    }

                    case "\"pfsfsmpm\"":
                    {
                        //Open the vessel configuration file editor.
                        java.awt.EventQueue.invokeLater(new Runnable() 
                        {
                           /*
                            * Description:
                            *
                            * Example:
                            *
                            * Status:
                            */
                            @Override
                            public void run() 
                            {
                                //
                                Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
                                //
                                Configuration dialog = new Configuration(new javax.swing.JFrame(), true);
                                //
                                dialog.setLocation((dim.width-dialog.getContentPane().getWidth())/2, (dim.height-dialog.getContentPane().getHeight())/2);
                                //
                                dialog.addWindowListener(new java.awt.event.WindowAdapter() 
                                {
                                    //
                                });
                                //
                                
                                //
                                Element configurationFileNameElement = (Element) configurationFile.item(0);
                                //
                                Element port_forward_distance_to_ocean_surface_element = (Element) configurationFile.item(0);
                                //
                                Element starboard_forward_distance_to_ocean_surface_element = (Element) configurationFile.item(0);
                                //
                                Element starboard_middle_distance_to_ocean_surface_element = (Element) configurationFile.item(0);
                                //
                                Element port_forward_distance_to_starboard_forward_element = (Element) configurationFile.item(0);
                                //
                                Element port_middle_distance_to_ocean_surface_element = (Element) configurationFile.item(0);
                                //
                                Element starboard_forward_distance_to_starboard_middle_element = (Element) configurationFile.item(0);
                                //
                                Element starboard_middle_distance_to_port_middle_element = (Element) configurationFile.item(0);
                                //
                                Element port_middle_distance_to_port_forward_element = (Element) configurationFile.item(0);
                                //
                                Element alongship_distance_to_port_forward_element = (Element) configurationFile.item(0);
                                //
                                Element distance_from_center_line_element = (Element) configurationFile.item(0);
                                //
                                Element transducer_depth_element = (Element) configurationFile.item(0);
                                //
                                Element depth_of_echosounder_view_centroid_element = (Element) configurationFile.item(0);
                                //
                                Element vessel_width_element = (Element) configurationFile.item(0);
                                
                                Configuration.port_forward_checkbox.setSelected(true);
                                
                                Configuration.starboard_forward_checkbox.setSelected(true);
                                
                                Configuration.starboard_middle_checkbox.setSelected(true);
                                                           
                                Configuration.port_middle_checkbox.setSelected(true);
                                //
                                Configuration.portForwardHeightFromOceanTextfield.setText(port_forward_distance_to_ocean_surface_element.getElementsByTagName("port_forward_distance_to_ocean_surface").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.starboardForwardHeightFromOceanTextfield.setText(starboard_forward_distance_to_ocean_surface_element.getElementsByTagName("starboard_forward_distance_to_ocean_surface").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.starboardMiddleHeightFromOceanTextfield.setText(starboard_middle_distance_to_ocean_surface_element.getElementsByTagName("starboard_middle_distance_to_ocean_surface").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.portMiddleHeightFromOceanTextfield.setText(port_middle_distance_to_ocean_surface_element.getElementsByTagName("port_middle_distance_to_ocean_surface").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.firstRelativeDistanceInputTextfield.setText(port_forward_distance_to_starboard_forward_element.getElementsByTagName("port_forward_distance_to_starboard_forward").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.secondRelativeDistanceInputTextfield.setText(starboard_forward_distance_to_starboard_middle_element.getElementsByTagName("starboard_forward_distance_to_starboard_middle").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.thirdRelativeDistanceInputTextfield.setText(starboard_middle_distance_to_port_middle_element.getElementsByTagName("starboard_middle_distance_to_port_middle").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.fourthRelativeDistanceInputTextfield.setText(port_middle_distance_to_port_forward_element.getElementsByTagName("port_middle_distance_to_port_forward").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.transducerDepthInputTextfield.setText(transducer_depth_element.getElementsByTagName("transducer_depth").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.targetSphereDepthInputTextfield.setText(depth_of_echosounder_view_centroid_element.getElementsByTagName("depth_of_echosounder_view_centroid").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.alongShipInputTextfield.setText(alongship_distance_to_port_forward_element.getElementsByTagName("alongship_distance_to_port_forward").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.transducerToCenterlineDistanceInputTextfield.setText(distance_from_center_line_element.getElementsByTagName("distance_from_center_line").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.vesselWidthInputTextfield.setText(vessel_width_element.getElementsByTagName("vessel_width").item(0).getTextContent().split("\"")[1]);
                                //configurationFileNameElement
                                Configuration.fileNameInputTextfield.setText(configurationFileNameElement.getElementsByTagName("configurationFileName").item(0).getTextContent().split("\"")[1]);
                                
                                //Enables the relevent fields for the chosen vessel configuration.
                                Configuration.vesselConfigurationSetup();
                                //Enables the height from the ocean input fields if the corresponding downrigger location is chosen.
                                Configuration.OceanHeightTextfieldEnablerSwitch();
                                dialog.setTitle("Edit Vessel Configuration File");
                                dialog.setVisible(true);
                            }
                        });
                        //Breaks out of case statement.
                        break;
                    }

                    case "\"pfsfsapa\"":
                    {
                        //Open the vessel configuration file editor.
                        java.awt.EventQueue.invokeLater(new Runnable() 
                        {
                           /*
                            * Description:
                            *
                            * Example:
                            *
                            * Status:
                            */
                            @Override
                            public void run() 
                            {
                                //
                                Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
                                //
                                Configuration dialog = new Configuration(new javax.swing.JFrame(), true);
                                //
                                dialog.setLocation((dim.width-dialog.getContentPane().getWidth())/2, (dim.height-dialog.getContentPane().getHeight())/2);
                                //
                                dialog.addWindowListener(new java.awt.event.WindowAdapter() 
                                {
                                    //
                                });
                                //
                                
                                //
                                Element configurationFileNameElement = (Element) configurationFile.item(0);
                                //
                                Element port_forward_distance_to_ocean_surface_element = (Element) configurationFile.item(0);
                                //
                                Element starboard_forward_distance_to_ocean_surface_element = (Element) configurationFile.item(0);
                                //
                                Element starboard_aft_distance_to_ocean_surface_element = (Element) configurationFile.item(0);
                                //
                                Element port_forward_distance_to_starboard_forward_element = (Element) configurationFile.item(0);
                                //
                                Element port_aft_distance_to_ocean_surface_element = (Element) configurationFile.item(0);
                                //
                                Element starboard_forward_distance_to_starboard_aft_element = (Element) configurationFile.item(0);
                                //
                                Element starboard_aft_distance_to_port_aft_element = (Element) configurationFile.item(0);
                                //
                                Element port_aft_distance_to_port_forward_element = (Element) configurationFile.item(0);
                                //
                                Element alongship_distance_to_port_forward_element = (Element) configurationFile.item(0);
                                //
                                Element distance_from_center_line_element = (Element) configurationFile.item(0);
                                //
                                Element transducer_depth_element = (Element) configurationFile.item(0);
                                //
                                Element depth_of_echosounder_view_centroid_element = (Element) configurationFile.item(0);
                                //
                                Element vessel_width_element = (Element) configurationFile.item(0);
                                
                                Configuration.port_forward_checkbox.setSelected(true);
                                
                                Configuration.starboard_forward_checkbox.setSelected(true);
                                
                                Configuration.starboard_aft_checkbox.setSelected(true);
                                                           
                                Configuration.port_aft_checkbox.setSelected(true);
                                //
                                Configuration.portForwardHeightFromOceanTextfield.setText(port_forward_distance_to_ocean_surface_element.getElementsByTagName("port_forward_distance_to_ocean_surface").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.starboardForwardHeightFromOceanTextfield.setText(starboard_forward_distance_to_ocean_surface_element.getElementsByTagName("starboard_forward_distance_to_ocean_surface").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.starboardAftHeightFromOceanTextfield.setText(starboard_aft_distance_to_ocean_surface_element.getElementsByTagName("starboard_aft_distance_to_ocean_surface").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.portMiddleHeightFromOceanTextfield.setText(port_aft_distance_to_ocean_surface_element.getElementsByTagName("port_aft_distance_to_ocean_surface").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.firstRelativeDistanceInputTextfield.setText(port_forward_distance_to_starboard_forward_element.getElementsByTagName("port_forward_distance_to_starboard_forward").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.secondRelativeDistanceInputTextfield.setText(starboard_forward_distance_to_starboard_aft_element.getElementsByTagName("starboard_forward_distance_to_starboard_aft").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.thirdRelativeDistanceInputTextfield.setText(starboard_aft_distance_to_port_aft_element.getElementsByTagName("starboard_aft_distance_to_port_aft").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.fourthRelativeDistanceInputTextfield.setText(port_aft_distance_to_port_forward_element.getElementsByTagName("port_aft_distance_to_port_forward").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.transducerDepthInputTextfield.setText(transducer_depth_element.getElementsByTagName("transducer_depth").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.targetSphereDepthInputTextfield.setText(depth_of_echosounder_view_centroid_element.getElementsByTagName("depth_of_echosounder_view_centroid").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.alongShipInputTextfield.setText(alongship_distance_to_port_forward_element.getElementsByTagName("alongship_distance_to_port_forward").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.transducerToCenterlineDistanceInputTextfield.setText(distance_from_center_line_element.getElementsByTagName("distance_from_center_line").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.vesselWidthInputTextfield.setText(vessel_width_element.getElementsByTagName("vessel_width").item(0).getTextContent().split("\"")[1]);
                                //configurationFileNameElement
                                Configuration.fileNameInputTextfield.setText(configurationFileNameElement.getElementsByTagName("configurationFileName").item(0).getTextContent().split("\"")[1]);
                                
                                //Enables the relevent fields for the chosen vessel configuration.
                                Configuration.vesselConfigurationSetup();
                                //Enables the height from the ocean input fields if the corresponding downrigger location is chosen.
                                Configuration.OceanHeightTextfieldEnablerSwitch();
                                //
                                dialog.setTitle("Edit Vessel Configuration File");
                                //
                                dialog.setVisible(true);
                            }
                        });
                        //Breaks out of case statement.
                        break;
                    }
                    //
                    default:
                    {
                        //
                        break;
                    }
                }
            } 
            //
            catch (ParserConfigurationException | SAXException | IOException ex) 
            {
                //
                Terminal.systemLogMessage("The vessel configuration file has not been read properly.");
            }
        } 
        //
        else 
        {
            //
        }
    }