From: Roland Haeder Date: Fri, 18 Sep 2015 09:59:56 +0000 (+0200) Subject: More cleanups X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=faa9042d8158d4fed3e36f1562240f37e2335319;p=jaddressbook-lib.git More cleanups Signed-off-by:Roland Häder --- 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 */