projects
/
jkeytool.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add key store panel when a key store is loaded.
[jkeytool.git]
/
src
/
net
/
pterodactylus
/
jkeytool
/
gui
/
swing
/
SwingInterface.java
diff --git
a/src/net/pterodactylus/jkeytool/gui/swing/SwingInterface.java
b/src/net/pterodactylus/jkeytool/gui/swing/SwingInterface.java
index
39506e1
..
95c8f90
100644
(file)
--- a/
src/net/pterodactylus/jkeytool/gui/swing/SwingInterface.java
+++ b/
src/net/pterodactylus/jkeytool/gui/swing/SwingInterface.java
@@
-21,9
+21,14
@@
package net.pterodactylus.jkeytool.gui.swing;
import java.io.File;
import java.security.KeyStore;
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.core.Core;
import net.pterodactylus.jkeytool.gui.Interface;
+import net.pterodactylus.jkeytool.main.Main;
/**
* TODO
/**
* TODO
@@
-35,6
+40,12
@@
public class SwingInterface implements Interface {
/** The core to control. */
private Core core;
/** 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
//
//
// INTERFACE Interface
//
@@
-53,7
+64,8
@@
public class SwingInterface implements Interface {
* {@inheritDoc}
*/
public void start() {
* {@inheritDoc}
*/
public void start() {
- /* TODO */
+ mainFrame.setVisible(true);
+ core.loadKeyStore(new File("client.p12"));
}
/**
}
/**
@@
-78,7
+90,9
@@
public class SwingInterface implements Interface {
* {@inheritDoc}
*/
public void keyStoreLoaded(File keyStoreFile, KeyStore keyStore) {
* {@inheritDoc}
*/
public void keyStoreLoaded(File keyStoreFile, KeyStore keyStore) {
- /* TODO */
+ KeyStorePanel keyStorePanel = new KeyStorePanel(keyStore);
+ keyStores.put(keyStore, keyStorePanel);
+ mainFrame.getContentPane().add(keyStorePanel);
}
/**
}
/**