From: Roland Haeder Date: Sat, 10 Oct 2015 20:02:01 +0000 (+0200) Subject: Rewrite: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c91c1d0e34060b6601dd680e3fdf8d688800bd6f;p=jfinancials-swing.git Rewrite: - introduced jcountry-core which is a library for handling country-related data, e.g. dial prefix, country code ... - introduced jphone-core which is a library for handling phone, fax and cell phone numbers - these both new libraries required a rewrite of many parts --- diff --git a/.gitignore b/.gitignore index 8f32b37..0383bcc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ -/nbproject/private/ -/manifest.mf -/build/ -/data/*.* -/dist/ -/*.properties +/nbproject/private/ +/nbproject/*~ +/manifest.mf +/build/ +/dist/ +/data/* +/*.properties diff --git a/lib/jcontacts-business-core.jar b/lib/jcontacts-business-core.jar index 9607d5c..5665c86 100644 Binary files a/lib/jcontacts-business-core.jar and b/lib/jcontacts-business-core.jar differ diff --git a/lib/jcontacts-core.jar b/lib/jcontacts-core.jar index 98ca617..855385d 100644 Binary files a/lib/jcontacts-core.jar and b/lib/jcontacts-core.jar differ diff --git a/lib/jcore-logger-lib.jar b/lib/jcore-logger-lib.jar index 8e5a5b9..4cb7da5 100644 Binary files a/lib/jcore-logger-lib.jar and b/lib/jcore-logger-lib.jar differ diff --git a/lib/jcore-swing.jar b/lib/jcore-swing.jar index 178b58f..2428479 100644 Binary files a/lib/jcore-swing.jar and b/lib/jcore-swing.jar differ diff --git a/lib/jcore.jar b/lib/jcore.jar index 57a3b6c..1a75fc0 100644 Binary files a/lib/jcore.jar and b/lib/jcore.jar differ diff --git a/lib/jcountry-core.jar b/lib/jcountry-core.jar new file mode 100644 index 0000000..ed08999 Binary files /dev/null and b/lib/jcountry-core.jar differ diff --git a/lib/jphone-core.jar b/lib/jphone-core.jar new file mode 100644 index 0000000..480f9f8 Binary files /dev/null and b/lib/jphone-core.jar differ diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml index 93e31a9..f132aa4 100644 --- a/nbproject/build-impl.xml +++ b/nbproject/build-impl.xml @@ -1,1425 +1,1454 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set src.dir - Must set test.src.dir - Must set build.dir - Must set dist.dir - Must set build.classes.dir - Must set dist.javadoc.dir - Must set build.test.classes.dir - Must set build.test.results.dir - Must set build.classes.excludes - Must set dist.jar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set javac.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - No tests executed. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set JVM to use for profiling in profiler.info.jvm - Must set profiler agent JVM arguments in profiler.info.jvmargs.agent - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select some files in the IDE or set javac.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - To run this application from the command line without Ant, try: - - java -jar "${dist.jar.resolved}" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set run.class - - - - Must select one file in the IDE or set run.class - - - - - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set debug.class - - - - - Must select one file in the IDE or set debug.class - - - - - Must set fix.includes - - - - - - - - - - This target only works when run from inside the NetBeans IDE. - - - - - - - - - Must select one file in the IDE or set profile.class - This target only works when run from inside the NetBeans IDE. - - - - - - - - - This target only works when run from inside the NetBeans IDE. - - - - - - - - - - - - - This target only works when run from inside the NetBeans IDE. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set run.class - - - - - - Must select some files in the IDE or set test.includes - - - - - Must select one file in the IDE or set run.class - - - - - Must select one file in the IDE or set applet.url - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select some files in the IDE or set javac.includes - - - - - - - - - - - - - - - - - - - - Some tests failed; see details above. - - - - - - - - - Must select some files in the IDE or set test.includes - - - - Some tests failed; see details above. - - - - Must select some files in the IDE or set test.class - Must select some method in the IDE or set test.method - - - - Some tests failed; see details above. - - - - - Must select one file in the IDE or set test.class - - - - Must select one file in the IDE or set test.class - Must select some method in the IDE or set test.method - - - - - - - - - - - - - - Must select one file in the IDE or set applet.url - - - - - - - - - Must select one file in the IDE or set applet.url - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties index 00bdd79..0e4e369 100644 --- a/nbproject/genfiles.properties +++ b/nbproject/genfiles.properties @@ -3,6 +3,6 @@ build.xml.script.CRC32=9bef99a6 build.xml.stylesheet.CRC32=8064a381@1.75.2.48 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=b3f3ee43 -nbproject/build-impl.xml.script.CRC32=96150614 +nbproject/build-impl.xml.data.CRC32=a2ef3a71 +nbproject/build-impl.xml.script.CRC32=16a7d17c nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/nbproject/project.properties b/nbproject/project.properties index 763f1ce..df04d25 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -35,6 +35,8 @@ file.reference.jcontacts-core.jar=lib/jcontacts-core.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 +file.reference.jcountry-core.jar=lib/jcountry-core.jar +file.reference.jphone-core.jar=lib/jphone-core.jar includes=** jar.archive.disabled=${jnlp.enabled} jar.compress=false @@ -43,6 +45,8 @@ javac.classpath=\ ${file.reference.jcore.jar}:\ ${file.reference.jcore-swing.jar}:\ ${file.reference.jcore-logger-lib.jar}:\ + ${file.reference.jcountry-core.jar}:\ + ${file.reference.jphone-core.jar}:\ ${file.reference.jcontacts-core.jar}:\ ${file.reference.jcontacts-business-core.jar}:\ ${reference.addressbook-lib.jar}:\ @@ -107,5 +111,7 @@ source.reference.jcontacts-core.jar=../jcontacts-core/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 +source.reference.jcountry-core.jar=../jcountry-core/src/ +source.reference.jphone-core.jar=../jphone-core/src/ src.dir=src test.src.dir=test diff --git a/nbproject/project.xml b/nbproject/project.xml index 6ba2092..9183d1b 100644 --- a/nbproject/project.xml +++ b/nbproject/project.xml @@ -1,28 +1,28 @@ - org.netbeans.modules.java.j2seproject - - - addressbook-swing - - - - - - - - - .\lib\nblibraries.properties - - - - addressbook-lib - jar - - jar - clean - jar - - - + org.netbeans.modules.java.j2seproject + + + addressbook-swing + + + + + + + + + .\lib\nblibraries.properties + + + + addressbook-lib + jar + + jar + clean + jar + + + diff --git a/src/org/mxchange/addressbook/client/console/ConsoleClient.java b/src/org/mxchange/addressbook/client/console/ConsoleClient.java index 5cdc068..4f640be 100644 --- a/src/org/mxchange/addressbook/client/console/ConsoleClient.java +++ b/src/org/mxchange/addressbook/client/console/ConsoleClient.java @@ -38,6 +38,10 @@ import org.mxchange.jcontacts.exceptions.ContactAlreadyAddedException; import org.mxchange.jcore.application.Application; import org.mxchange.jcore.exceptions.MenuInitializationException; import org.mxchange.jcore.exceptions.UnhandledUserChoiceException; +import org.mxchange.jcountry.data.Country; +import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber; +import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber; +import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber; /** * A client for the console @@ -82,7 +86,7 @@ public class ConsoleClient extends BaseAddressbookClient implements AddressbookC } // Simple display ... - this.outputMessage(MessageFormat.format("Strasse, PLZ Ort, Land: {0}\n{1} {2}\n{3}", contact.getStreet(), contact.getZipCode(), contact.getCity(), contact.getCountryCode())); + this.outputMessage(MessageFormat.format("Strasse, PLZ Ort, Land: {0}\n{1} {2}\n{3}", contact.getStreet(), contact.getZipCode(), contact.getCity(), contact.getCountry())); // Trace message this.getLogger().logTrace("EXIT!"); //NOI18N @@ -157,13 +161,13 @@ public class ConsoleClient extends BaseAddressbookClient implements AddressbookC String city = manager.enterOwnCity(); // Get country code - String countryCode = manager.enterOwnCountryCode(); + Country country = manager.enterOwnCountryCode(); // Update address data contact.setStreet(streetNumber); contact.setZipCode(zipCode); contact.setCity(city); - contact.setCountryCode(countryCode); + contact.setCountry(country); // Trace message this.getLogger().logTrace("EXIT!"); //NOI18N @@ -228,13 +232,13 @@ public class ConsoleClient extends BaseAddressbookClient implements AddressbookC ContactFacade manager = (ContactFacade) this.getFacade(); // Phone number - String phoneNumber = manager.enterOwnPhoneNumber(); + DialableLandLineNumber phoneNumber = manager.enterOwnPhoneNumber(); // Phone number - String cellphonePhoneNumber = manager.enterOwnCellNumber(); + DialableCellphoneNumber cellphonePhoneNumber = manager.enterOwnCellNumber(); // Fax number - String faxNumber = manager.enterOwnFaxNumber(); + DialableFaxNumber faxNumber = manager.enterOwnFaxNumber(); // Email address String email = manager.enterOwnEmailAddress(); diff --git a/src/org/mxchange/addressbook/client/gui/AddressbookFrame.java b/src/org/mxchange/addressbook/client/gui/AddressbookFrame.java index c6c41b5..c1c0346 100644 --- a/src/org/mxchange/addressbook/client/gui/AddressbookFrame.java +++ b/src/org/mxchange/addressbook/client/gui/AddressbookFrame.java @@ -850,7 +850,7 @@ public class AddressbookFrame extends BaseAddressbookSystem implements ClientFra } /** - * Initialize other dialogs (e.g. "Add contact") + * Initialize other dialogs (example: "Add contact") */ private void initOtherDialogs () { // Trace message diff --git a/src/org/mxchange/addressbook/facade/contact/AddressbookContactFacade.java b/src/org/mxchange/addressbook/facade/contact/AddressbookContactFacade.java index 9aabe4d..b6635e6 100644 --- a/src/org/mxchange/addressbook/facade/contact/AddressbookContactFacade.java +++ b/src/org/mxchange/addressbook/facade/contact/AddressbookContactFacade.java @@ -34,6 +34,10 @@ import org.mxchange.jcore.exceptions.UnhandledUserChoiceException; import org.mxchange.jcore.facade.BaseFacade; import org.mxchange.jcoreeelogger.beans.local.logger.Log; import org.mxchange.jcoreeelogger.beans.local.logger.LoggerBeanLocal; +import org.mxchange.jcountry.data.Country; +import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber; +import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber; +import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber; /** * A facade for contacts. @@ -314,7 +318,7 @@ public class AddressbookContactFacade extends BaseFacade implements ContactFacad } @Override - public String enterOwnCellNumber () { + public DialableCellphoneNumber enterOwnCellNumber () { // Trace message this.getLogger().logTrace("CALLED!"); //NOI18N @@ -358,7 +362,7 @@ public class AddressbookContactFacade extends BaseFacade implements ContactFacad } @Override - public String enterOwnCountryCode () { + public Country enterOwnCountryCode () { // Trace message this.getLogger().logTrace("CALLED!"); //NOI18N @@ -391,7 +395,7 @@ public class AddressbookContactFacade extends BaseFacade implements ContactFacad } @Override - public String enterOwnFaxNumber () { + public DialableFaxNumber enterOwnFaxNumber () { // Trace message this.getLogger().logTrace("CALLED!"); //NOI18N @@ -424,7 +428,7 @@ public class AddressbookContactFacade extends BaseFacade implements ContactFacad } @Override - public String enterOwnPhoneNumber () { + public DialableLandLineNumber enterOwnPhoneNumber () { // Trace message this.getLogger().logTrace("CALLED!"); //NOI18N @@ -457,7 +461,7 @@ public class AddressbookContactFacade extends BaseFacade implements ContactFacad } @Override - public final int getColumnCount () { + public int getColumnCount () { assert (this.columnNames instanceof List) : "this.columnNames is not initialized"; //NOI18N return this.columnNames.size(); diff --git a/src/org/mxchange/addressbook/facade/contact/ContactFacade.java b/src/org/mxchange/addressbook/facade/contact/ContactFacade.java index c0dc2dd..1e93bf4 100644 --- a/src/org/mxchange/addressbook/facade/contact/ContactFacade.java +++ b/src/org/mxchange/addressbook/facade/contact/ContactFacade.java @@ -21,6 +21,10 @@ import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jcontacts.contact.gender.Gender; import org.mxchange.jcontacts.exceptions.ContactAlreadyAddedException; import org.mxchange.jcore.facade.Facade; +import org.mxchange.jcountry.data.Country; +import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber; +import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber; +import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber; /** * An interface for addressbook contact manager @@ -107,7 +111,7 @@ public interface ContactFacade extends Facade { *

* @return Cellphone number */ - public String enterOwnCellNumber (); + public DialableCellphoneNumber enterOwnCellNumber (); /** * Allows the user to enter own city name. @@ -135,7 +139,7 @@ public interface ContactFacade extends Facade { *

* @return Country code */ - public String enterOwnCountryCode (); + public Country enterOwnCountryCode (); /** * Allows the user to enter own email address. @@ -156,7 +160,7 @@ public interface ContactFacade extends Facade { *

* @return Fax number */ - public String enterOwnFaxNumber (); + public DialableFaxNumber enterOwnFaxNumber (); /** * Allows the user to enter own surname. @@ -177,7 +181,7 @@ public interface ContactFacade extends Facade { *

* @return Phone number */ - public String enterOwnPhoneNumber (); + public DialableLandLineNumber enterOwnPhoneNumber (); /** * Allows the user to enter own street and house number.