]> git.mxchange.org Git - addressbook-lib.git/blobdiff - src/org/mxchange/addressbook/client/gui/AddressbookFrame.java
Prepared for upcoming rewrite:
[addressbook-lib.git] / src / org / mxchange / addressbook / client / gui / AddressbookFrame.java
index 73dc71a1148e0bc85f2d1c7ca518975e0594d936..bc09644749ed8eb6dca4b233e76ea9d16e045bef 100644 (file)
@@ -50,17 +50,18 @@ import javax.swing.table.TableModel;
 import org.mxchange.addressbook.BaseAddressbookSystem;
 import org.mxchange.addressbook.application.AddressbookApplication;
 import org.mxchange.addressbook.exceptions.ContactAlreadyAddedException;
-import org.mxchange.addressbook.manager.contact.ManageableAddressbookContact;
+import org.mxchange.addressbook.manager.contact.ManageableContactAddressbook;
+import org.mxchange.jcore.application.Application;
 import org.mxchange.jcore.client.Client;
-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;
+import org.mxchange.jcore.manager.Manageable;
+import org.mxchange.jcore.model.contact.Contact;
+import org.mxchange.jcore.model.contact.gender.Gender;
+import org.mxchange.jcoreswing.client.gui.ClientFrame;
+import org.mxchange.jcoreswing.model.swing.contact.ContactTableModel;
 
 /**
+ * A Swing frame for addressbook.
  *
  * @author Roland Haeder
  */
@@ -73,7 +74,7 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
 
        /**
         * Singelton getter for this frame instance.
-        *
+        * <p>
         * @param client Client instance
         * @return Returns a singelton instance of this frame
         */
