]> git.mxchange.org Git - jaddressbook-lib.git/commitdiff
Continued rewriting:
authorRoland Haeder <roland@mxchange.org>
Thu, 1 Oct 2015 12:49:10 +0000 (14:49 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 1 Oct 2015 12:49:10 +0000 (14:49 +0200)
- added jcontacts-lib
- updated jars
- fixed imports
Signed-off-by:Roland Häder <roland@mxchange.org>

lib/jcontacts-lib.jar [new file with mode: 0644]
lib/jcore-swing.jar
lib/jcore.jar
nbproject/project.properties
src/org/mxchange/addressbook/client/AddressbookClient.java
src/org/mxchange/addressbook/exceptions/ContactAlreadyAddedException.java
src/org/mxchange/addressbook/manager/contact/AddressbookContactManager.java
src/org/mxchange/addressbook/manager/contact/ManageableContactAddressbook.java

diff --git a/lib/jcontacts-lib.jar b/lib/jcontacts-lib.jar
new file mode 100644 (file)
index 0000000..6059126
Binary files /dev/null and b/lib/jcontacts-lib.jar differ
index bcf9b93079c88d93034bb5b39be2ae8e5c77b143..c751f576a07947da18dcbd7c3eda7b5d1373c1cb 100644 (file)
Binary files a/lib/jcore-swing.jar and b/lib/jcore-swing.jar differ
index 848bebf4503c8caeeb9557874ffa4a124337d3fb..197b9734f769ec7838a7632dec07f052ddc5990f 100644 (file)
Binary files a/lib/jcore.jar and b/lib/jcore.jar differ
index 4bf46accfe1dfa4c2ea1082e849bccd38478a3b8..829a0034cd441ea8b8c473e8969ec5ab7cf5d7b3 100644 (file)
@@ -30,6 +30,7 @@ dist.jar=${dist.dir}/addressbook-lib.jar
 dist.javadoc.dir=${dist.dir}/javadoc
 endorsed.classpath=
 excludes=
+file.reference.jcontacts-lib.jar=lib/jcontacts-lib.jar
 file.reference.jcore-logger-lib.jar=lib/jcore-logger-lib.jar
 file.reference.jcore-swing.jar=lib/jcore-swing.jar
 file.reference.jcore.jar=lib/jcore.jar
@@ -41,6 +42,7 @@ javac.classpath=\
     ${file.reference.jcore.jar}:\
     ${file.reference.jcore-swing.jar}:\
     ${file.reference.jcore-logger-lib.jar}:\
+    ${file.reference.jcontacts-lib.jar}:\
     ${libs.jpa20-persistence.classpath}
 # Space-separated list of extra javac options
 javac.compilerargs=-Xlint:deprecation -Xlint:unchecked
@@ -90,6 +92,7 @@ run.test.classpath=\
     ${javac.test.classpath}:\
     ${build.test.classes.dir}
 source.encoding=UTF-8
+source.reference.jcontacts-lib.jar=../jcontacts-lib/src/
 source.reference.jcore-logger-lib.jar=../jcore-logger-lib/src/
 source.reference.jcore-swing.jar=../jcore-swing/src
 source.reference.jcore.jar=../jcore/src
index 7045abe51a66cadb4cdfe38399d24d64781226d3..ff8442bbf5fbaff5214a2cd9a4d13ec5d18a94f2 100644 (file)
 package org.mxchange.addressbook.client;
 
 import org.mxchange.addressbook.menu.item.SelectableMenuItem;
+import org.mxchange.jcontacts.contact.Contact;
+import org.mxchange.jcontacts.contact.gender.Gender;
 import org.mxchange.jcore.client.Client;
 import org.mxchange.jcore.exceptions.MenuInitializationException;
 import org.mxchange.jcore.exceptions.UnhandledUserChoiceException;
-import org.mxchange.jcore.model.contact.Contact;
-import org.mxchange.jcore.model.contact.gender.Gender;
 
 /**
  * A special client interface for addressbook applications.
@@ -30,6 +30,34 @@ import org.mxchange.jcore.model.contact.gender.Gender;
  */
 public interface AddressbookClient extends Client {
 
+       /**
+        * Displays a "box" for the address
+        * <p>
+        * @param contact Contact to show address from
+        */
+       public void displayAddressBox (final Contact contact);
+
+       /**
+        * Displays a "box" for the name
+        * <p>
+        * @param contact Contact to show name from
+        */
+       public void displayNameBox (final Contact contact);
+
+       /**
+        * Displays a "box" for other data
+        * <p>
+        * @param contact Contact to show other data from
+        */
+       public void displayOtherDataBox (final Contact contact);
+
+       /**
+        * Shows given contact instamce
+        *
+        * @param contact Contact instance
+        */
+       public void show (final Contact contact);
+
        /**
         * The user changes own address data
         * <p>
index c59909f7eff48ed8908a07c725a333690d4a2038..53e3ac069e86bb90ef6e8a3521bcc69f451240b9 100644 (file)
@@ -17,7 +17,7 @@
 package org.mxchange.addressbook.exceptions;
 
 import java.text.MessageFormat;
-import org.mxchange.jcore.model.contact.Contact;
+import org.mxchange.jcontacts.contact.Contact;
 
 /**
  * Thrown if the given Contact instance is already added
index 9b0a0b33d45f358615c38e3d031ec4fb1ebcc4e5..7670cecf009c97bf80b5bb8fb6986e96e15cdf0b 100644 (file)
@@ -26,11 +26,11 @@ import java.util.Iterator;
 import java.util.List;
 import org.mxchange.addressbook.client.AddressbookClient;
 import org.mxchange.addressbook.exceptions.ContactAlreadyAddedException;
+import org.mxchange.jcontacts.contact.Contact;
+import org.mxchange.jcontacts.contact.gender.Gender;
 import org.mxchange.jcore.client.Client;
 import org.mxchange.jcore.exceptions.UnhandledUserChoiceException;
 import org.mxchange.jcore.manager.BaseManager;
-import org.mxchange.jcore.model.contact.Contact;
-import org.mxchange.jcore.model.contact.gender.Gender;
 import org.mxchange.jcoreeelogger.beans.local.logger.Log;
 import org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal;
 
@@ -238,12 +238,12 @@ public class AddressbookContactManager extends BaseManager implements Manageable
                // It must be found
                assert (contact instanceof Contact) : ": contact is not implementing Contact: " + contact;
 
-               // Display contact
-               this.getClient().show(contact);
-
                // Get and cast client instance
                AddressbookClient client = (AddressbookClient) this.getClient();
 
+               // Display contact
+               client.show(contact);
+
                try {
                        // Ask user what to change
                        client.userChooseChangeContactData(contact);
index c288c377b7ab7c8f9c458ee899edb074bec10803..ac9b1ebe38e70bfb1c246bc9320b703738aa6e7c 100644 (file)
@@ -20,9 +20,9 @@ import java.io.IOException;
 import java.lang.reflect.InvocationTargetException;
 import java.sql.SQLException;
 import org.mxchange.addressbook.exceptions.ContactAlreadyAddedException;
+import org.mxchange.jcontacts.contact.Contact;
+import org.mxchange.jcontacts.contact.gender.Gender;
 import org.mxchange.jcore.manager.Manageable;
-import org.mxchange.jcore.model.contact.Contact;
-import org.mxchange.jcore.model.contact.gender.Gender;
 
 /**
  * An interface for addressbook contact manager