]> git.mxchange.org Git - addressbook-swing.git/blobdiff - src/org/mxchange/addressbook/application/AddressbookApplication.java
auto-reformatted most project files
[addressbook-swing.git] / src / org / mxchange / addressbook / application / AddressbookApplication.java
index 4f07e31ebd8b103eeea7b08d1de9ee944d6bf3e7..813e7974e3428a0746f873e9150cf3218eb17e35 100644 (file)
@@ -92,8 +92,24 @@ public class AddressbookApplication extends BaseApplication implements Applicati
        }
 
        /**
-        * Bootstraps application
+        * Main method (entry point)
+        * <p>
+        * @param args the command line arguments
+        */
+       public static void main (String[] args) {
+               // Start application
+               new AddressbookApplication().start(args);
+       }
+
+       /**
+        * Getter for printable application name
+        * <p>
+        * @return A printable name
         */
+       public static String printableTitle () {
+               return MessageFormat.format("{0} v{1}", APP_TITLE, APP_VERSION); //NOI18N
+       }
+
        @Override
        public void doBootstrap () {
                this.getLogger().logDebug("Initializing application ..."); //NOI18N
@@ -142,9 +158,6 @@ public class AddressbookApplication extends BaseApplication implements Applicati
                this.getLogger().logTrace("EXIT!"); //NOI18N
        }
 
-       /**
-        * Main loop of the application
-        */
        @Override
        public void doMainLoop () throws MenuInitializationException {
                // Get client and cast it
@@ -202,6 +215,24 @@ public class AddressbookApplication extends BaseApplication implements Applicati
                System.exit(0);
        }
 
+       /**
+        * Enables console client by setting propper flag
+        */
+       private void enableConsoleClient () {
+               this.getLogger().logDebug("Enabling console client (may become optional client) ..."); //NOI18N
+               this.consoleClient = true;
+               this.guiClient = false;
+       }
+
+       /**
+        * Enables GUI client by setting propper flag
+        */
+       private void enableGuiClient () {
+               this.getLogger().logDebug("Enabling GUI client (may become new default client) ..."); //NOI18N
+               this.consoleClient = false;
+               this.guiClient = true;
+       }
+
        /**
         * Initializes this application
         */
@@ -223,15 +254,6 @@ public class AddressbookApplication extends BaseApplication implements Applicati
                }
        }
 
-       /**
-        * Logs given exception
-        *
-        * @param exception Throwable
-        */
-       protected void logException (final Throwable exception) {
-               this.getLogger().logException(exception);
-       }
-
        /**
         * Initializes properties
         */
@@ -239,37 +261,6 @@ public class AddressbookApplication extends BaseApplication implements Applicati
                throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
        }
 
-       /**
-        * Log exception and abort program.
-        *
-        * @param throwable Throwable
-        */
-       protected void abortProgramWithException (final Throwable throwable) {
-               // Log exception
-               this.logException(throwable);
-
-               // Abort here
-               System.exit(1);
-       }
-
-       /**
-        * Enables console client by setting propper flag
-        */
-       private void enableConsoleClient () {
-               this.getLogger().logDebug("Enabling console client (may become optional client) ..."); //NOI18N
-               this.consoleClient = true;
-               this.guiClient = false;
-       }
-
-       /**
-        * Enables GUI client by setting propper flag
-        */
-       private void enableGuiClient () {
-               this.getLogger().logDebug("Enabling GUI client (may become new default client) ..."); //NOI18N
-               this.consoleClient = false;
-               this.guiClient = true;
-       }
-
        /**
         * Checks whether the client shoule be console client should be launched by
         * checking if -console is set.
@@ -369,30 +360,34 @@ public class AddressbookApplication extends BaseApplication implements Applicati
        }
 
        /**
-        * Main method (entry point)
+        * Log exception and abort program.
         * <p>
-        * @param args the command line arguments
+        * @param throwable Throwable
         */
-       public static void main (String[] args) {
-               // Start application
-               new AddressbookApplication().start(args);
+       protected void abortProgramWithException (final Throwable throwable) {
+               // Log exception
+               this.logException(throwable);
+               
+               // Abort here
+               System.exit(1);
        }
 
        /**
-        * Getter for printable application name
+        * Getter for logger instance
         * <p>
-        * @return A printable name
+        * @return Logger instance
         */
-       public static String printableTitle () {
-               return MessageFormat.format("{0} v{1}", APP_TITLE, APP_VERSION); //NOI18N
+       protected LoggerBeanLocal getLogger () {
+               return this.logger;
        }
 
        /**
-        * Getter for logger instance
-        *
-        * @return Logger instance
+        * Logs given exception
+        * <p>
+        * @param exception Throwable
         */
-       protected LoggerBeanLocal getLogger () {
-               return this.logger;
+       protected void logException (final Throwable exception) {
+               this.getLogger().logException(exception);
        }
+
 }