From 5e44623aa5fadee1d0c4f605aebee442330e1ae5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 27 Jan 2009 19:58:34 +0100 Subject: [PATCH] Add status bar. --- .../jkeytool/gui/swing/SwingInterface.java | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/net/pterodactylus/jkeytool/gui/swing/SwingInterface.java b/src/net/pterodactylus/jkeytool/gui/swing/SwingInterface.java index 95c8f90..3190c2a 100644 --- a/src/net/pterodactylus/jkeytool/gui/swing/SwingInterface.java +++ b/src/net/pterodactylus/jkeytool/gui/swing/SwingInterface.java @@ -29,6 +29,7 @@ import javax.swing.JFrame; import net.pterodactylus.jkeytool.core.Core; import net.pterodactylus.jkeytool.gui.Interface; import net.pterodactylus.jkeytool.main.Main; +import net.pterodactylus.util.swing.StatusBar; /** * TODO @@ -43,9 +44,25 @@ public class SwingInterface implements Interface { /** The main frame. */ private JFrame mainFrame = new JFrame("jkeytool " + Main.getVersion()); + /** The status bar. */ + private StatusBar statusBar = new StatusBar(); + /** Loaded key stores and their panels. */ private final Map keyStores = new HashMap(); + public SwingInterface() { + createFrame(); + } + + // + // PRIVATE METHODS + // + + private void createFrame() { + mainFrame.getContentPane().add(statusBar, BorderLayout.PAGE_END); + mainFrame.pack(); + } + // // INTERFACE Interface // @@ -65,6 +82,7 @@ public class SwingInterface implements Interface { */ public void start() { mainFrame.setVisible(true); + statusBar.setText("jkeytool startup complete."); core.loadKeyStore(new File("client.p12")); } @@ -92,7 +110,6 @@ public class SwingInterface implements Interface { public void keyStoreLoaded(File keyStoreFile, KeyStore keyStore) { KeyStorePanel keyStorePanel = new KeyStorePanel(keyStore); keyStores.put(keyStore, keyStorePanel); - mainFrame.getContentPane().add(keyStorePanel); } /** -- 2.7.4