]> git.mxchange.org Git - jbonuscard-lib.git/commitdiff
Re-added methods in interface as they are needed by Swing table models + renamed...
authorRoland Haeder <roland@mxchange.org>
Fri, 4 Sep 2015 18:51:13 +0000 (20:51 +0200)
committerRoland Haeder <roland@mxchange.org>
Fri, 4 Sep 2015 18:51:13 +0000 (20:51 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

src/org/mxchange/addressbook/client/BaseAddressbookClient.java
src/org/mxchange/addressbook/manager/contact/AddressbookContactManager.java
src/org/mxchange/addressbook/manager/contact/ManageableAddressbookContact.java

index 35cbab9941f354bd10e2773b7c6fd6a416869b7f..679bb4a727f12f7794e1d7285d1449e9cb0458e1 100644 (file)
@@ -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
index 18c8bd48745da2b04b1cf5b6ed16c75e7c6d211d..24bc39f66a57bae8fc7a16fbb4e51a5785f8f868 100644 (file)
@@ -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
index 08474017c598e2dbcfb8a88ddbbbda52d32921ba..71977e3b1cf500d7ab29949a3ac6e6866fa162e1 100644 (file)
@@ -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 ();
 }