]> git.mxchange.org Git - jfinancials-lib.git/blobdiff - Addressbook/src/org/mxchange/addressbook/application/AddressbookApplication.java
Bah, bad bad NetBeans. Why the f**k does it need to have a sub directory??? Why not...
[jfinancials-lib.git] / Addressbook / src / org / mxchange / addressbook / application / AddressbookApplication.java
index fcda1bca021f4c138bdefe0856442683fe4b0818..788c940ed3c41eb082ab699fcda3f03383381a24 100644 (file)
@@ -136,6 +136,15 @@ public class AddressbookApplication extends BaseFrameworkSystem implements Appli
      */\r
     private boolean guiClient = false;\r
 \r
+    /**\r
+     * Getter for printable application name\r
+     * \r
+     * @return A printable name\r
+     */\r
+    public static String printableTitle () {\r
+       return MessageFormat.format("{0} v{1}", APP_TITLE, APP_VERSION);\r
+    }\r
+\r
     /**\r
      * Bootstraps application\r
      */\r
@@ -164,7 +173,10 @@ public class AddressbookApplication extends BaseFrameworkSystem implements Appli
            this.getLogger().error("No client choosen. Cannot launch.");\r
            System.exit(1);\r
        }\r
-       \r
+\r
+       // Init client\r
+       client.initClient();\r
+\r
        // Set client instance\r
        this.setClient(client);\r
        \r
@@ -286,7 +298,9 @@ public class AddressbookApplication extends BaseFrameworkSystem implements Appli
        // Launch application\r
        ApplicationManager.getManager(this).start();\r
 \r
-       this.getLogger().info("End of program (last line)");\r
+       // Good bye, but this should not be reached ...\r
+       this.getLogger().warn("Unusual exit reached.");\r
+       this.doShutdown();\r
     }\r
 \r
     /**\r
@@ -298,4 +312,16 @@ public class AddressbookApplication extends BaseFrameworkSystem implements Appli
        // Start application\r
        new AddressbookApplication().start(args);\r
     }\r
+\r
+    /**\r
+     * Shuts down the application.\r
+     */\r
+    @Override\r
+    public void doShutdown () {\r
+       // Shutdown client\r
+       this.getClient().doShutdown();\r
+\r
+       this.getLogger().info("End of program (last line)");\r
+       System.exit(0);\r
+    }\r
 }\r