]> git.mxchange.org Git - addressbook-lib.git/blobdiff - Addressbook/src/org/mxchange/addressbook/client/gui/SwingClient.java
Moved a lot classes and interfaces (generalized) to new jcore project + added a few...
[addressbook-lib.git] / Addressbook / src / org / mxchange / addressbook / client / gui / SwingClient.java
index a8c1a72910e14f39b1de5455d4bc296a475e96a5..27b98de9790abd08bb1f3d7fc2fc586903a2b4ef 100644 (file)
  */
 package org.mxchange.addressbook.client.gui;
 
-import org.mxchange.addressbook.application.Application;
-import org.mxchange.addressbook.client.BaseClient;
-import org.mxchange.addressbook.client.Client;
+import org.mxchange.addressbook.client.AddressbookClient;
+import org.mxchange.addressbook.client.BaseAddressbookClient;
 import org.mxchange.addressbook.contact.Contact;
 import org.mxchange.addressbook.contact.Gender;
-import org.mxchange.addressbook.exceptions.FrameAlreadyInitializedException;
-import org.mxchange.addressbook.exceptions.UnhandledUserChoiceException;
 import org.mxchange.addressbook.menu.Menu;
 import org.mxchange.addressbook.menu.item.SelectableMenuItem;
+import org.mxchange.jcore.application.Application;
+import org.mxchange.jcore.exceptions.FrameAlreadyInitializedException;
+import org.mxchange.jcore.exceptions.UnhandledUserChoiceException;
 
 /**
  *
  * @author Roland Haeder
  */
-public class SwingClient extends BaseClient implements Client {
+public class SwingClient extends BaseAddressbookClient implements AddressbookClient {
 
        /**
         * Swing frame instance
@@ -43,8 +43,6 @@ public class SwingClient extends BaseClient implements Client {
         * @param application Application instance
         */
        public SwingClient (final Application application) {
-               super();
-
                // Debug message
                this.getLogger().trace("CALLED!"); //NOI18N
 
@@ -53,6 +51,9 @@ public class SwingClient extends BaseClient implements Client {
 
                // Init frame instance
                this.frame = AddressbookFrame.getSelfInstance(this);
+
+               // Trace message
+               this.getLogger().trace("EXIT!"); //NOI18N
        }
 
        @Override
@@ -92,6 +93,9 @@ public class SwingClient extends BaseClient implements Client {
         */
        @Override
        public Contact doEnterOwnData () {
+               // Trace message
+               this.getLogger().trace("CALLED!"); //NOI18N
+
                // Deligate this call to the frame
                return this.frame.doEnterOwnData();
        }
@@ -179,8 +183,8 @@ public class SwingClient extends BaseClient implements Client {
                        // Init frame
                        this.frame.init();
                } catch (final FrameAlreadyInitializedException ex) {
-                       this.getLogger().catching(ex);
-                       System.exit(1);
+                       // Abort program
+                       this.abortProgramWithException(ex);
                }
 
                // Now start the frame
@@ -197,7 +201,7 @@ public class SwingClient extends BaseClient implements Client {
 
        @Override
        public void showCurrentMenu () {
-       // Debug message
+               // Debug message
                //* NOISY-DEBUG: */ this.getLogger().trace("CALLED!");
 
                // Not implemented here