import java.io.File;
import java.security.KeyStore;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.swing.JFrame;
import net.pterodactylus.jkeytool.core.Core;
import net.pterodactylus.jkeytool.gui.Interface;
+import net.pterodactylus.jkeytool.main.Main;
/**
* TODO
/** The core to control. */
private Core core;
+ /** The main frame. */
+ private JFrame mainFrame = new JFrame("jkeytool " + Main.getVersion());
+
+ /** Loaded key stores and their panels. */
+ private final Map<KeyStore, KeyStorePanel> keyStores = new HashMap<KeyStore, KeyStorePanel>();
+
//
// INTERFACE Interface
//
* {@inheritDoc}
*/
public void start() {
- /* TODO */
+ mainFrame.setVisible(true);
+ core.loadKeyStore(new File("client.p12"));
}
/**
* {@inheritDoc}
*/
public void keyStoreLoaded(File keyStoreFile, KeyStore keyStore) {
- /* TODO */
+ KeyStorePanel keyStorePanel = new KeyStorePanel(keyStore);
+ keyStores.put(keyStore, keyStorePanel);
+ mainFrame.getContentPane().add(keyStorePanel);
}
/**