From faa9042d8158d4fed3e36f1562240f37e2335319 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Fri, 18 Sep 2015 11:59:56 +0200 Subject: [PATCH] =?utf8?q?More=20cleanups=20Signed-off-by:Roland=20H=C3=A4?= =?utf8?q?der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../client/BaseAddressbookClient.java | 3 ++- .../addressbook/client/gui/SwingClient.java | 12 +++--------- .../contact/AddressbookContactManager.java | 16 ---------------- 3 files changed, 5 insertions(+), 26 deletions(-) diff --git a/src/org/mxchange/addressbook/client/BaseAddressbookClient.java b/src/org/mxchange/addressbook/client/BaseAddressbookClient.java index a21dbec0..d1551b7d 100644 --- a/src/org/mxchange/addressbook/client/BaseAddressbookClient.java +++ b/src/org/mxchange/addressbook/client/BaseAddressbookClient.java @@ -72,7 +72,7 @@ public abstract class BaseAddressbookClient extends BaseClient implements Addres * @param menuType Menu type instance to return * @return Menu or null if not found */ - public Menu getMenu (final String menuType) { + private Menu getMenu (final String menuType) { // Default is not found Menu menu = null; @@ -135,6 +135,7 @@ public abstract class BaseAddressbookClient extends BaseClient implements Addres // Trace message this.getLogger().trace(MessageFormat.format("menuType={0} - CALLED!", menuType)); //NOI18N + // Get menu from type Menu menu = this.getMenu(menuType); // Is the menu set? diff --git a/src/org/mxchange/addressbook/client/gui/SwingClient.java b/src/org/mxchange/addressbook/client/gui/SwingClient.java index db75caf0..fe62846f 100644 --- a/src/org/mxchange/addressbook/client/gui/SwingClient.java +++ b/src/org/mxchange/addressbook/client/gui/SwingClient.java @@ -20,7 +20,6 @@ import java.io.IOException; import java.sql.SQLException; import org.mxchange.addressbook.client.AddressbookClient; import org.mxchange.addressbook.client.BaseAddressbookClient; -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; @@ -75,17 +74,17 @@ public class SwingClient extends BaseAddressbookClient implements AddressbookCli } @Override - public void doChangeOwnAddressData (Contact contact) { + public void doChangeOwnAddressData (final Contact contact) { throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. //NOI18N } @Override - public void doChangeOwnNameData (Contact contact) { + public void doChangeOwnNameData (final Contact contact) { throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. //NOI18N } @Override - public void doChangeOwnOtherData (Contact contact) { + public void doChangeOwnOtherData (final Contact contact) { throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. //NOI18N } @@ -150,11 +149,6 @@ public class SwingClient extends BaseAddressbookClient implements AddressbookCli throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. //NOI18N } - @Override - public Menu getMenu (final String menuType) { - throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. //NOI18N - } - /** * Returns a Swing menu item * diff --git a/src/org/mxchange/addressbook/manager/contact/AddressbookContactManager.java b/src/org/mxchange/addressbook/manager/contact/AddressbookContactManager.java index c3067ca3..7a5e5eed 100644 --- a/src/org/mxchange/addressbook/manager/contact/AddressbookContactManager.java +++ b/src/org/mxchange/addressbook/manager/contact/AddressbookContactManager.java @@ -681,22 +681,6 @@ public class AddressbookContactManager extends BaseManager implements Manageable this.getLogger().trace("EXIT!"); //NOI18N } - @Override - public final int size () throws IOException { - // Init size - int size = -1; - - try { - size = ((AddressbookContactFrontend) this.getFrontend()).getContactsCount(); - } catch (final SQLException ex) { - // Something happened - this.abortProgramWithException(ex); - } - - // Return amount - return size; - } - /** * Fills the column names array with strings from bundle */ -- 2.39.5