From d08c925dc84522e24fc7955d37ab667bb0abceee Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Fri, 4 Sep 2015 20:51:13 +0200 Subject: [PATCH] =?utf8?q?Re-added=20methods=20in=20interface=20as=20they?= =?utf8?q?=20are=20needed=20by=20Swing=20table=20models=20+=20renamed=20me?= =?utf8?q?thod=20name=20to=20correct=20one=20Signed-off-by:Roland=20H?= =?utf8?q?=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../client/BaseAddressbookClient.java | 2 +- .../contact/AddressbookContactManager.java | 19 ---------- .../contact/ManageableAddressbookContact.java | 38 +++++++++++++++++++ 3 files changed, 39 insertions(+), 20 deletions(-) diff --git a/src/org/mxchange/addressbook/client/BaseAddressbookClient.java b/src/org/mxchange/addressbook/client/BaseAddressbookClient.java index 35cbab9..679bb4a 100644 --- a/src/org/mxchange/addressbook/client/BaseAddressbookClient.java +++ b/src/org/mxchange/addressbook/client/BaseAddressbookClient.java @@ -116,7 +116,7 @@ public abstract class BaseAddressbookClient extends BaseClient implements Addres ManageableAddressbookContact manager = new AddressbookContactManager((Client) this); // Set it here - this.setContactManager(manager); + this.setManager(manager); // Debug message this.getLogger().debug("Contact manager has been initialized."); //NOI18N diff --git a/src/org/mxchange/addressbook/manager/contact/AddressbookContactManager.java b/src/org/mxchange/addressbook/manager/contact/AddressbookContactManager.java index 18c8bd4..24bc39f 100644 --- a/src/org/mxchange/addressbook/manager/contact/AddressbookContactManager.java +++ b/src/org/mxchange/addressbook/manager/contact/AddressbookContactManager.java @@ -554,12 +554,6 @@ public class AddressbookContactManager extends BaseManager implements Manageable return this.columnNames.size(); } - /** - * Getter for column name at given index. - * - * @param columnIndex Column index - * @return Database column name - */ @Override public String getColumnName (final int columnIndex) { assert (this.columnNames instanceof List) : "this.columnNames is not initialized"; //NOI18N @@ -568,12 +562,6 @@ public class AddressbookContactManager extends BaseManager implements Manageable return this.columnNames.get(columnIndex); } - /** - * Getter for translated column name at given index. - * - * @param columnIndex Column index - * @return Human-readable column name - */ @Override public String getTranslatedColumnName (final int columnIndex) { assert (this.translatedColumnNames instanceof List) : "this.translatedColumnNames is not initialized"; //NOI18N @@ -582,13 +570,6 @@ public class AddressbookContactManager extends BaseManager implements Manageable return this.translatedColumnNames.get(columnIndex); } - /** - * Somewhat "getter" for value from given row and column index - * - * @param rowIndex Row index - * @param columnIndex Column index - * @return Value from given row/column - */ @Override public Object getValueFromRowColumn (final int rowIndex, final int columnIndex) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { // Trace message diff --git a/src/org/mxchange/addressbook/manager/contact/ManageableAddressbookContact.java b/src/org/mxchange/addressbook/manager/contact/ManageableAddressbookContact.java index 0847401..71977e3 100644 --- a/src/org/mxchange/addressbook/manager/contact/ManageableAddressbookContact.java +++ b/src/org/mxchange/addressbook/manager/contact/ManageableAddressbookContact.java @@ -209,4 +209,42 @@ public interface ManageableAddressbookContact extends Manageable { * @throws java.io.IOException If an IO error occurs */ public boolean isOwnContactAdded () throws IOException; + + /** + * Getter for translated column name at given index. + * + * @param columnIndex Column index + * @return Human-readable column name + * TODO: This is needed for TableModel in Swing + */ + public String getTranslatedColumnName (final int columnIndex); + + /** + * Somewhat "getter" for value from given row and column index + * + * @param rowIndex Row index + * @param columnIndex Column index + * @return Value from given row/column + * @throws java.lang.NoSuchMethodException If the method was not found + * @throws java.lang.IllegalAccessException If the accessed method was not public + * @throws java.lang.reflect.InvocationTargetException Something else happened? + * TODO: This is needed for TableModel in Swing + */ + public Object getValueFromRowColumn (final int rowIndex, final int columnIndex) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException; + + /** + * Getter for column name at given index. + * + * @param columnIndex Column index + * @return Database column name + * TODO: This is needed for TableModel in Swing + */ + public String getColumnName (final int columnIndex); + + /** + * Getter for column count + * @return Column count + * TODO: This is needed for TableModel in Swing + */ + public int getColumnCount (); } -- 2.39.5