Author: tchemit Date: 2008-01-20 13:41:55 +0000 (Sun, 20 Jan 2008) New Revision: 259 Modified: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/SimExplorer.java Log: javadoc + licence Modified: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/SimExplorer.java =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/SimExplorer.java 2008-01-20 13:41:28 UTC (rev 258) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/SimExplorer.java 2008-01-20 13:41:55 UTC (rev 259) @@ -1,6 +1,6 @@ /* -* \#\#% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin, -* Tony Chemit +* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin, +* Tony Chemit, Gabriel Landais * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -15,7 +15,7 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -* \#\#% */ +* ##% */ package fr.cemagref.simexplorer.is; import fr.cemagref.simexplorer.is.service.MockStorageServiceImpl; @@ -27,7 +27,11 @@ import java.io.IOException; -/** @author tony */ +/** + * L'application principale + * + * @author chemit + */ public class SimExplorer { /** le context principal de l'application */ @@ -36,10 +40,10 @@ /** l'ui principale de l'application */ protected static SimExplorerMainUI ui; - /** le service de données local*/ + /** le service de données local */ private static StorageService remoteStorageService; - /** le service de données distant*/ + /** le service de données distant */ protected static StorageService storageService; public static SimExplorerContext getContext() { @@ -91,12 +95,10 @@ } } - /** - * Lancement de l'ui. - * <p/> - * TODO ne doit être lancée que si nécessaire. - */ + /** Lancement de l'ui après init de l'application. */ public static void launch() { + + // init ui SimExplorerMainUI mainUI = getUI(); SimExplorerConfig conf = getContext().getConfig(); @@ -119,6 +121,7 @@ public static void main(String... args) throws Exception { + // init application (parser,config,i18n,...) init(args); // launch actions required @@ -136,26 +139,27 @@ } - protected SimExplorer() { - // protected restricted access - } - - protected static void checkInitContext() { - if (context == null) { - throw new IllegalStateException("context is null, you must init first the " + SimExplorer.class.getName() + " class via init method"); - } - } - public static StorageService getStorageService() { if (storageService == null) { storageService = new MockStorageServiceImpl(); } return storageService; } + public static StorageService getRemoteStorageService() { if (remoteStorageService == null) { remoteStorageService = new MockStorageServiceImpl(); } - return remoteStorageService ; + return remoteStorageService; } + + protected static void checkInitContext() { + if (context == null) { + throw new IllegalStateException("context is null, you must init first the " + SimExplorer.class.getName() + " class via init method"); + } + } + + protected SimExplorer() { + // protected restricted access + } }
participants (1)
-
tchemit@users.labs.libre-entreprise.org