Simexplorer-si-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- 1607 discussions
r264 - trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab
by tchemit@users.labs.libre-entreprise.org 20 Jan '08
by tchemit@users.labs.libre-entreprise.org 20 Jan '08
20 Jan '08
Author: tchemit
Date: 2008-01-20 13:50:20 +0000 (Sun, 20 Jan 2008)
New Revision: 264
Modified:
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ShowTabAction.java
Log:
structuration des beans
Modified: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ShowTabAction.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ShowTabAction.java 2008-01-20 13:43:43 UTC (rev 263)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ShowTabAction.java 2008-01-20 13:50:20 UTC (rev 264)
@@ -21,7 +21,7 @@
import fr.cemagref.simexplorer.is.SimExplorer;
import fr.cemagref.simexplorer.is.service.StorageService;
import fr.cemagref.simexplorer.is.ui.swing.action.SimExplorerAbstractTabAction;
-import fr.cemagref.simexplorer.is.ui.swing.bean.ListApplicationBean;
+import fr.cemagref.simexplorer.is.ui.swing.beans.ListApplicationBean;
import java.awt.event.ActionEvent;
1
0
r263 - trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing
by tchemit@users.labs.libre-entreprise.org 20 Jan '08
by tchemit@users.labs.libre-entreprise.org 20 Jan '08
20 Jan '08
Author: tchemit
Date: 2008-01-20 13:43:43 +0000 (Sun, 20 Jan 2008)
New Revision: 263
Modified:
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorerActionManager.java
Log:
structuration des actions
Modified: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorerActionManager.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorerActionManager.java 2008-01-20 13:43:12 UTC (rev 262)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorerActionManager.java 2008-01-20 13:43:43 UTC (rev 263)
@@ -31,6 +31,7 @@
import java.util.TreeMap;
import jaxx.runtime.JAXXObject;
+import fr.cemagref.simexplorer.is.ui.swing.action.SimExplorerAbstractAction;
/**
* La classe responsable de l'enregistrement des actions disponibles
1
0
r262 - trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing
by tchemit@users.labs.libre-entreprise.org 20 Jan '08
by tchemit@users.labs.libre-entreprise.org 20 Jan '08
20 Jan '08
Author: tchemit
Date: 2008-01-20 13:43:12 +0000 (Sun, 20 Jan 2008)
New Revision: 262
Modified:
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorerTabManager.java
Log:
structuration des actions
Modified: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorerTabManager.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorerTabManager.java 2008-01-20 13:42:42 UTC (rev 261)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorerTabManager.java 2008-01-20 13:43:12 UTC (rev 262)
@@ -24,6 +24,7 @@
import fr.cemagref.simexplorer.is.ui.swing.tab.JApplicationSynchronizeTab;
import fr.cemagref.simexplorer.is.ui.swing.util.MyTabHeader;
import fr.cemagref.simexplorer.is.ui.swing.util.MyToggleButton;
+import fr.cemagref.simexplorer.is.ui.swing.util.TabContent;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import static org.codelutin.i18n.I18n._;
@@ -247,22 +248,4 @@
dialog.setVisible(true);
}
- /** @author chemit */
- public static class ToggleTabAction extends SimExplorerAbstractTabAction {
- private static final long serialVersionUID = -8701628964349439830L;
-
- public ToggleTabAction(String name) {
- super(name, "toggleTab");
- }
- }
-
- /** @author chemit */
- public static class CloseTabAction extends SimExplorerAbstractTabAction {
- private static final long serialVersionUID = 352590468112645109L;
-
- public CloseTabAction(String name) {
- super(name, "closeTab");
- }
-
- }
}
1
0
r261 - in trunk/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing: . panel toolbar util
by tchemit@users.labs.libre-entreprise.org 20 Jan '08
by tchemit@users.labs.libre-entreprise.org 20 Jan '08
20 Jan '08
Author: tchemit
Date: 2008-01-20 13:42:42 +0000 (Sun, 20 Jan 2008)
New Revision: 261
Modified:
trunk/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/SimExplorerUI.jaxx
trunk/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/panel/JApplicationTable.jaxx
trunk/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/toolbar/JApplicationListToolbar.jaxx
trunk/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/toolbar/JApplicationTreeToolbar.jaxx
trunk/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/toolbar/JApplicationsListToolbar.jaxx
trunk/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/util/MyTabHeader.jaxx
Log:
structuration des actions
Modified: trunk/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/SimExplorerUI.jaxx
===================================================================
--- trunk/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/SimExplorerUI.jaxx 2008-01-20 13:42:23 UTC (rev 260)
+++ trunk/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/SimExplorerUI.jaxx 2008-01-20 13:42:42 UTC (rev 261)
@@ -27,17 +27,17 @@
<JMenuItem id="showTab_synchronize" enabled='false'
text='{_("simexplorer.main.menu.synchronize")}'
toolTipText='{_("simexplorer.main.menu.synchronize.tooltip")}'
- icon='{fr.cemagref.simexplorer.is.ui.swing.UIHelper.createImageIcon("synch.png")}'/>
+ icon='{fr.cemagref.simexplorer.is.ui.swing.util.UIHelper.createImageIcon("synch.png")}'/>
<JSeparator/>
<JMenuItem id="quit" enabled='false'
text='{_("simexplorer.main.menu.quit")}'
toolTipText='{_("simexplorer.main.menu.quit.tooltip")}'
- icon='{fr.cemagref.simexplorer.is.ui.swing.UIHelper.createImageIcon("quit.png")}'/>
+ icon='{fr.cemagref.simexplorer.is.ui.swing.util.UIHelper.createImageIcon("quit.png")}'/>
</JMenu>
<!-- menu config -->
<JMenu text='{_("simexplorer.config.menu")}'>
<JMenu text='{_("simexplorer.config.i18n.menu")}'
- icon='{fr.cemagref.simexplorer.is.ui.swing.UIHelper.createImageIcon("translate.png")}'>
+ icon='{fr.cemagref.simexplorer.is.ui.swing.util.UIHelper.createImageIcon("translate.png")}'>
<JMenuItem id="i18n_fr_FR" enabled='false'
text='{_("simexplorer.config.i18n.menu.fr")}'
toolTipText='{_("simexplorer.config.i18n.menu.fr.tooltip")}'/>
@@ -48,7 +48,7 @@
<JMenuItem id="config" enabled='false'
text='{_("simexplorer.config.menu.config")}'
toolTipText='{_("simexplorer.config.menu.config.tooltip")}'
- icon='{fr.cemagref.simexplorer.is.ui.swing.UIHelper.createImageIcon("preferences.png")}'/>
+ icon='{fr.cemagref.simexplorer.is.ui.swing.util.UIHelper.createImageIcon("preferences.png")}'/>
</JMenu>
<!-- menu admin -->
<JMenu text='{_("simexplorer.admin.menu")}'>
@@ -64,15 +64,15 @@
<JMenuItem id="help" enabled='false'
text='{_("simexplorer.help.menu.help")}'
toolTipText='{_("simexplorer.help.menu.help.tooltip")}'
- icon='{fr.cemagref.simexplorer.is.ui.swing.UIHelper.createImageIcon("help.png")}'/>
+ icon='{fr.cemagref.simexplorer.is.ui.swing.util.UIHelper.createImageIcon("help.png")}'/>
<JMenuItem id="site" enabled='false'
text='{_("simexplorer.help.menu.site")}'
toolTipText='{_("simexplorer.help.menu.site.tooltip")}'
- icon='{fr.cemagref.simexplorer.is.ui.swing.UIHelper.createImageIcon("site.png")}'/>
+ icon='{fr.cemagref.simexplorer.is.ui.swing.util.UIHelper.createImageIcon("site.png")}'/>
<JMenuItem id="about" enabled='false'
text='{_("simexplorer.help.menu.about")}'
toolTipText='{_("simexplorer.help.menu.about.tooltip")}'
- icon='{fr.cemagref.simexplorer.is.ui.swing.UIHelper.createImageIcon("info.png")}'/>
+ icon='{fr.cemagref.simexplorer.is.ui.swing.util.UIHelper.createImageIcon("info.png")}'/>
</JMenu>
</JMenuBar>
Modified: trunk/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/panel/JApplicationTable.jaxx
===================================================================
--- trunk/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/panel/JApplicationTable.jaxx 2008-01-20 13:42:23 UTC (rev 260)
+++ trunk/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/panel/JApplicationTable.jaxx 2008-01-20 13:42:42 UTC (rev 261)
@@ -1,4 +1,4 @@
-<JTable model='{new fr.cemagref.simexplorer.is.ui.swing.JApplicationTableModel()}'>
+<JTable model='{new fr.cemagref.simexplorer.is.ui.swing.model.JApplicationTableModel()}'>
<script>
import static org.codelutin.i18n.I18n._;
</script>
Modified: trunk/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/toolbar/JApplicationListToolbar.jaxx
===================================================================
--- trunk/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/toolbar/JApplicationListToolbar.jaxx 2008-01-20 13:42:23 UTC (rev 260)
+++ trunk/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/toolbar/JApplicationListToolbar.jaxx 2008-01-20 13:42:42 UTC (rev 261)
@@ -6,7 +6,7 @@
<JButton id='importApplication' enabled='false'
text='{_("simexplorer.action.importApplication")}'
toolTipText='{_("simexplorer.action.importApplication.tooltip")}'
- icon='{fr.cemagref.simexplorer.is.ui.swing.UIHelper.createImageIcon("fileimport.png")}'/>
+ icon='{fr.cemagref.simexplorer.is.ui.swing.util.UIHelper.createImageIcon("fileimport.png")}'/>
<JLabel text='{_("simexplorer.action.searchText")}' visible='false'/>
@@ -17,13 +17,13 @@
text='{_("simexplorer.action.search")}'
enabled='false'
toolTipText='{_("simexplorer.action.search.tooltip")}'
- icon='{fr.cemagref.simexplorer.is.ui.swing.UIHelper.createImageIcon("search.png")}'/>
+ icon='{fr.cemagref.simexplorer.is.ui.swing.util.UIHelper.createImageIcon("search.png")}'/>
<JButton id='resetSearchApplication'
text='{_("simexplorer.action.resetSearch")}'
enabled='false'
toolTipText='{_("simexplorer.action.resetSearch.tooltip")}'
- icon='{fr.cemagref.simexplorer.is.ui.swing.UIHelper.createImageIcon("resetSearch.png")}'/>
+ icon='{fr.cemagref.simexplorer.is.ui.swing.util.UIHelper.createImageIcon("resetSearch.png")}'/>
<JButton id='advancedSearchApplication'
text='{_("simexplorer.action.advancedSearch")}'
Modified: trunk/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/toolbar/JApplicationTreeToolbar.jaxx
===================================================================
--- trunk/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/toolbar/JApplicationTreeToolbar.jaxx 2008-01-20 13:42:23 UTC (rev 260)
+++ trunk/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/toolbar/JApplicationTreeToolbar.jaxx 2008-01-20 13:42:42 UTC (rev 261)
@@ -5,16 +5,16 @@
<JButton id='collapseAll'
enabled='false'
toolTipText='{_("simexplorer.action.collapseAll.tooltip")}'
- icon='{fr.cemagref.simexplorer.is.ui.swing.UIHelper.createImageIcon("collapseall.png")}'/>
+ icon='{fr.cemagref.simexplorer.is.ui.swing.util.UIHelper.createImageIcon("collapseall.png")}'/>
<JButton id='expandAll'
enabled='false'
toolTipText='{_("simexplorer.action.expandAll.tooltip")}'
- icon='{fr.cemagref.simexplorer.is.ui.swing.UIHelper.createImageIcon("expandall.png")}'/>
+ icon='{fr.cemagref.simexplorer.is.ui.swing.util.UIHelper.createImageIcon("expandall.png")}'/>
<JButton id='exportApplication'
enabled='false'
text='{_("simexplorer.action.exportApplication")}'
toolTipText='{_("simexplorer.action.exportApplication.tooltip")}'
- icon='{fr.cemagref.simexplorer.is.ui.swing.UIHelper.createImageIcon("fileexport.png")}'/>
+ icon='{fr.cemagref.simexplorer.is.ui.swing.util.UIHelper.createImageIcon("fileexport.png")}'/>
</JToolBar>
Modified: trunk/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/toolbar/JApplicationsListToolbar.jaxx
===================================================================
--- trunk/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/toolbar/JApplicationsListToolbar.jaxx 2008-01-20 13:42:23 UTC (rev 260)
+++ trunk/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/toolbar/JApplicationsListToolbar.jaxx 2008-01-20 13:42:42 UTC (rev 261)
@@ -6,5 +6,5 @@
enabled='false'
text='{_("simexplorer.action.refresh")}'
toolTipText='{_("simexplorer.action.refresh.tooltip")}'
- icon='{fr.cemagref.simexplorer.is.ui.swing.UIHelper.createImageIcon("reload.png")}'/>
+ icon='{fr.cemagref.simexplorer.is.ui.swing.util.UIHelper.createImageIcon("reload.png")}'/>
</JToolBar>
Modified: trunk/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/util/MyTabHeader.jaxx
===================================================================
--- trunk/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/util/MyTabHeader.jaxx 2008-01-20 13:42:23 UTC (rev 260)
+++ trunk/simexplorer-is-swing/src/uimodel/fr/cemagref/simexplorer/is/ui/swing/util/MyTabHeader.jaxx 2008-01-20 13:42:42 UTC (rev 261)
@@ -17,7 +17,7 @@
enabled='false'
horizontalTextPosition='0'
toolTipText='{_("simexplorer.action.closeTab.tooltip")}'
- icon='{fr.cemagref.simexplorer.is.ui.swing.UIHelper.createImageIcon("window-close.png")}'/>
+ icon='{fr.cemagref.simexplorer.is.ui.swing.util.UIHelper.createImageIcon("window-close.png")}'/>
</cell>
</row>
</Table>
1
0
r260 - trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is
by tchemit@users.labs.libre-entreprise.org 20 Jan '08
by tchemit@users.labs.libre-entreprise.org 20 Jan '08
20 Jan '08
Author: tchemit
Date: 2008-01-20 13:42:23 +0000 (Sun, 20 Jan 2008)
New Revision: 260
Modified:
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/SimExplorerMainUI.java
Log:
javadoc + licence
Modified: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/SimExplorerMainUI.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/SimExplorerMainUI.java 2008-01-20 13:41:55 UTC (rev 259)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/SimExplorerMainUI.java 2008-01-20 13:42:23 UTC (rev 260)
@@ -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,19 +15,22 @@
* 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.ui.swing.SimExplorerActionManager;
import fr.cemagref.simexplorer.is.ui.swing.SimExplorerUI;
-import fr.cemagref.simexplorer.is.ui.swing.actions.ChangeI18nAction;
+import fr.cemagref.simexplorer.is.ui.swing.action.common.ChangeI18nAction;
import org.codelutin.i18n.CountryEnum;
import org.codelutin.i18n.LanguageEnum;
import javax.swing.AbstractButton;
import java.util.regex.Matcher;
-/** @author tony */
+/**
+ * L'ui principale de l'application
+ * @author chemit
+ */
public class SimExplorerMainUI extends SimExplorerUI {
public SimExplorerMainUI() {
@@ -39,7 +42,7 @@
// chargement dans l'ui des actions
SimExplorerActionManager.loadActions(this);
- // repaint i18n actions
+ // repaint i18n actions
repaintI18nActions();
}
@@ -61,6 +64,7 @@
public void postInit() {
// chargement dans le toolbar des actions
+ //TODO cela devrait être générique
SimExplorerActionManager.loadActions(getToolbar());
}
}
1
0
r259 - trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is
by tchemit@users.labs.libre-entreprise.org 20 Jan '08
by tchemit@users.labs.libre-entreprise.org 20 Jan '08
20 Jan '08
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
+ }
}
1
0
r258 - trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is
by tchemit@users.labs.libre-entreprise.org 20 Jan '08
by tchemit@users.labs.libre-entreprise.org 20 Jan '08
20 Jan '08
Author: tchemit
Date: 2008-01-20 13:41:28 +0000 (Sun, 20 Jan 2008)
New Revision: 258
Added:
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/SimExplorerException.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/SimExplorerRuntimeException.java
Log:
les exceptions de base
Added: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/SimExplorerException.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/SimExplorerException.java (rev 0)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/SimExplorerException.java 2008-01-20 13:41:28 UTC (rev 258)
@@ -0,0 +1,44 @@
+/*
+* ##% 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
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* 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;
+
+/**
+ * Exception de base.
+ *
+ * @author chemit
+ */
+public class SimExplorerException extends Exception {
+
+ private static final long serialVersionUID = -8288416952045350383L;
+
+ public SimExplorerException() {
+ }
+
+ public SimExplorerException(Throwable cause) {
+ super(cause);
+ }
+
+ public SimExplorerException(String message) {
+ super(message);
+ }
+
+ public SimExplorerException(String message, Throwable cause) {
+ super(message, cause);
+ }
+}
Added: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/SimExplorerRuntimeException.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/SimExplorerRuntimeException.java (rev 0)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/SimExplorerRuntimeException.java 2008-01-20 13:41:28 UTC (rev 258)
@@ -0,0 +1,43 @@
+/*
+* ##% 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
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* 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;
+
+/**
+ * RuntimeException de base.
+ *
+ * @author chemit
+ */
+public class SimExplorerRuntimeException extends RuntimeException {
+ private static final long serialVersionUID = -4412747043461741154L;
+
+ public SimExplorerRuntimeException() {
+ }
+
+ public SimExplorerRuntimeException(Throwable cause) {
+ super(cause);
+ }
+
+ public SimExplorerRuntimeException(String message) {
+ super(message);
+ }
+
+ public SimExplorerRuntimeException(String message, Throwable cause) {
+ super(message, cause);
+ }
+}
\ No newline at end of file
1
0
r257 - trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing
by tchemit@users.labs.libre-entreprise.org 20 Jan '08
by tchemit@users.labs.libre-entreprise.org 20 Jan '08
20 Jan '08
Author: tchemit
Date: 2008-01-20 13:33:50 +0000 (Sun, 20 Jan 2008)
New Revision: 257
Removed:
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/JApplicationTableModel.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorerAbstractTabAction.java
Log:
structuration des actions
Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/JApplicationTableModel.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/JApplicationTableModel.java 2008-01-20 13:33:33 UTC (rev 256)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/JApplicationTableModel.java 2008-01-20 13:33:50 UTC (rev 257)
@@ -1,114 +0,0 @@
-/*
-* \#\#% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin,
-* Tony Chemit
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* 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.ui.swing;
-
-import fr.cemagref.simexplorer.is.entities.metadata.MetaDataEntity;
-import static org.codelutin.i18n.I18n._;
-
-import javax.swing.table.AbstractTableModel;
-import java.beans.BeanInfo;
-import java.beans.IntrospectionException;
-import java.beans.Introspector;
-import java.beans.PropertyDescriptor;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.List;
-
-/** @author tony */
-public class JApplicationTableModel extends AbstractTableModel {
-
- MetaDataEntity[] data;
-
- PropertyDescriptor[] descriptors;
- private static final long serialVersionUID = -105647814466295077L;
-
- public JApplicationTableModel() {
- }
-
- public JApplicationTableModel(MetaDataEntity[] data) {
- this.data = data;
- }
-
- public MetaDataEntity[] getData() {
- return data;
- }
-
- public void setData(MetaDataEntity[] data) {
- this.data = data;
- }
-
- private final String[] columnNames = {
- _("simexplorer.common.uuid"),
- _("simexplorer.common.name"),
- _("simexplorer.common.type"),
- _("simexplorer.common.description"),
- _("simexplorer.common.version"),
- _("simexplorer.common.create.date")
- };
-
- public int getRowCount() {
- return data == null ? 0 : data.length;
- }
-
- public int getColumnCount() {
- return columnNames.length;
- }
-
- public Object getValueAt(int rowIndex, int columnIndex) {
- Object result = null;
- MetaDataEntity current = data[rowIndex];
- if (data != null) {
- try {
- result = getDescriptors()[columnIndex].getReadMethod().invoke(current);
- } catch (IllegalAccessException e) {
- throw new RuntimeException(e);
- } catch (InvocationTargetException e) {
- throw new RuntimeException(e);
- }
- }
- return result;
- }
-
- protected PropertyDescriptor[] getDescriptors() {
- if (descriptors == null) {
- descriptors = new PropertyDescriptor[columnNames.length];
- BeanInfo beanInfo;
- try {
- beanInfo = Introspector.getBeanInfo(MetaDataEntity.class);
- List<String> props = new ArrayList<String>(columnNames.length);
- int index = "simexplorer.common.".length();
- for (String columnName : columnNames) {
- props.add(columnName.substring(index));
- }
-
- descriptors = new PropertyDescriptor[props.size()];
- for (PropertyDescriptor descriptor : beanInfo.getPropertyDescriptors()) {
- index = props.indexOf(descriptor.getName());
- if (index == -1) {
- continue;
- }
- descriptors[index] = descriptor;
- }
- } catch (IntrospectionException e) {
- throw new RuntimeException(e);
- }
- }
- return descriptors;
- }
-}
Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorerAbstractTabAction.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorerAbstractTabAction.java 2008-01-20 13:33:33 UTC (rev 256)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorerAbstractTabAction.java 2008-01-20 13:33:50 UTC (rev 257)
@@ -1,77 +0,0 @@
-/*
-* \#\#% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin,
-* Tony Chemit
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* 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.ui.swing;
-
-import org.apache.commons.beanutils.Converter;
-import org.codelutin.i18n.I18n;
-import org.codelutin.util.ConverterUtil;
-
-import javax.swing.JTabbedPane;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/** @author tony */
-public class SimExplorerAbstractTabAction extends SimExplorerAbstractAction {
-
- protected SimExplorerTabManager.Tab tab;
-
- protected String methodName;
-
- protected Method method;
-
- private static final long serialVersionUID = 5285229914266682509L;
-
-
- protected SimExplorerAbstractTabAction(String name, String prefixPatternName) {
- super(name);
- methodName = prefixPatternName;
- Pattern patternName = Pattern.compile(prefixPatternName + "_(\\w+)");
- Matcher matcher = patternName.matcher(name);
- if (!matcher.matches()) {
- throw new IllegalArgumentException(I18n._("{0} should have a name like this {1}, but was {2}", getClass().getName(), patternName, name));
- }
- Converter convertorLanguage = ConverterUtil.getConverter(SimExplorerTabManager.Tab.class);
- tab = (SimExplorerTabManager.Tab) convertorLanguage.convert(SimExplorerTabManager.Tab.class, matcher.group(1));
- }
-
- public void actionPerformed(java.awt.event.ActionEvent e) {
- log.info(this + " tab " + tab);
- try {
- getMethod().invoke(null, getMainUI().getContent(), tab);
- } catch (IllegalAccessException e1) {
- throw new RuntimeException(e1);
- } catch (InvocationTargetException e1) {
- throw new RuntimeException(e1);
- }
- }
-
- protected Method getMethod() {
- if (method == null) {
- try {
- method = SimExplorerTabManager.class.getMethod(methodName, JTabbedPane.class, SimExplorerTabManager.Tab.class);
- } catch (NoSuchMethodException e) {
- throw new RuntimeException("could not found method '" + methodName + "' on " + SimExplorerTabManager.class);
- }
- }
- return method;
- }
-
-}
1
0
r256 - in trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing: . action action/admin action/application action/auth action/common action/tab
by tchemit@users.labs.libre-entreprise.org 20 Jan '08
by tchemit@users.labs.libre-entreprise.org 20 Jan '08
20 Jan '08
Author: tchemit
Date: 2008-01-20 13:33:33 +0000 (Sun, 20 Jan 2008)
New Revision: 256
Added:
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/SimExplorerAbstractAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/SimExplorerAbstractTabAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/admin/
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/admin/GroupsAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/admin/UsersAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/CollapseAllAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/ExpandAllAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/ExportApplicationAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/ImportApplicationAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/LaunchSynchronizeAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/ListApplicationsAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/ResetSearchApplicationAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/SearchApplicationAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/auth/
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/auth/ConnectAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/auth/UnconnectAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/common/
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/common/AboutAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/common/ChangeI18nAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/common/ConfigAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/common/HelpAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/common/QuitAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/common/SiteAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/CloseTabAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ShowTabAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ToggleTabAction.java
Removed:
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorerAbstractAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/AboutAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/ChangeI18nAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/ConfigAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/ConnectAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/GroupsAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/HelpAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/ListApplicationsAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/QuitAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/SiteAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/UnconnectAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/UsersAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/
Log:
structuration des actions
Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorerAbstractAction.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorerAbstractAction.java 2008-01-20 13:33:14 UTC (rev 255)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorerAbstractAction.java 2008-01-20 13:33:33 UTC (rev 256)
@@ -1,59 +0,0 @@
-/*
-* \#\#% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin,
-* Tony Chemit
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* 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.ui.swing;
-
-import fr.cemagref.simexplorer.is.SimExplorer;
-import fr.cemagref.simexplorer.is.SimExplorerContext;
-import fr.cemagref.simexplorer.is.SimExplorerMainUI;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-
-/**
- * La classe de base à utiliser pour toutes les actions de l'application
- *
- * @author chemit
- */
-public abstract class SimExplorerAbstractAction extends AbstractAction {
-
- private static final long serialVersionUID = -810023044364620841L;
-
- static protected Log log = LogFactory.getLog(SimExplorerAbstractAction.class);
-
- protected SimExplorerAbstractAction(String name) {
- super(name);
- }
-
- protected SimExplorerAbstractAction() {
- }
-
- protected SimExplorerContext getContext() {
- return SimExplorer.getContext();
- }
-
- protected SimExplorerMainUI getMainUI() {
- return SimExplorer.getUI();
- }
-
- protected String getName() {
- return (String) getValue(Action.NAME);
- }
-}
Copied: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action (from rev 227, trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions)
Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/AboutAction.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/AboutAction.java 2008-01-19 14:54:59 UTC (rev 227)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/AboutAction.java 2008-01-20 13:33:33 UTC (rev 256)
@@ -1,34 +0,0 @@
-/*
-* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin,
-* Tony Chemit
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* 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.ui.swing.actions;
-
-import fr.cemagref.simexplorer.is.ui.swing.SimExplorerAbstractAction;
-
-/** @author tony */
-public class AboutAction extends SimExplorerAbstractAction {
- private static final long serialVersionUID = 6382834972163773346L;
-
- public AboutAction(String name) {
- super(name);
- }
-
- public void actionPerformed(java.awt.event.ActionEvent e) {
- //TODO...
- }
-}
\ No newline at end of file
Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/ChangeI18nAction.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ChangeI18nAction.java 2008-01-19 14:54:59 UTC (rev 227)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/ChangeI18nAction.java 2008-01-20 13:33:33 UTC (rev 256)
@@ -1,87 +0,0 @@
-/*
-* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin,
-* Tony Chemit
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* 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.ui.swing.actions;
-
-import fr.cemagref.simexplorer.is.SimExplorer;
-import fr.cemagref.simexplorer.is.ui.swing.SimExplorerAbstractAction;
-import org.apache.commons.beanutils.Converter;
-import org.codelutin.i18n.CountryEnum;
-import org.codelutin.i18n.I18n;
-import org.codelutin.i18n.LanguageEnum;
-import org.codelutin.util.ConverterUtil;
-
-import java.awt.event.ActionEvent;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * Une action pour recharger la locale.
- * <p/>
- * Le nom de l'action doit etre de la forme i18n_XX_YY où XX est la langue
- * et YY le pays de la locale à charger.
- *
- * @author chemit
- * @see LanguageEnum
- * @see CountryEnum
- */
-public class ChangeI18nAction extends SimExplorerAbstractAction {
- private static final long serialVersionUID = 8663845268703843948L;
-
- public static final Pattern PATTERN_NAME = Pattern.compile("i18n_(\\w\\w)_(\\w\\w)");
-
- protected LanguageEnum language;
-
- protected CountryEnum country;
-
- public ChangeI18nAction(String name) {
- super(name);
- Matcher matcher = PATTERN_NAME.matcher(name);
- if (!matcher.matches()) {
- throw new IllegalArgumentException(I18n._(getClass().getName() + " should have a nmae like this 'i18n_XX_YY', but was {0}", name));
- }
- Converter convertorLanguage = ConverterUtil.getConverter(LanguageEnum.class);
- language = (LanguageEnum) convertorLanguage.convert(LanguageEnum.class, matcher.group(1));
-
- convertorLanguage = ConverterUtil.getConverter(CountryEnum.class);
- country = (CountryEnum) convertorLanguage.convert(CountryEnum.class, matcher.group(2));
- }
-
- public void actionPerformed(java.awt.event.ActionEvent e) {
-
- //TODO Should ask confirm from user since it will close ui, and re instanciate ui
-
- getMainUI().getQuit().getAction().actionPerformed(new ActionEvent(this, ActionEvent.ACTION_FIRST, "cancel"));
- SimExplorer.reloadUI();
- getContext().getConfig().setI18n(language,country);
- getContext().getConfig().initI18n();
-
- SimExplorer.launch();
-
- SimExplorer.getContext().saveSafely();
- }
-
- public boolean equalsLocale(LanguageEnum lang, CountryEnum countr) {
- return language == lang && country == countr;
- }
-
- @Override
- public String toString() {
- return super.toString() + " Language " + language + " Country " + country;
- }
-}
\ No newline at end of file
Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/ConfigAction.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ConfigAction.java 2008-01-19 14:54:59 UTC (rev 227)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/ConfigAction.java 2008-01-20 13:33:33 UTC (rev 256)
@@ -1,36 +0,0 @@
-/*
-* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin,
-* Tony Chemit
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* 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.ui.swing.actions;
-
-import fr.cemagref.simexplorer.is.ui.swing.JConfigUI;
-import fr.cemagref.simexplorer.is.ui.swing.SimExplorerAbstractAction;
-import org.codelutin.option.ui.ConfigTableModel;
-
-/** @author tony */
-public class ConfigAction extends SimExplorerAbstractAction {
- private static final long serialVersionUID = 3300059369540110934L;
-
- public ConfigAction(String name) {
- super(name);
- }
-
- public void actionPerformed(java.awt.event.ActionEvent e) {
- JConfigUI.showUI(getContext().getConfig(), ConfigTableModel.TypeModel.all);
- }
-}
\ No newline at end of file
Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/ConnectAction.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ConnectAction.java 2008-01-19 14:54:59 UTC (rev 227)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/ConnectAction.java 2008-01-20 13:33:33 UTC (rev 256)
@@ -1,34 +0,0 @@
-/*
-* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin,
-* Tony Chemit
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* 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.ui.swing.actions;
-
-import fr.cemagref.simexplorer.is.ui.swing.SimExplorerAbstractAction;
-
-/** @author tony */
-public class ConnectAction extends SimExplorerAbstractAction {
- private static final long serialVersionUID = 7878367943091442615L;
-
- public ConnectAction(String name) {
- super(name);
- }
-
- public void actionPerformed(java.awt.event.ActionEvent e) {
- //TODO...
- }
-}
\ No newline at end of file
Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/GroupsAction.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/GroupsAction.java 2008-01-19 14:54:59 UTC (rev 227)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/GroupsAction.java 2008-01-20 13:33:33 UTC (rev 256)
@@ -1,34 +0,0 @@
-/*
-* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin,
-* Tony Chemit
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* 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.ui.swing.actions;
-
-import fr.cemagref.simexplorer.is.ui.swing.SimExplorerAbstractAction;
-
-/** @author tony */
-public class GroupsAction extends SimExplorerAbstractAction {
- private static final long serialVersionUID = -3295312475361573482L;
-
- public GroupsAction(String name) {
- super(name);
- }
-
- public void actionPerformed(java.awt.event.ActionEvent e) {
- //TODO...
- }
-}
\ No newline at end of file
Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/HelpAction.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/HelpAction.java 2008-01-19 14:54:59 UTC (rev 227)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/HelpAction.java 2008-01-20 13:33:33 UTC (rev 256)
@@ -1,34 +0,0 @@
-/*
-* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin,
-* Tony Chemit
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* 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.ui.swing.actions;
-
-import fr.cemagref.simexplorer.is.ui.swing.SimExplorerAbstractAction;
-
-/** @author tony */
-public class HelpAction extends SimExplorerAbstractAction {
- private static final long serialVersionUID = 2809805482518823876L;
-
- public HelpAction(String name) {
- super(name);
- }
-
- public void actionPerformed(java.awt.event.ActionEvent e) {
- //TODO...
- }
-}
\ No newline at end of file
Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/ListApplicationsAction.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ListApplicationsAction.java 2008-01-19 14:54:59 UTC (rev 227)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/ListApplicationsAction.java 2008-01-20 13:33:33 UTC (rev 256)
@@ -1,34 +0,0 @@
-/*
-* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin,
-* Tony Chemit
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* 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.ui.swing.actions;
-
-import fr.cemagref.simexplorer.is.ui.swing.SimExplorerAbstractAction;
-
-/** @author tony */
-public class ListApplicationsAction extends SimExplorerAbstractAction {
- private static final long serialVersionUID = 6220034344778635703L;
-
- public ListApplicationsAction(String name) {
- super(name);
- }
-
- public void actionPerformed(java.awt.event.ActionEvent e) {
- //TODO...
- }
-}
\ No newline at end of file
Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/QuitAction.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/QuitAction.java 2008-01-19 14:54:59 UTC (rev 227)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/QuitAction.java 2008-01-20 13:33:33 UTC (rev 256)
@@ -1,34 +0,0 @@
-/*
-* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin,
-* Tony Chemit
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* 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.ui.swing.actions;
-
-import fr.cemagref.simexplorer.is.ui.swing.SimExplorerAbstractAction;
-
-/** @author tony */
-public class QuitAction extends SimExplorerAbstractAction {
- private static final long serialVersionUID = 8078558268479422370L;
-
- public QuitAction(String name) {
- super(name);
- }
-
- public void actionPerformed(java.awt.event.ActionEvent e) {
- getMainUI().dispose();
- }
-}
Copied: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/SimExplorerAbstractAction.java (from rev 227, trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorerAbstractAction.java)
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/SimExplorerAbstractAction.java (rev 0)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/SimExplorerAbstractAction.java 2008-01-20 13:33:33 UTC (rev 256)
@@ -0,0 +1,60 @@
+/*
+* ##% 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
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* 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.ui.swing.action;
+
+import fr.cemagref.simexplorer.is.SimExplorer;
+import fr.cemagref.simexplorer.is.SimExplorerContext;
+import fr.cemagref.simexplorer.is.SimExplorerMainUI;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * La classe de base à utiliser pour toutes les action de l'application
+ *
+ * @author chemit
+ */
+public abstract class SimExplorerAbstractAction extends javax.swing.AbstractAction {
+
+ private static final long serialVersionUID = -810023044364620841L;
+
+ static protected Log log = LogFactory.getLog(SimExplorerAbstractAction.class);
+
+ protected SimExplorerAbstractAction(String name) {
+ super(name);
+ }
+
+ protected SimExplorerAbstractAction() {
+ }
+
+ protected SimExplorerContext getContext() {
+ return SimExplorer.getContext();
+ }
+
+ protected SimExplorerMainUI getMainUI() {
+ return SimExplorer.getUI();
+ }
+
+ protected String getName() {
+ return (String) getValue(NAME);
+ }
+
+ public void actionPerformed(java.awt.event.ActionEvent e) {
+ log.info(this);
+ }
+}
Copied: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/SimExplorerAbstractTabAction.java (from rev 227, trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorerAbstractTabAction.java)
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/SimExplorerAbstractTabAction.java (rev 0)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/SimExplorerAbstractTabAction.java 2008-01-20 13:33:33 UTC (rev 256)
@@ -0,0 +1,83 @@
+/*
+* ##% 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
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* 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.ui.swing.action;
+
+import fr.cemagref.simexplorer.is.ui.swing.SimExplorerTabManager;
+import org.apache.commons.beanutils.Converter;
+import org.codelutin.i18n.I18n;
+import org.codelutin.util.ConverterUtil;
+
+import javax.swing.JTabbedPane;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * La classe d'action de base pour toutes les action sur les Tab
+ *
+ * @author chemit
+ */
+public class SimExplorerAbstractTabAction extends SimExplorerAbstractAction {
+
+ protected SimExplorerTabManager.Tab tab;
+
+ protected String methodName;
+
+ protected Method method;
+
+ private static final long serialVersionUID = 5285229914266682509L;
+
+
+ protected SimExplorerAbstractTabAction(String name, String prefixPatternName) {
+ super(name);
+ methodName = prefixPatternName;
+ Pattern patternName = Pattern.compile(prefixPatternName + "_(\\w+)");
+ Matcher matcher = patternName.matcher(name);
+ if (!matcher.matches()) {
+ throw new IllegalArgumentException(I18n._("{0} should have a name like this {1}, but was {2}", getClass().getName(), patternName, name));
+ }
+ Converter convertorLanguage = ConverterUtil.getConverter(SimExplorerTabManager.Tab.class);
+ tab = (SimExplorerTabManager.Tab) convertorLanguage.convert(SimExplorerTabManager.Tab.class, matcher.group(1));
+ }
+
+ @Override
+ public void actionPerformed(java.awt.event.ActionEvent e) {
+ super.actionPerformed(e);
+ try {
+ getMethod().invoke(null, getMainUI().getContent(), tab);
+ } catch (IllegalAccessException e1) {
+ throw new RuntimeException(e1);
+ } catch (InvocationTargetException e1) {
+ throw new RuntimeException(e1);
+ }
+ }
+
+ protected Method getMethod() {
+ if (method == null) {
+ try {
+ method = SimExplorerTabManager.class.getMethod(methodName, JTabbedPane.class, SimExplorerTabManager.Tab.class);
+ } catch (NoSuchMethodException e) {
+ throw new RuntimeException("could not found method '" + methodName + "' on " + SimExplorerTabManager.class);
+ }
+ }
+ return method;
+ }
+
+}
Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/SiteAction.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/SiteAction.java 2008-01-19 14:54:59 UTC (rev 227)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/SiteAction.java 2008-01-20 13:33:33 UTC (rev 256)
@@ -1,34 +0,0 @@
-/*
-* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin,
-* Tony Chemit
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* 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.ui.swing.actions;
-
-import fr.cemagref.simexplorer.is.ui.swing.SimExplorerAbstractAction;
-
-/** @author tony */
-public class SiteAction extends SimExplorerAbstractAction {
- private static final long serialVersionUID = 2809805482518823876L;
-
- public SiteAction(String name) {
- super(name);
- }
-
- public void actionPerformed(java.awt.event.ActionEvent e) {
- //TODO...
- }
-}
\ No newline at end of file
Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/UnconnectAction.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/UnconnectAction.java 2008-01-19 14:54:59 UTC (rev 227)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/UnconnectAction.java 2008-01-20 13:33:33 UTC (rev 256)
@@ -1,34 +0,0 @@
-/*
-* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin,
-* Tony Chemit
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* 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.ui.swing.actions;
-
-import fr.cemagref.simexplorer.is.ui.swing.SimExplorerAbstractAction;
-
-/** @author tony */
-public class UnconnectAction extends SimExplorerAbstractAction {
- private static final long serialVersionUID = -5210454594354934593L;
-
- public UnconnectAction(String name) {
- super(name);
- }
-
- public void actionPerformed(java.awt.event.ActionEvent e) {
- //TODO...
- }
-}
\ No newline at end of file
Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/UsersAction.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/UsersAction.java 2008-01-19 14:54:59 UTC (rev 227)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/UsersAction.java 2008-01-20 13:33:33 UTC (rev 256)
@@ -1,35 +0,0 @@
-/*
-* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin,
-* Tony Chemit
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* 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.ui.swing.actions;
-
-import fr.cemagref.simexplorer.is.ui.swing.SimExplorerAbstractAction;
-
-/** @author tony */
-public class UsersAction extends SimExplorerAbstractAction {
-
- private static final long serialVersionUID = -53117911219660095L;
-
- public UsersAction(String name) {
- super(name);
- }
-
- public void actionPerformed(java.awt.event.ActionEvent e) {
- //TODO...
- }
-}
\ No newline at end of file
Copied: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/admin/GroupsAction.java (from rev 227, trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/GroupsAction.java)
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/admin/GroupsAction.java (rev 0)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/admin/GroupsAction.java 2008-01-20 13:33:33 UTC (rev 256)
@@ -0,0 +1,41 @@
+/*
+* ##% 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
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* 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.ui.swing.action.admin;
+
+import fr.cemagref.simexplorer.is.ui.swing.action.SimExplorerAbstractAction;
+
+/**
+ * Action pour afficher la page de gestion des groupes d'utilisateurs
+ *
+ * @author chemit
+ */
+public class GroupsAction extends SimExplorerAbstractAction {
+
+ private static final long serialVersionUID = 42756519520713299L;
+
+ public GroupsAction(String name) {
+ super(name);
+ }
+
+ @Override
+ public void actionPerformed(java.awt.event.ActionEvent e) {
+ super.actionPerformed(e);
+ //TODO
+ }
+}
\ No newline at end of file
Copied: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/admin/UsersAction.java (from rev 227, trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/UsersAction.java)
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/admin/UsersAction.java (rev 0)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/admin/UsersAction.java 2008-01-20 13:33:33 UTC (rev 256)
@@ -0,0 +1,41 @@
+/*
+* ##% 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
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* 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.ui.swing.action.admin;
+
+import fr.cemagref.simexplorer.is.ui.swing.action.SimExplorerAbstractAction;
+
+/**
+ * Action pour voir la gestion des utilisateurs
+ *
+ * @author chemit
+ */
+public class UsersAction extends SimExplorerAbstractAction {
+
+ private static final long serialVersionUID = -8183522709906575547L;
+
+ public UsersAction(String name) {
+ super(name);
+ }
+
+ @Override
+ public void actionPerformed(java.awt.event.ActionEvent e) {
+ super.actionPerformed(e);
+ //TODO
+ }
+}
\ No newline at end of file
Added: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/CollapseAllAction.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/CollapseAllAction.java (rev 0)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/CollapseAllAction.java 2008-01-20 13:33:33 UTC (rev 256)
@@ -0,0 +1,41 @@
+/*
+* ##% 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
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* 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.ui.swing.action.application;
+
+import fr.cemagref.simexplorer.is.ui.swing.action.SimExplorerAbstractAction;
+
+/**
+ * Pour réduire tous les noeuds de l'arbe d'une application
+ *
+ * @author chemit
+ */
+public class CollapseAllAction extends SimExplorerAbstractAction {
+
+ private static final long serialVersionUID = -3254708595851406041L;
+
+ public CollapseAllAction(String name) {
+ super(name);
+ }
+
+ @Override
+ public void actionPerformed(java.awt.event.ActionEvent e) {
+ super.actionPerformed(e);
+ //TODO
+ }
+}
\ No newline at end of file
Copied: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/ExpandAllAction.java (from rev 227, trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/AboutAction.java)
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/ExpandAllAction.java (rev 0)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/ExpandAllAction.java 2008-01-20 13:33:33 UTC (rev 256)
@@ -0,0 +1,41 @@
+/*
+* ##% 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
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* 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.ui.swing.action.application;
+
+import fr.cemagref.simexplorer.is.ui.swing.action.SimExplorerAbstractAction;
+
+/**
+ * Pour dérouler tous les noeuds de l'arbre d'une application
+ *
+ * @author tony
+ */
+public class ExpandAllAction extends SimExplorerAbstractAction {
+
+ private static final long serialVersionUID = 9033359716418852179L;
+
+ public ExpandAllAction(String name) {
+ super(name);
+ }
+
+ @Override
+ public void actionPerformed(java.awt.event.ActionEvent e) {
+ super.actionPerformed(e);
+ //TODO
+ }
+}
\ No newline at end of file
Added: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/ExportApplicationAction.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/ExportApplicationAction.java (rev 0)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/ExportApplicationAction.java 2008-01-20 13:33:33 UTC (rev 256)
@@ -0,0 +1,41 @@
+/*
+* ##% 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
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* 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.ui.swing.action.application;
+
+import fr.cemagref.simexplorer.is.ui.swing.action.SimExplorerAbstractAction;
+
+/**
+ * Action pour exporter une application
+ *
+ * @author chemit
+ */
+public class ExportApplicationAction extends SimExplorerAbstractAction {
+
+ private static final long serialVersionUID = 7535647131305304738L;
+
+ public ExportApplicationAction(String name) {
+ super(name);
+ }
+
+ @Override
+ public void actionPerformed(java.awt.event.ActionEvent e) {
+ super.actionPerformed(e);
+ //TODO
+ }
+}
\ No newline at end of file
Added: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/ImportApplicationAction.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/ImportApplicationAction.java (rev 0)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/ImportApplicationAction.java 2008-01-20 13:33:33 UTC (rev 256)
@@ -0,0 +1,42 @@
+/*
+* ##% 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
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* 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.ui.swing.action.application;
+
+import fr.cemagref.simexplorer.is.ui.swing.action.SimExplorerAbstractAction;
+
+/**
+ * Action de base pour importer une application
+ *
+ * @author tony
+ */
+public class ImportApplicationAction extends SimExplorerAbstractAction {
+
+ private static final long serialVersionUID = 3377670691203328711L;
+
+
+ public ImportApplicationAction(String name) {
+ super(name);
+ }
+
+ @Override
+ public void actionPerformed(java.awt.event.ActionEvent e) {
+ super.actionPerformed(e);
+ //TODO
+ }
+}
\ No newline at end of file
Added: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/LaunchSynchronizeAction.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/LaunchSynchronizeAction.java (rev 0)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/LaunchSynchronizeAction.java 2008-01-20 13:33:33 UTC (rev 256)
@@ -0,0 +1,39 @@
+/*
+* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin,
+* Tony Chemit
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* 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.ui.swing.action.application;
+
+import fr.cemagref.simexplorer.is.ui.swing.action.SimExplorerAbstractAction;
+
+/**
+ * Action pouyr lancer la synchro
+ *
+ * @author tony
+ */
+public class LaunchSynchronizeAction extends SimExplorerAbstractAction {
+
+ private static final long serialVersionUID = 8379937369551031306L;
+
+ public LaunchSynchronizeAction(String name) {
+ super(name);
+ }
+
+ public void actionPerformed(java.awt.event.ActionEvent e) {
+ log.info(this);
+ }
+}
\ No newline at end of file
Copied: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/ListApplicationsAction.java (from rev 227, trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ListApplicationsAction.java)
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/ListApplicationsAction.java (rev 0)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/ListApplicationsAction.java 2008-01-20 13:33:33 UTC (rev 256)
@@ -0,0 +1,39 @@
+/*
+* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin,
+* Tony Chemit
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* 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.ui.swing.action.application;
+
+import fr.cemagref.simexplorer.is.ui.swing.action.SimExplorerAbstractAction;
+
+/**
+ * Action pour ???
+ *
+ * @author tony
+ */
+public class ListApplicationsAction extends SimExplorerAbstractAction {
+
+ private static final long serialVersionUID = 6220034344778635703L;
+
+ public ListApplicationsAction(String name) {
+ super(name);
+ }
+
+ public void actionPerformed(java.awt.event.ActionEvent e) {
+ log.info(this);
+ }
+}
\ No newline at end of file
Added: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/ResetSearchApplicationAction.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/ResetSearchApplicationAction.java (rev 0)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/ResetSearchApplicationAction.java 2008-01-20 13:33:33 UTC (rev 256)
@@ -0,0 +1,41 @@
+/*
+* ##% 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
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* 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.ui.swing.action.application;
+
+import fr.cemagref.simexplorer.is.ui.swing.action.SimExplorerAbstractAction;
+
+/**
+ * Action pour réinitialiser une recherche d'application
+ *
+ * @author tony
+ */
+public class ResetSearchApplicationAction extends SimExplorerAbstractAction {
+
+ private static final long serialVersionUID = -155773498930710467L;
+
+ public ResetSearchApplicationAction(String name) {
+ super(name);
+ }
+
+ @Override
+ public void actionPerformed(java.awt.event.ActionEvent e) {
+ super.actionPerformed(e);
+ //TODO
+ }
+}
\ No newline at end of file
Added: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/SearchApplicationAction.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/SearchApplicationAction.java (rev 0)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/SearchApplicationAction.java 2008-01-20 13:33:33 UTC (rev 256)
@@ -0,0 +1,41 @@
+/*
+* ##% 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
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* 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.ui.swing.action.application;
+
+import fr.cemagref.simexplorer.is.ui.swing.action.SimExplorerAbstractAction;
+
+/**
+ * Action pour lancer une recherche d'application
+ *
+ * @author chemit
+ */
+public class SearchApplicationAction extends SimExplorerAbstractAction {
+
+ private static final long serialVersionUID = -8537587629478588257L;
+
+ public SearchApplicationAction(String name) {
+ super(name);
+ }
+
+ @Override
+ public void actionPerformed(java.awt.event.ActionEvent e) {
+ super.actionPerformed(e);
+ //TODO
+ }
+}
\ No newline at end of file
Copied: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/auth/ConnectAction.java (from rev 227, trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ConnectAction.java)
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/auth/ConnectAction.java (rev 0)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/auth/ConnectAction.java 2008-01-20 13:33:33 UTC (rev 256)
@@ -0,0 +1,41 @@
+/*
+* ##% 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
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* 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.ui.swing.action.auth;
+
+import fr.cemagref.simexplorer.is.ui.swing.action.SimExplorerAbstractAction;
+
+/**
+ * Action de connexion au serveur distant
+ *
+ * @author chemit
+ */
+public class ConnectAction extends SimExplorerAbstractAction {
+
+ private static final long serialVersionUID = -6172528731543675359L;
+
+ public ConnectAction(String name) {
+ super(name);
+ }
+
+ @Override
+ public void actionPerformed(java.awt.event.ActionEvent e) {
+ super.actionPerformed(e);
+ //TODO appeler le service Auth
+ }
+}
\ No newline at end of file
Copied: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/auth/UnconnectAction.java (from rev 227, trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/UnconnectAction.java)
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/auth/UnconnectAction.java (rev 0)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/auth/UnconnectAction.java 2008-01-20 13:33:33 UTC (rev 256)
@@ -0,0 +1,41 @@
+/*
+* ##% 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
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* 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.ui.swing.action.auth;
+
+import fr.cemagref.simexplorer.is.ui.swing.action.SimExplorerAbstractAction;
+
+/**
+ * Action pour se deconnecter du serveur distant
+ *
+ * @author chemit
+ */
+public class UnconnectAction extends SimExplorerAbstractAction {
+
+ private static final long serialVersionUID = 2248642521834932196L;
+
+ public UnconnectAction(String name) {
+ super(name);
+ }
+
+ @Override
+ public void actionPerformed(java.awt.event.ActionEvent e) {
+ super.actionPerformed(e);
+ //TODO appel au service auth ?
+ }
+}
\ No newline at end of file
Copied: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/common/AboutAction.java (from rev 227, trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/AboutAction.java)
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/common/AboutAction.java (rev 0)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/common/AboutAction.java 2008-01-20 13:33:33 UTC (rev 256)
@@ -0,0 +1,41 @@
+/*
+* ##% 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
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* 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.ui.swing.action.common;
+
+import fr.cemagref.simexplorer.is.ui.swing.action.SimExplorerAbstractAction;
+
+/**
+ * Action pour afficher la boit de dialogue About de l'application
+ *
+ * @author chemit
+ */
+public class AboutAction extends SimExplorerAbstractAction {
+
+ private static final long serialVersionUID = 8275852970637350877L;
+
+ public AboutAction(String name) {
+ super(name);
+ }
+
+ @Override
+ public void actionPerformed(java.awt.event.ActionEvent e) {
+ super.actionPerformed(e);
+ //TODO
+ }
+}
\ No newline at end of file
Copied: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/common/ChangeI18nAction.java (from rev 227, trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ChangeI18nAction.java)
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/common/ChangeI18nAction.java (rev 0)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/common/ChangeI18nAction.java 2008-01-20 13:33:33 UTC (rev 256)
@@ -0,0 +1,88 @@
+/*
+* ##% 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
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* 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.ui.swing.action.common;
+
+import fr.cemagref.simexplorer.is.SimExplorer;
+import fr.cemagref.simexplorer.is.ui.swing.action.SimExplorerAbstractAction;
+import org.apache.commons.beanutils.Converter;
+import org.codelutin.i18n.CountryEnum;
+import org.codelutin.i18n.I18n;
+import org.codelutin.i18n.LanguageEnum;
+import org.codelutin.util.ConverterUtil;
+
+import java.awt.event.ActionEvent;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * Une action pour recharger la locale.
+ * <p/>
+ * Le nom de l'action doit etre de la forme i18n_XX_YY où XX est la langue
+ * et YY le pays de la locale à charger.
+ *
+ * @author chemit
+ * @see LanguageEnum
+ * @see CountryEnum
+ */
+public class ChangeI18nAction extends SimExplorerAbstractAction {
+
+ public static final Pattern PATTERN_NAME = Pattern.compile("i18n_(\\w\\w)_(\\w\\w)");
+
+ protected LanguageEnum language;
+
+ protected CountryEnum country;
+ private static final long serialVersionUID = 4180668477670765253L;
+
+ public ChangeI18nAction(String name) {
+ super(name);
+ Matcher matcher = PATTERN_NAME.matcher(name);
+ if (!matcher.matches()) {
+ throw new IllegalArgumentException(I18n._(getClass().getName() + " should have a nmae like this 'i18n_XX_YY', but was {0}", name));
+ }
+ Converter convertorLanguage = ConverterUtil.getConverter(LanguageEnum.class);
+ language = (LanguageEnum) convertorLanguage.convert(LanguageEnum.class, matcher.group(1));
+
+ convertorLanguage = ConverterUtil.getConverter(CountryEnum.class);
+ country = (CountryEnum) convertorLanguage.convert(CountryEnum.class, matcher.group(2));
+ }
+
+ @Override
+ public void actionPerformed(java.awt.event.ActionEvent e) {
+ super.actionPerformed(e);
+ //TODO Should ask confirm from user since it will close ui, and re instanciate ui
+
+ getMainUI().getQuit().getAction().actionPerformed(new ActionEvent(this, ActionEvent.ACTION_FIRST, "cancel"));
+ SimExplorer.reloadUI();
+ getContext().getConfig().setI18n(language, country);
+ getContext().getConfig().initI18n();
+
+ SimExplorer.launch();
+
+ SimExplorer.getContext().saveSafely();
+ }
+
+ public boolean equalsLocale(LanguageEnum lang, CountryEnum countr) {
+ return language == lang && country == countr;
+ }
+
+ @Override
+ public String toString() {
+ return super.toString() + " Language " + language + " Country " + country;
+ }
+}
\ No newline at end of file
Copied: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/common/ConfigAction.java (from rev 227, trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ConfigAction.java)
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/common/ConfigAction.java (rev 0)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/common/ConfigAction.java 2008-01-20 13:33:33 UTC (rev 256)
@@ -0,0 +1,43 @@
+/*
+* ##% 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
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* 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.ui.swing.action.common;
+
+import fr.cemagref.simexplorer.is.ui.swing.JConfigUI;
+import fr.cemagref.simexplorer.is.ui.swing.action.SimExplorerAbstractAction;
+import org.codelutin.option.ui.ConfigTableModel;
+
+/**
+ * Action pour afficher la dialogue de modification de configuration
+ *
+ * @author chemit
+ */
+public class ConfigAction extends SimExplorerAbstractAction {
+
+ private static final long serialVersionUID = 1449553547444065616L;
+
+ public ConfigAction(String name) {
+ super(name);
+ }
+
+ @Override
+ public void actionPerformed(java.awt.event.ActionEvent e) {
+ super.actionPerformed(e);
+ JConfigUI.showUI(getContext().getConfig(), ConfigTableModel.TypeModel.all);
+ }
+}
\ No newline at end of file
Copied: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/common/HelpAction.java (from rev 227, trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/HelpAction.java)
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/common/HelpAction.java (rev 0)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/common/HelpAction.java 2008-01-20 13:33:33 UTC (rev 256)
@@ -0,0 +1,41 @@
+/*
+* ##% 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
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* 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.ui.swing.action.common;
+
+import fr.cemagref.simexplorer.is.ui.swing.action.SimExplorerAbstractAction;
+
+/**
+ * Action pour afficher l'aide principale
+ *
+ * @author chemit
+ */
+public class HelpAction extends SimExplorerAbstractAction {
+
+ private static final long serialVersionUID = 8250247303366300958L;
+
+ public HelpAction(String name) {
+ super(name);
+ }
+
+ @Override
+ public void actionPerformed(java.awt.event.ActionEvent e) {
+ super.actionPerformed(e);
+ //TODO
+ }
+}
\ No newline at end of file
Copied: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/common/QuitAction.java (from rev 227, trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/QuitAction.java)
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/common/QuitAction.java (rev 0)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/common/QuitAction.java 2008-01-20 13:33:33 UTC (rev 256)
@@ -0,0 +1,42 @@
+/*
+* ##% 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
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* 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.ui.swing.action.common;
+
+import fr.cemagref.simexplorer.is.ui.swing.action.SimExplorerAbstractAction;
+
+/**
+ * Action pour quitter l'application
+ *
+ * @author chemit
+ */
+public class QuitAction extends SimExplorerAbstractAction {
+
+ private static final long serialVersionUID = -2291089937320691627L;
+
+ public QuitAction(String name) {
+ super(name);
+ }
+
+ @Override
+ public void actionPerformed(java.awt.event.ActionEvent e) {
+ super.actionPerformed(e);
+ //TODO Fermer tous les tabs
+ getMainUI().dispose();
+ }
+}
Copied: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/common/SiteAction.java (from rev 227, trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/SiteAction.java)
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/common/SiteAction.java (rev 0)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/common/SiteAction.java 2008-01-20 13:33:33 UTC (rev 256)
@@ -0,0 +1,41 @@
+/*
+* ##% 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
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* 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.ui.swing.action.common;
+
+import fr.cemagref.simexplorer.is.ui.swing.action.SimExplorerAbstractAction;
+
+/**
+ * Action pour accéder au site de l'application
+ *
+ * @author chemit
+ */
+public class SiteAction extends SimExplorerAbstractAction {
+
+ private static final long serialVersionUID = 7458557977976803799L;
+
+ public SiteAction(String name) {
+ super(name);
+ }
+
+ @Override
+ public void actionPerformed(java.awt.event.ActionEvent e) {
+ super.actionPerformed(e);
+ //TODO
+ }
+}
\ No newline at end of file
Added: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/CloseTabAction.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/CloseTabAction.java (rev 0)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/CloseTabAction.java 2008-01-20 13:33:33 UTC (rev 256)
@@ -0,0 +1,43 @@
+/*
+* ##% 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
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* 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.ui.swing.action.tab;
+
+import fr.cemagref.simexplorer.is.ui.swing.action.SimExplorerAbstractTabAction;
+
+/**
+ * Action pour fermer un tab
+ *
+ * @author chemit
+ */
+public class CloseTabAction extends SimExplorerAbstractTabAction {
+
+ private static final long serialVersionUID = -3088257073806742313L;
+
+ public CloseTabAction(String name) {
+ super(name, "closeTab");
+ }
+
+ @Override
+ public void actionPerformed(java.awt.event.ActionEvent e) {
+ //TODO voir le model avant
+
+ // close ui
+ super.actionPerformed(e);
+ }
+}
Added: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ShowTabAction.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ShowTabAction.java (rev 0)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ShowTabAction.java 2008-01-20 13:33:33 UTC (rev 256)
@@ -0,0 +1,93 @@
+/*
+* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin,
+* Tony Chemit, Gariel Landais
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* 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.ui.swing.action.tab;
+
+import fr.cemagref.simexplorer.is.SimExplorer;
+import fr.cemagref.simexplorer.is.service.StorageService;
+import fr.cemagref.simexplorer.is.ui.swing.action.SimExplorerAbstractTabAction;
+import fr.cemagref.simexplorer.is.ui.swing.bean.ListApplicationBean;
+
+import java.awt.event.ActionEvent;
+
+/**
+ * Action pour afficher une tab
+ *
+ * @author chemit
+ */
+public class ShowTabAction extends SimExplorerAbstractTabAction {
+
+ private static final long serialVersionUID = -4030583314708934811L;
+
+ public ShowTabAction(String name) {
+ super(name, "showTab");
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+
+ initAction();
+
+ // load ui
+ super.actionPerformed(e);
+
+ // set model
+
+ }
+
+ public void initAction() {
+
+ StorageService service;
+
+ ListApplicationBean list;
+ switch (tab) {
+
+ case detail:
+
+ break;
+ case local:
+ if (getContext().getLocalApplications() == null) {
+
+ service = SimExplorer.getStorageService();
+
+ // first local query,
+ list = new ListApplicationBean();
+ try {
+ long size = service.findApplicationsCount(true);
+
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ break;
+ case remote:
+ if (getContext().getRemoteApplications() == null) {
+ // first remote query,
+ service = SimExplorer.getRemoteStorageService();
+
+ list = new ListApplicationBean();
+
+ }
+ break;
+ case synchronize:
+
+ break;
+ }
+ }
+}
Added: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ToggleTabAction.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ToggleTabAction.java (rev 0)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ToggleTabAction.java 2008-01-20 13:33:33 UTC (rev 256)
@@ -0,0 +1,44 @@
+/*
+* ##% 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
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* 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.ui.swing.action.tab;
+
+import fr.cemagref.simexplorer.is.ui.swing.action.SimExplorerAbstractTabAction;
+
+import java.awt.event.ActionEvent;
+
+/**
+ * Action pour siwtcher un tab
+ *
+ * @author chemit
+ */
+public class ToggleTabAction extends SimExplorerAbstractTabAction {
+
+ private static final long serialVersionUID = -5457476021698351850L;
+
+
+ public ToggleTabAction(String name) {
+ super(name, "toggleTab");
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ super.actionPerformed(e);
+ //TODO
+ }
+}
1
0
r255 - in trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing: . model
by tchemit@users.labs.libre-entreprise.org 20 Jan '08
by tchemit@users.labs.libre-entreprise.org 20 Jan '08
20 Jan '08
Author: tchemit
Date: 2008-01-20 13:33:14 +0000 (Sun, 20 Jan 2008)
New Revision: 255
Added:
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/model/
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/model/JApplicationTableModel.java
Log:
paquetgae model pour d?\195?\169poser tous les models utilis?\195?\169s dans les ui (Table, Tree,...)
Copied: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/model/JApplicationTableModel.java (from rev 245, trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/JApplicationTableModel.java)
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/model/JApplicationTableModel.java (rev 0)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/model/JApplicationTableModel.java 2008-01-20 13:33:14 UTC (rev 255)
@@ -0,0 +1,114 @@
+/*
+* \#\#% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin,
+* Tony Chemit
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* 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.ui.swing.model;
+
+import fr.cemagref.simexplorer.is.entities.metadata.MetaDataEntity;
+import static org.codelutin.i18n.I18n._;
+
+import javax.swing.table.AbstractTableModel;
+import java.beans.BeanInfo;
+import java.beans.IntrospectionException;
+import java.beans.Introspector;
+import java.beans.PropertyDescriptor;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.List;
+
+/** @author tony */
+public class JApplicationTableModel extends AbstractTableModel {
+
+ MetaDataEntity[] data;
+
+ PropertyDescriptor[] descriptors;
+ private static final long serialVersionUID = -105647814466295077L;
+
+ public JApplicationTableModel() {
+ }
+
+ public JApplicationTableModel(MetaDataEntity[] data) {
+ this.data = data;
+ }
+
+ public MetaDataEntity[] getData() {
+ return data;
+ }
+
+ public void setData(MetaDataEntity[] data) {
+ this.data = data;
+ }
+
+ private final String[] columnNames = {
+ _("simexplorer.common.uuid"),
+ _("simexplorer.common.name"),
+ _("simexplorer.common.type"),
+ _("simexplorer.common.description"),
+ _("simexplorer.common.version"),
+ _("simexplorer.common.create.date")
+ };
+
+ public int getRowCount() {
+ return data == null ? 0 : data.length;
+ }
+
+ public int getColumnCount() {
+ return columnNames.length;
+ }
+
+ public Object getValueAt(int rowIndex, int columnIndex) {
+ Object result = null;
+ MetaDataEntity current = data[rowIndex];
+ if (data != null) {
+ try {
+ result = getDescriptors()[columnIndex].getReadMethod().invoke(current);
+ } catch (IllegalAccessException e) {
+ throw new RuntimeException(e);
+ } catch (InvocationTargetException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ return result;
+ }
+
+ protected PropertyDescriptor[] getDescriptors() {
+ if (descriptors == null) {
+ descriptors = new PropertyDescriptor[columnNames.length];
+ BeanInfo beanInfo;
+ try {
+ beanInfo = Introspector.getBeanInfo(MetaDataEntity.class);
+ List<String> props = new ArrayList<String>(columnNames.length);
+ int index = "simexplorer.common.".length();
+ for (String columnName : columnNames) {
+ props.add(columnName.substring(index));
+ }
+
+ descriptors = new PropertyDescriptor[props.size()];
+ for (PropertyDescriptor descriptor : beanInfo.getPropertyDescriptors()) {
+ index = props.indexOf(descriptor.getName());
+ if (index == -1) {
+ continue;
+ }
+ descriptors[index] = descriptor;
+ }
+ } catch (IntrospectionException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ return descriptors;
+ }
+}
1
0