/** * Executes this action. * @param parent the parent window */ public void execute(Window parent) { final Path f = Paths.get(fileName); try { final SignatureFileInfo info = signatureManager.install(type, f, useAsDefault); final String message = String.format("Signature file %s has been installed", info.getFile().getFileName().toString()); JOptionPane.showMessageDialog(parent, message, "Signature file installed", JOptionPane.INFORMATION_MESSAGE); } catch (final SignatureFileException e) { JOptionPane.showMessageDialog(parent, e.getMessage(), "Error installing signature file", JOptionPane.ERROR_MESSAGE); } }
/** * Executes this action. * @param parent the parent window */ public void execute(Window parent) { File f = new File(fileName); try { SignatureFileInfo info = signatureManager.install(type, f, useAsDefault); String message = String.format("Signature file %s has been installed", info.getFile().getName()); JOptionPane.showMessageDialog(parent, message, "Signature file installed", JOptionPane.INFORMATION_MESSAGE); } catch (SignatureFileException e) { JOptionPane.showMessageDialog(parent, e.getMessage(), "Error installing signature file", JOptionPane.ERROR_MESSAGE); } }
signatures = signatureManager.getDefaultSignatures(); } catch (SignatureFileException e) { throw new ProfileManagerException(e.getMessage());
signatures = signatureManager.getDefaultSignatures(); } catch (SignatureFileException e) { throw new ProfileManagerException(e.getMessage());