From: Roland Haeder Date: Fri, 4 Sep 2015 18:51:13 +0000 (+0200) Subject: Re-added methods in interface as they are needed by Swing table models + renamed... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d08c925dc84522e24fc7955d37ab667bb0abceee;p=jfinancials-swing.git Re-added methods in interface as they are needed by Swing table models + renamed method name to correct one 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 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 (); }