]> git.mxchange.org Git - jfinancials-lib.git/blobdiff - src/org/mxchange/addressbook/client/gui/AddressbookFrame.java
More tpyos fixed ... ;-) + updated jcore.jar
[jfinancials-lib.git] / src / org / mxchange / addressbook / client / gui / AddressbookFrame.java
index 4bdb6e98baecf355f982dea847539d6225b190ef..89b8df2cdbbf344a1eace574e6d74ab541b5e9a4 100644 (file)
@@ -25,6 +25,7 @@ import java.awt.event.MouseEvent;
 import java.awt.event.WindowAdapter;
 import java.awt.event.WindowEvent;
 import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
 import java.sql.SQLException;
 import java.text.MessageFormat;
 import javax.swing.BorderFactory;
@@ -55,6 +56,7 @@ import org.mxchange.jcore.client.gui.ClientFrame;
 import org.mxchange.jcore.contact.Contact;
 import org.mxchange.jcore.contact.Gender;
 import org.mxchange.jcore.exceptions.BadTokenException;
+import org.mxchange.jcore.exceptions.CorruptedDatabaseFileException;
 import org.mxchange.jcore.exceptions.FrameAlreadyInitializedException;
 import org.mxchange.jcore.model.swing.contact.ContactTableModel;
 
@@ -214,11 +216,8 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
                // Debug line
                this.getLogger().trace(MessageFormat.format("client={0}: CALLED!", client)); //NOI18N
 
-               // Get and cast manager instance
-               ManageableAddressbookContact manager = (ManageableAddressbookContact) this.getClient().getManager();
-
                // Has the user entered own data?
-               if (manager.isOwnContactAdded()) {
+               if (((ManageableAddressbookContact) this.getClient().getManager()).isOwnContactAdded()) {
                        // Debug message
                        this.getLogger().debug("Disabling menus: isOwnContactAdded()=false"); //NOI18N
 
@@ -677,8 +676,7 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
                        @Override
                        public void actionPerformed (final ActionEvent e) {
                                try {
-                                       ManageableAddressbookContact manager = (ManageableAddressbookContact) self.getClient().getManager();
-                                       manager.doEnterOwnData();
+                                       ((ManageableAddressbookContact) self.getClient().getManager()).doEnterOwnData();
                                } catch (final ContactAlreadyAddedException ex) {
                                        // Already added, log away
                                        // @TODO maybe output message here?
@@ -705,10 +703,9 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
                         */
                        @Override
                        public void actionPerformed (final ActionEvent e) {
-                               ManageableAddressbookContact manager = (ManageableAddressbookContact) self.getClient().getManager();
                                try {
-                                       manager.doChangeOwnData();
-                               } catch (final IOException | BadTokenException ex) {
+                                       ((ManageableAddressbookContact) self.getClient().getManager()).doChangeOwnData();
+                               } catch (final IOException | BadTokenException | CorruptedDatabaseFileException | SQLException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
                                        self.logException(ex);
                                }
                        }
@@ -727,8 +724,7 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
                         */
                        @Override
                        public void actionPerformed (final ActionEvent e) {
-                               ManageableAddressbookContact manager = (ManageableAddressbookContact) self.getClient().getManager();
-                               manager.doAddOtherAddress();
+                               ((ManageableAddressbookContact) self.getClient().getManager()).doAddOtherAddress();
                        }
                });