@@ -130,12 +131,12 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
 
        /**
         * Creates an instance of this frame with a client instance
-        *
+        * <p>
         * @param client
         */
        private AddressbookFrame (final Client client) {
                // Debug line
-               this.getLogger().trace(MessageFormat.format("client={0}: CALLED!", client)); //NOI18N
+               this.getLogger().logTrace(MessageFormat.format("client={0}: CALLED!", client)); //NOI18N
 
                // Set frame instance
                this.frame = new JFrame();
@@ -145,13 +146,13 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
                this.setClient(client);
 
                // Trace message
-               this.getLogger().trace("EXIT!"); //NOI18N
+               this.getLogger().logTrace("EXIT!"); //NOI18N
        }
 
        @Override
        public Contact doEnterOwnData () {
                // Trace message
-               this.getLogger().trace("CALLED!"); //NOI18N
+               this.getLogger().logTrace("CALLED!"); //NOI18N
 
                // Is the "add contact" window visible?
                if (this.addContact.isVisible()) {
@@ -166,7 +167,7 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
                this.addContact.setVisible(true);
 
                // Trace message
-               this.getLogger().trace("Returning null : EXIT!"); //NOI18N
+               this.getLogger().logTrace("Returning null : EXIT!"); //NOI18N
 
                // Return value is not supported
                return null;
@@ -178,23 +179,22 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
        @Override
        public void doShutdown () {
                // Trace message
-               this.getLogger().trace("CALLED!"); //NOI18N
+               this.getLogger().logTrace("CALLED!"); //NOI18N
 
                // First only show shutdown status
                this.updateStatus("shutdown"); //NOI18N
 
                // Trace message
-               this.getLogger().trace("EXIT!"); //NOI18N
+               this.getLogger().logTrace("EXIT!"); //NOI18N
        }
 
-
        /**
         * Enables main window (frame)
         */
        @Override
        public void enableMainWindow () {
                // Trace message
-               this.getLogger().trace("CALLED!"); //NOI18N
+               this.getLogger().logTrace("CALLED!"); //NOI18N
 
                // Enable it again
                this.frame.setEnabled(true);
@@ -203,26 +203,43 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
                this.frame.requestFocus();
 
                // Trace message
-               this.getLogger().trace("EXIT!"); //NOI18N
+               this.getLogger().logTrace("EXIT!"); //NOI18N
+       }
+
+       @Override
+       public Application getApplication () {
+               throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+       }
+
+       @Override
+       public Client getClient () {
+               throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+       }
+
+       @Override
+       public Manageable getManager () {
+               throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+       }
+
+       @Override
+       public String getMessageStringFromKey (String key) {
+               throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
        }
 
        /**
         * Setups the frame, do not set isInitialized here
-        *
+        * <p>
         * @param client Client instance
         */
        @Override
-       public void setupFrame (final Client client) throws IOException, BadTokenException {
+       public void setupFrame (final Client client) throws IOException {
                // Debug line
-               this.getLogger().trace(MessageFormat.format("client={0}: CALLED!", client)); //NOI18N
-
-               // Get and cast manager instance
-               ManageableAddressbookContact manager = (ManageableAddressbookContact) this.getClient().getManager();
+               this.getLogger().logTrace(MessageFormat.format("client={0}: CALLED!", client)); //NOI18N
 
                // Has the user entered own data?
-               if (manager.isOwnContactAdded()) {
+               if (((ManageableContactAddressbook) this.getClient().getManager()).isOwnContactAdded()) {
                        // Debug message
-                       this.getLogger().debug("Disabling menus: isOwnContactAdded()=false"); //NOI18N
+                       this.getLogger().logDebug("Disabling menus: isOwnContactAdded()=false"); //NOI18N
 
                        // Not entered yet, so disable "add" menu
                        this.addOwnItem.setEnabled(false);
@@ -238,22 +255,21 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
                this.updateStatus("done"); //NOI18N
 
                // Trace message
-               this.getLogger().trace("EXIT!"); //NOI18N
+               this.getLogger().logTrace("EXIT!"); //NOI18N
        }
 
        /**
         * Initalizes this frame. Having initComponents() exposed (publicly
         * accessible) means that any other object can initialize components which
         * you may not want.
-        *
-        * @throws
-        * org.mxchange.jcore.exceptions.FrameAlreadyInitializedException If
+        * <p>
+        * @throws org.mxchange.jcore.exceptions.FrameAlreadyInitializedException If
         * this method has been called twice
         */
        @Override
        public void init () throws FrameAlreadyInitializedException {
                // Debug line
-               this.getLogger().trace("CALLED!"); //NOI18N
+               this.getLogger().logTrace("CALLED!"); //NOI18N
 
                // Has this frame been initialized?
                if (this.isInitialized()) {
@@ -268,13 +284,13 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
                this.initialized = true;
 
                // Trace message
-               this.getLogger().trace("EXIT!"); //NOI18N
+               this.getLogger().logTrace("EXIT!"); //NOI18N
        }
 
        /**
         * Returns field isInitialized. This flag indicates whether this frame has
         * been initialized or not.
-        *
+        * <p>
         * @return Field isInitialized
         */
        @Override
@@ -282,18 +298,23 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
                return this.initialized;
        }
 
+       @Override
+       public void logException (Throwable exception) {
+               throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+       }
+
        /**
         * Shuts down the application.
         */
        @Override
        public void shutdownApplication () {
                // Trace message
-               this.getLogger().trace("CALLED!"); //NOI18N
+               this.getLogger().logTrace("CALLED!"); //NOI18N
 
                // To do this, the frame must be initialized
                if (!this.isInitialized()) {
                        // Not initalized, so bad call
-                       this.getLogger().fatal("Bad call of shutdownApplication(). Please report this."); //NOI18N
+                       this.getLogger().logFatal("Bad call of shutdownApplication(). Please report this."); //NOI18N
                        return;
                }
 
@@ -306,62 +327,62 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
                }
 
                // Trace message
-               this.getLogger().trace("EXIT!"); //NOI18N
+               this.getLogger().logTrace("EXIT!"); //NOI18N
        }
 
        /**
         * Adds a new menu item with given key to menu instance
-        *
+        * <p>
         * @param menu Menu instance to add item to
         * @param key Message key part
         * @param listener Listener instance
         */
        private void addMenuItem (final JMenu menu, final String key, final ActionListener listener) {
                // Trace message
-               this.getLogger().trace(MessageFormat.format("menu={0},key={1},listener={2} - CALLED!", menu, key, listener)); //NOI18N
-               
+               this.getLogger().logTrace(MessageFormat.format("menu={0},key={1},listener={2} - CALLED!", menu, key, listener)); //NOI18N
+
                // New instance
                JMenuItem item = this.initMenuItemWithTooltip(key);
-               
+
                // Add listener
                item.addActionListener(listener);
-               
+
                // Add item -> menu
                menu.add(item);
-               
+
                // Trace message
-               this.getLogger().trace("EXIT!"); //NOI18N
+               this.getLogger().logTrace("EXIT!"); //NOI18N
        }
 
        /**
         * Adds a JTextField with label and tool tip to given panel
-        *
+        * <p>
         * @param panel Panel instance to add text field
         * @param key Part of message key from resource bundle
         * @param fieldLength Length of text field
         */
        private void addTextFieldWithLabelToPanel (final JPanel panel, final String key, final int fieldLength) {
                // Trace message
-               this.getLogger().trace(MessageFormat.format("panel={0},key={1},fieldLength={2} - CALLED!", panel, key, fieldLength)); //NOI18N
-               
+               this.getLogger().logTrace(MessageFormat.format("panel={0},key={1},fieldLength={2} - CALLED!", panel, key, fieldLength)); //NOI18N
+
                // Init label for given key
                JLabel label = new JLabel(this.getBundle().getString(String.format("AddressbookFrame.%s.text", key))); //NOI18N
-               
+
                // And input box wih tool tip
                JTextField field = new JTextField(fieldLength);
                field.setToolTipText(this.getBundle().getString(String.format("AddressbookFrame.%s.toolTipText", key))); //NOI18N
-               
+
                // Add both to panel
                panel.add(label);
                panel.add(field);
-               
+
                // Trace message
-               this.getLogger().trace("EXIT!"); //NOI18N
+               this.getLogger().logTrace("EXIT!"); //NOI18N
        }
 
        /**
         * Generates a title for borders
-        *
+        * <p>
         * @param key Key part to look for
         * @return Human-readable title
         */
@@ -373,7 +394,7 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
        /**
         * Generates a title for all frames based on given sub title key. If null is
         * given, the sub title is not generated.
-        *
+        * <p>
         * @param subKey Key for sub title resource
         * @return A full application title
         */
@@ -396,7 +417,7 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
         */
        private void initAddCancelButtons () {
                // Trace message
-               this.getLogger().trace("CALLED!"); //NOI18N
+               this.getLogger().logTrace("CALLED!"); //NOI18N
 
                // Init panel
                JPanel panel = new JPanel();
@@ -424,7 +445,7 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
                this.addContact.add(panel);
 
                // Trace message
-               this.getLogger().trace("EXIT!"); //NOI18N
+               this.getLogger().logTrace("EXIT!"); //NOI18N
        }
 
        /**
@@ -432,7 +453,7 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
         */
        private void initAddContactDialog () {
                // Trace message
-               this.getLogger().trace("CALLED!"); //NOI18N
+               this.getLogger().logTrace("CALLED!"); //NOI18N
 
                // Instance dialog and set title
                this.addContact = new JDialog();
@@ -459,7 +480,7 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
                 * Add listener which asks for confirmation, if data has been entered
                 * but not saved yet. The user may appriciate this ... ;-)
                 *
-                * @TODO Unfinished
+                * TODO Unfinished
                 */
                this.addContact.addWindowListener(new WindowAdapter() {
                        /**
@@ -495,20 +516,22 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
                initAddCancelButtons();
 
                // x)Only for developing:
-               /* DEBUG: */ this.addContact.setVisible(true);
+               /*
+                * DEBUG:
+                */ this.addContact.setVisible(true);
 
                // Trace message
-               this.getLogger().trace("EXIT!"); //NOI18N
+               this.getLogger().logTrace("EXIT!"); //NOI18N
        }
 
        /**
         * Initializes address panel
-        *
+        * <p>
         * @param dialog A JDialog instance to this components to
         */
        private void initAddressDataPanel (final JDialog dialog) {
                // Trace message
-               this.getLogger().trace("CALLED!"); //NOI18N
+               this.getLogger().logTrace("CALLED!"); //NOI18N
 
                // Panel "address" input boxes
                JPanel addressPanel = new JPanel();
@@ -549,7 +572,7 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
                dialog.add(addressPanel);
 
                // Trace message
-               this.getLogger().trace("EXIT!"); //NOI18N
+               this.getLogger().logTrace("EXIT!"); //NOI18N
        }
 
        /**
@@ -557,7 +580,7 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
         */
        private void initComponents () {
                // Debug line
-               this.getLogger().trace("CALLED!"); //NOI18N
+               this.getLogger().logTrace("CALLED!"); //NOI18N
 
                // Set default close operation
                this.frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
@@ -594,36 +617,36 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
                this.frame.setLocationRelativeTo(null);
 
                // Init menu system
-               initMenuSystem();
+               this.initMenuSystem();
 
                // Init table
-               initTable();
+               this.initTable();
 
                // Init status panel
-               initStatusPanel();
+               this.initStatusPanel();
 
                // Init other windows
-               initOtherDialogs();
+               this.initOtherDialogs();
 
                // Trace message
-               this.getLogger().trace("EXIT!"); //NOI18N
+               this.getLogger().logTrace("EXIT!"); //NOI18N
        }
 
        /**
         * Initializes a menu item instance with tool tip
-        * 
+        * <p>
         * @param key Message key part
         * @return A finished JMenuItem instance
         */
        private JMenuItem initMenuItemWithTooltip (final String key) {
                // Debug line
-               this.getLogger().trace(MessageFormat.format("key={0} - CALLED!", key)); //NOI18N
+               this.getLogger().logTrace(MessageFormat.format("key={0} - CALLED!", key)); //NOI18N
 
                JMenuItem item = new JMenuItem(this.getBundle().getString(String.format("AddressbookFrame.menuItem.%s.text", key))); //NOI18N
                item.setToolTipText(this.getBundle().getString(String.format("AddressbookFrame.menuItem.%s.toolTipText", key))); //NOI18N
 
                // Trace message
-               this.getLogger().trace(MessageFormat.format("item={0} - EXIT!", item)); //NOI18N
+               this.getLogger().logTrace(MessageFormat.format("item={0} - EXIT!", item)); //NOI18N
 
                // Return it
                return item;
@@ -634,7 +657,7 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
         */
        private void initMenuSystem () {
                // Trace message
-               this.getLogger().trace("CALLED!"); //NOI18N
+               this.getLogger().logTrace("CALLED!"); //NOI18N
 
                // Init menu bar, menu and item instances
                JMenuBar menuBar = new JMenuBar();
@@ -650,7 +673,7 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
                this.addMenuItem(menu, "exitProgram", new ActionListener() { //NOI18N
                        /**
                         * If the user has performed this action
-                        *
+                        * <p>
                         * @param e An instance of an ActionEvent class
                         */
                        @Override
@@ -673,21 +696,20 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
                this.addOwnItem.addActionListener(new ActionListener() {
                        /**
                         * If the user has performed this action
-                        *
+                        * <p>
                         * @param e An instance of an ActionEvent class
                         */
                        @Override
                        public void actionPerformed (final ActionEvent e) {
                                try {
-                                       ManageableAddressbookContact manager = (ManageableAddressbookContact) self.getClient().getManager();
-                                       manager.doEnterOwnData();
+                                       ((ManageableContactAddressbook) self.getClient().getManager()).doEnterOwnData();
                                } catch (final ContactAlreadyAddedException ex) {
                                        // Already added, log away
-                                       // @TODO maybe output message here?
+                                       // TODO maybe output message here?
                                        self.logException(ex);
-                               } catch (final IOException | BadTokenException ex) {
+                               } catch (final IOException ex) {
                                        // Somethind bad happened here
-                                       // @TODO Output error message here?
+                                       // TODO Output error message here?
                                }
                        }
                });
@@ -702,15 +724,14 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
                this.editOwnItem.addActionListener(new ActionListener() {
                        /**
                         * If the user has performed this action
-                        *
+                        * <p>
                         * @param e An instance of an ActionEvent class
                         */
                        @Override
                        public void actionPerformed (final ActionEvent e) {
-                               ManageableAddressbookContact manager = (ManageableAddressbookContact) self.getClient().getManager();
                                try {
-                                       manager.doChangeOwnData();
-                               } catch (final IOException | BadTokenException | CorruptedDatabaseFileException | SQLException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
+                                       ((ManageableContactAddressbook) self.getClient().getManager()).doChangeOwnData();
+                               } catch (final IOException | SQLException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
                                        self.logException(ex);
                                }
                        }
@@ -724,13 +745,12 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
                this.addMenuItem(menu, "addNewContact", new ActionListener() { //NOI18N
                        /**
                         * If the user has performed this action
-                        *
+                        * <p>
                         * @param e An instance of an ActionEvent class
                         */
                        @Override
                        public void actionPerformed (final ActionEvent e) {
-                               ManageableAddressbookContact manager = (ManageableAddressbookContact) self.getClient().getManager();
-                               manager.doAddOtherAddress();
+                               ((ManageableContactAddressbook) self.getClient().getManager()).doAddOtherAddress();
                        }
                });
 
@@ -741,17 +761,17 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
                this.frame.add(menuBar, BorderLayout.NORTH);
 
                // Trace message
-               this.getLogger().trace("EXIT!"); //NOI18N
+               this.getLogger().logTrace("EXIT!"); //NOI18N
        }
 
        /**
         * Initializes name panel
-        *
+        * <p>
         * @param dialog A JDialog instance to this components to
         */
        private void initNameDataPanel (final JDialog dialog) {
                // Trace message
-               this.getLogger().trace(MessageFormat.format("dialog={0} - CALLED!", dialog)); //NOI18N
+               this.getLogger().logTrace(MessageFormat.format("dialog={0} - CALLED!", dialog)); //NOI18N
 
                // Panel "name" input boxes
                JPanel namePanel = new JPanel();
@@ -784,18 +804,18 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
                dialog.add(namePanel);
 
                // Trace message
-               this.getLogger().trace("EXIT!"); //NOI18N
+               this.getLogger().logTrace("EXIT!"); //NOI18N
        }
 
        /**
         * Initializes "other" data panel
-        *
-        * @param dialog A JDialog instance to this components to
-        * @todo Fill this with life
+        * <p>
+        * @param dialog A JDialog instance to this components to TODO Fill this
+        * with life
         */
        private void initOtherDataPanel (final JDialog dialog) {
                // Trace message
-               this.getLogger().trace(MessageFormat.format("dialog={0} - CALLED!", dialog)); //NOI18N
+               this.getLogger().logTrace(MessageFormat.format("dialog={0} - CALLED!", dialog)); //NOI18N
 
                // Panel "other" input boxes
                JPanel otherPanel = new JPanel();
@@ -829,7 +849,7 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
                dialog.add(otherPanel);
 
                // Trace message
-               this.getLogger().trace("EXIT!"); //NOI18N
+               this.getLogger().logTrace("EXIT!"); //NOI18N
        }
 
        /**
@@ -837,14 +857,14 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
         */
        private void initOtherDialogs () {
                // Trace message
-               this.getLogger().trace("CALLED!"); //NOI18N
+               this.getLogger().logTrace("CALLED!"); //NOI18N
 
                // Init other windows:
                // 1) Add contact
                initAddContactDialog();
 
                // Trace message
-               this.getLogger().trace("EXIT!"); //NOI18N
+               this.getLogger().logTrace("EXIT!"); //NOI18N
        }
 
        /**
@@ -852,7 +872,7 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
         */
        private void initStatusPanel () {
                // Trace message
-               this.getLogger().trace("CALLED!"); //NOI18N
+               this.getLogger().logTrace("CALLED!"); //NOI18N
 
                // Init status label (which needs to be updated
                this.statusLabel = new JLabel();
@@ -868,7 +888,7 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
                this.frame.add(panel, BorderLayout.SOUTH);
 
                // Trace message
-               this.getLogger().trace("EXIT!"); //NOI18N
+               this.getLogger().logTrace("EXIT!"); //NOI18N
        }
 
        /**
@@ -876,10 +896,10 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
         */
        private void initTable () {
                // Trace message
-               this.getLogger().trace("CALLED!"); //NOI18N
+               this.getLogger().logTrace("CALLED!"); //NOI18N
 
                // Instance table model
-               this.dataModel = new ContactTableModel(this.getClient());
+               this.dataModel = new ContactTableModel(this.getClient().getManager());
 
                // Instance table
                this.dataTable = new JTable(this.dataModel);
@@ -888,7 +908,7 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
                this.dataTable.addMouseListener(new MouseAdapter() {
                        /**
                         * If the user peformed a click on a cell
-                        *
+                        * <p>
                         * @param e Mouse event instance
                         */
                        @Override
@@ -909,29 +929,30 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
                this.frame.add(scroller, BorderLayout.CENTER);
 
                // Trace message
-               this.getLogger().trace("EXIT!"); //NOI18N
+               this.getLogger().logTrace("EXIT!"); //NOI18N
        }
 
        /**
         * Updates status to given type
-        *
+        * <p>
         * @param type Status type
         */
        private void updateStatus (final String type) {
                // Trace message
-               this.getLogger().trace(MessageFormat.format("type={0} - CALLED!", type)); //NOI18N
+               this.getLogger().logTrace(MessageFormat.format("type={0} - CALLED!", type)); //NOI18N
 
                // Set status message
                this.statusLabel.setText(this.getBundle().getString(String.format("AddressbookFrame.statusLabel.%s.text", type))); //NOI18N
 
                // Trace message
-               this.getLogger().trace("EXIT!"); //NOI18N
+               this.getLogger().logTrace("EXIT!"); //NOI18N
        }
 
        /**
         * Class for "add address" button
         */
        private static class AddActionListener extends BaseAddressbookSystem implements ActionListener {
+
                /**
                 * Dialog instance
                 */
@@ -944,7 +965,7 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
 
                /**
                 * Constructor for action listener
-                * 
+                * <p>
                 * @param dialog Dialog instance to call back
                 * @param frame Frame instance (not JFrame)
                 */
@@ -956,7 +977,7 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
 
                /**
                 * If the action has been performed
-                *
+                * <p>
                 * @param e The performed action event
                 */
                @Override
@@ -969,6 +990,7 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
         * Class for "cancel address" button
         */
        private static class CancelActionListener extends BaseAddressbookSystem implements ActionListener {
+
                /**
                 * Dialog instance
                 */
@@ -981,7 +1003,7 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
 
                /**
                 * Constructor for action listener
-                * 
+                * <p>
                 * @param dialog Dialog instance to call back
                 * @param frame Frame instance (not JFrame)
                 */
@@ -993,7 +1015,7 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra
 
                /**
                 * If the action has been performed
-                *
+                * <p>
                 * @param e The performed action event
                 */
                @Override