Author: tchemit Date: 2008-01-20 12:09:15 +0000 (Sun, 20 Jan 2008) New Revision: 234 Modified: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/SimExplorer.java Log: ajout de propri?\195?\169t?\195?\169s persitentes pour l'ui : sizor (nombre de result par page) showLocalTab : pour afficher au dm?\195?\169arrage l'onglet local showRemoteTab : pour afficher au dm?\195?\169arrage l'onglet remote showSynchTab : pour afficher au dm?\195?\169arrage l'onglet synchronize + int?\195?\169gration du service storage 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 12:07:47 UTC (rev 233) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/SimExplorer.java 2008-01-20 12:09:15 UTC (rev 234) @@ -18,6 +18,8 @@ * \#\#% */ package fr.cemagref.simexplorer.is; +import fr.cemagref.simexplorer.is.service.MockStorageServiceImpl; +import fr.cemagref.simexplorer.is.service.StorageService; import fr.cemagref.simexplorer.is.ui.swing.JConfigUI; import fr.cemagref.simexplorer.is.ui.swing.SimExplorerTabManager; import org.codelutin.i18n.I18n; @@ -34,6 +36,12 @@ /** l'ui principale de l'application */ protected static SimExplorerMainUI ui; + /** le service de données local*/ + private static StorageService remoteStorageService; + + /** le service de données distant*/ + protected static StorageService storageService; + public static SimExplorerContext getContext() { checkInitContext(); return context; @@ -89,8 +97,24 @@ * TODO ne doit être lancée que si nécessaire. */ public static void launch() { + SimExplorerMainUI mainUI = getUI(); - getUI().setVisible(true); + SimExplorerConfig conf = getContext().getConfig(); + + if (conf.isShowLocalTab()) { + // show local tab + mainUI.getToolbar().getToggleTab_local().doClick(); + } + if (conf.isShowRemoteTab()) { + // show remote tab + mainUI.getToolbar().getToggleTab_remote().doClick(); + } + if (conf.isShowSynchTab()) { + // show synchronize tab + mainUI.getToolbar().getToggleTab_synchronize().doClick(); + } + + mainUI.setVisible(true); } public static void main(String... args) throws Exception { @@ -121,4 +145,17 @@ 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 ; + } }
participants (1)
-
tchemit@users.labs.libre-entreprise.org