+ * Creates the “Key Store” menu.
+ *
+ * @return The “Key Store” menu
+ */
+ private JMenu constructKeystoreMenu() {
+ JMenu keystoreMenu = new JMenu("Key Store");
+
+ keystoreMenu.add(constructNewKeystoreTypeMenu());
+ keystoreMenu.add(openKeystoreAction);
+
+ return keystoreMenu;
+ }
+
+ /**
+ * Creates a new menu containing all the types for new key stores.
+ *
+ * @return A menu containing all new key store types
+ */
+ private JMenu constructNewKeystoreTypeMenu() {
+ JMenu keystoreTypeMenu = new JMenu("New Key Store");
+ keystoreTypeMenu.setMnemonic(KeyEvent.VK_N);
+
+ for (final String keystoreType : new String[] { "JKS", "PKCS12" }) {
+ Action keystoreTypeAction = new AbstractAction(keystoreType) {
+
+ /**
+ * {@inheritDoc}
+ */
+ @SuppressWarnings("synthetic-access")
+ public void actionPerformed(ActionEvent actionEvent) {
+ actionNewKeystore(keystoreType);
+ }
+ };
+ keystoreTypeMenu.add(keystoreTypeAction);
+ }
+
+ return keystoreTypeMenu;
+ }
+
+ //
+ // PRIVATE ACTIONS
+ //
+
+ /**
+ * Quits the program.
+ */
+ private void actionFileQuit() {
+ /* TODO - ask for confirmation. */
+ System.exit(0);
+ }
+
+ /**