public void mousePressed(MouseEvent e) {
   if (e.getButton() != MouseEvent.BUTTON1) {
     return;
   }
   if (e.getClickCount() != 2) {
     return;
   }
   JTable table = (JTable) e.getSource();
   Point p = e.getPoint();
   int row = table.rowAtPoint(p);
   if (row < 0) {
     return;
   }
   PickerTableModel model = getDataModel();
   ICFInternetISOCountryObj o =
       (ICFInternetISOCountryObj) model.getValueAt(row, COLID_ROW_HEADER);
   invokeWhenChosen.choseISOCountry(o);
   try {
     Container cont = getParent();
     while ((cont != null) && (!(cont instanceof JInternalFrame))) {
       cont = cont.getParent();
     }
     if (cont != null) {
       ((JInternalFrame) cont).setClosed(true);
     }
   } catch (Exception x) {
   }
 }
 public void actionPerformed(ActionEvent e) {
   final String S_ProcName = "actionPerformed";
   Container cont = getParent();
   while ((cont != null) && (!(cont instanceof JInternalFrame))) {
     cont = cont.getParent();
   }
   if (cont != null) {
     JInternalFrame frame = (JInternalFrame) cont;
     if (frame instanceof ICFSecuritySwingISOCurrencyJPanelCommon) {
       ICFSecuritySwingISOCurrencyJPanelCommon jpanelCommon =
           (ICFSecuritySwingISOCurrencyJPanelCommon) frame;
       jpanelCommon.setPanelMode(CFJPanel.PanelMode.Unknown);
       ICFSecurityISOCurrencyEditObj editObj =
           (ICFSecurityISOCurrencyEditObj) jpanelCommon.getSwingFocusAsISOCurrency().getEdit();
       if (editObj != null) {
         editObj.endEdit();
       }
     } else {
       throw CFLib.getDefaultExceptionFactory()
           .newUnsupportedClassException(
               getClass(),
               S_ProcName,
               "frame",
               frame,
               "ICFSecuritySwingISOCurrencyJPanelCommon");
     }
     try {
       frame.setClosed(true);
     } catch (Exception x) {
     }
   }
 }
 public void actionPerformed(ActionEvent e) {
   final String S_ProcName = "actionPerformed";
   Container cont = getParent();
   while ((cont != null) && (!(cont instanceof JInternalFrame))) {
     cont = cont.getParent();
   }
   if (cont != null) {
     JInternalFrame frame = (JInternalFrame) cont;
     if (frame instanceof ICFSecuritySwingSecGroupFormJPanelCommon) {
       ICFSecuritySwingSecGroupFormJPanelCommon jpanelCommon =
           (ICFSecuritySwingSecGroupFormJPanelCommon) frame;
       jpanelCommon.setPanelMode(CFJPanel.PanelMode.Delete);
     } else {
       throw CFLib.getDefaultExceptionFactory()
           .newUnsupportedClassException(
               getClass(),
               S_ProcName,
               "frame",
               frame,
               "ICFSecuritySwingSecGroupFormJPanelCommon");
     }
     try {
       frame.setClosed(true);
     } catch (Exception x) {
     }
   }
 }
 public void actionPerformed(ActionEvent e) {
   try {
     Container cont = getParent();
     while ((cont != null) && (!(cont instanceof JInternalFrame))) {
       cont = cont.getParent();
     }
     if (cont != null) {
       ((JInternalFrame) cont).setClosed(true);
     }
   } catch (Exception x) {
   }
 }
 public void actionPerformed(ActionEvent e) {
   final String S_ProcName = "actionPerformed";
   ICFInternetSchemaObj schemaObj = swingSchema.getSchema();
   if (schemaObj == null) {
     throw CFLib.getDefaultExceptionFactory()
         .newNullArgumentException(getClass(), S_ProcName, 0, "schemaObj");
   }
   invokeWhenChosen.choseISOCountry(null);
   try {
     Container cont = getParent();
     while ((cont != null) && (!(cont instanceof JInternalFrame))) {
       cont = cont.getParent();
     }
     if (cont != null) {
       ((JInternalFrame) cont).setClosed(true);
     }
   } catch (Exception x) {
   }
 }
 public void actionPerformed(ActionEvent e) {
   final String S_ProcName = "actionPerformed";
   ICFFreeSwitchSchemaObj schemaObj = swingSchema.getSchema();
   if (schemaObj == null) {
     throw CFLib.getDefaultExceptionFactory()
         .newNullArgumentException(getClass(), S_ProcName, 0, "schemaObj");
   }
   ICFSecurityTSecGroupMemberObj selectedInstance = getSwingFocusAsTSecGroupMember();
   invokeWhenChosen.choseTSecGroupMember(selectedInstance);
   try {
     Container cont = getParent();
     while ((cont != null) && (!(cont instanceof JInternalFrame))) {
       cont = cont.getParent();
     }
     if (cont != null) {
       ((JInternalFrame) cont).setClosed(true);
     }
   } catch (Exception x) {
   }
 }
 public void actionPerformed(ActionEvent e) {
   final String S_ProcName = "actionPerformed";
   CFBamSwingMainJFrame mainJFrame = null;
   {
     Container cont = getParent();
     while ((cont != null) && (!(cont instanceof CFBamSwingMainJFrame))) {
       cont = cont.getParent();
     }
     if (cont != null) {
       mainJFrame = (CFBamSwingMainJFrame) cont;
     }
   }
   char pw[] = textKeystorePassword.getPassword();
   String keystorePassword;
   if (pw != null) {
     keystorePassword = new String(pw);
   } else {
     keystorePassword = null;
   }
   CFBamClientConfigurationFile configFile = swingSchema.getClientConfigurationFile();
   String keystoreFileName = configFile.getKeyStore();
   boolean exitApp = false;
   boolean exitForm = false;
   boolean creatingKeystore = false;
   KeyStore keyStore = null;
   File keystoreFile = new File(keystoreFileName);
   if (!keystoreFile.exists()) {
     int userOption = JOptionPane.NO_OPTION;
     try {
       userOption =
           JOptionPane.showOptionDialog(
               null,
               "Would you like to create the keystore \""
                   + keystoreFileName
                   + "\"?\n"
                   + "Selecting No will exit the application so you can edit the client configuration file and restart.",
               "Create Keystore?",
               JOptionPane.YES_NO_OPTION,
               JOptionPane.QUESTION_MESSAGE,
               null,
               null,
               null);
     } catch (HeadlessException x) {
       throw CFLib.getDefaultExceptionFactory()
           .newRuntimeException(
               getClass(), S_ProcName, "Caught HeadlessException -- " + x.getMessage(), x);
     }
     if (userOption == JOptionPane.YES_OPTION) {
       creatingKeystore = true;
       JInternalFrame nextForm = swingSchema.newCreateKeystoreJInternalFrame();
       getDesktopPane().add(nextForm);
       nextForm.setVisible(true);
       nextForm.show();
       Container cont = getParent();
       while ((cont != null) && (!(cont instanceof JInternalFrame))) {
         cont = cont.getParent();
       }
       if (cont != null) {
         JInternalFrame frame = (JInternalFrame) cont;
         try {
           frame.setClosed(true);
         } catch (Exception x) {
         }
       }
     } else {
       exitApp = true;
     }
   } else if (!keystoreFile.isFile()) {
     JOptionPane.showMessageDialog(
         null,
         "The referenced JCEKS keystore \"" + keystoreFileName + "\" is not a file.",
         "Error",
         JOptionPane.ERROR_MESSAGE,
         null);
     exitApp = true;
   } else if (!keystoreFile.canRead()) {
     JOptionPane.showMessageDialog(
         null,
         "Permission denied attempting to access JCEKS keystore \"" + keystoreFileName + "\".",
         "Error",
         JOptionPane.ERROR_MESSAGE,
         null);
     exitApp = true;
   }
   if ((!exitApp) && (!creatingKeystore)) {
     try {
       keyStore = KeyStore.getInstance("jceks");
       char[] caPassword = keystorePassword.toCharArray();
       FileInputStream input = new FileInputStream(keystoreFileName);
       keyStore.load(input, caPassword);
       input.close();
       swingSchema.setKeyStore(keyStore);
       exitForm = true;
     } catch (CertificateException x) {
       keyStore = null;
       JOptionPane.showMessageDialog(
           null,
           "Could not open keystore due to CertificateException -- " + x.getMessage(),
           "Error",
           JOptionPane.ERROR_MESSAGE,
           null);
       exitApp = true;
     } catch (IOException x) {
       keyStore = null;
       JOptionPane.showMessageDialog(
           null,
           "Could not open keystore due to IOException -- " + x.getMessage(),
           "Error",
           JOptionPane.ERROR_MESSAGE,
           null);
     } catch (KeyStoreException x) {
       keyStore = null;
       JOptionPane.showMessageDialog(
           null,
           "Could not open keystore due to KeyStoreException -- " + x.getMessage(),
           "Error",
           JOptionPane.ERROR_MESSAGE,
           null);
       exitApp = true;
     } catch (NoSuchAlgorithmException x) {
       keyStore = null;
       JOptionPane.showMessageDialog(
           null,
           "Could not open keystore due to NoSuchAlgorithmException -- " + x.getMessage(),
           "Error",
           JOptionPane.ERROR_MESSAGE,
           null);
       exitApp = true;
     }
   }
   if (exitApp) {
     swingSchema.setKeyStore(null);
     mainJFrame.exitApplication();
   } else if (exitForm) {
     JInternalFrame nextForm = swingSchema.newOpenDeviceKeyJInternalFrame();
     getDesktopPane().add(nextForm);
     nextForm.setVisible(true);
     nextForm.show();
     Container cont = getParent();
     while ((cont != null) && (!(cont instanceof JInternalFrame))) {
       cont = cont.getParent();
     }
     if (cont != null) {
       JInternalFrame frame = (JInternalFrame) cont;
       try {
         frame.setClosed(true);
       } catch (Exception x) {
       }
     }
   }
 }