Author: tchemit Date: 2008-02-04 19:04:28 +0000 (Mon, 04 Feb 2008) New Revision: 657 Removed: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/AdvancedSearchApplicationAction.java 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/DeleteAction.java trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/DownloadAction.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/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/ChangeI18nFRAction.java trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/common/ChangeI18nGBAction.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/QuitAction.java trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/help/AboutAction.java trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/help/HelpAction.java trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/help/SiteAction.java Log: normalisation nom paquetage Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/AdvancedSearchApplicationAction.java =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/AdvancedSearchApplicationAction.java 2008-02-04 19:02:40 UTC (rev 656) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/AdvancedSearchApplicationAction.java 2008-02-04 19:04:28 UTC (rev 657) @@ -1,45 +0,0 @@ -/* -* ##% 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.SimExplorerAbstractTabAction; - -/** - * Action pour réinitialiser une recherche d'application - * - * @author tony - */ - at jaxx.runtime.builder.ActionConfig( - actionCommand = "advancedSearchApplication", - name = "simexplorer.action.application.advancedSearch", - shortDescription = "simexplorer.action.application.advancedSearch.tooltip", - longDescription = "simexplorer.action.application.advancedSearch.help", - smallIcon = "action/advanced-search.png", - mnemonic = 'v', - hideActionText = true -) -public class AdvancedSearchApplicationAction extends SimExplorerAbstractTabAction { - - private static final long serialVersionUID = -155773498930710467L; - - public AdvancedSearchApplicationAction(String name) { - super(name); - } - -} \ No newline at end of file Deleted: 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 2008-02-04 19:02:40 UTC (rev 656) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/CollapseAllAction.java 2008-02-04 19:04:28 UTC (rev 657) @@ -1,79 +0,0 @@ -/* -* ##% 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.SimExplorerAbstractTabAction; -import fr.cemagref.simexplorer.is.ui.swing.model.LoggableElementTreeHelper; -import fr.cemagref.simexplorer.is.ui.swing.model.LoggableElementTreeNode; -import fr.cemagref.simexplorer.is.ui.swing.tab.JApplicationDetailTab; - -import javax.swing.JTree; -import java.awt.event.ActionEvent; - -/** - * Pour réduire tous les noeuds de l'arbe d'une application - * - * @author chemit - */ - at jaxx.runtime.builder.ActionConfig( - actionCommand = "collapseAllApplication", - name = "simexplorer.action.application.collapseAll", - shortDescription = "simexplorer.action.application.collapseAll.tooltip", - longDescription = "simexplorer.action.application.collapseAll.help", - smallIcon = "action/collapseAll.png", - mnemonic = 'c', - hideActionText = true -) -public class CollapseAllAction extends SimExplorerAbstractTabAction { - - private static final long serialVersionUID = -3254708595851406041L; - JTree tree; - LoggableElementTreeNode node; - - public CollapseAllAction(String name) { - super(name); - } - - @Override - protected boolean beforeAction(ActionEvent e) throws Exception { - if (!super.beforeAction(e)) { - return false; - } - JApplicationDetailTab ui = (JApplicationDetailTab) getUI(); - tree = ui.getNavigationTree(); - node = LoggableElementTreeHelper.getSelectedNodeOrRootNode(tree); - boolean result; - result = !(node == null || node.isLeaf()); - return result; - } - - @Override - protected void doAction(ActionEvent e) throws Exception { - - node.collaspeAll(tree); - } - - @Override - protected void clear() { - super.clear(); - tree = null; - node = null; - } - -} \ No newline at end of file Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/DeleteAction.java =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/DeleteAction.java 2008-02-04 19:02:40 UTC (rev 656) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/DeleteAction.java 2008-02-04 19:04:28 UTC (rev 657) @@ -1,99 +0,0 @@ -/* -* ##% 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.entities.data.LoggableElement; -import fr.cemagref.simexplorer.is.entities.metadata.Version; -import fr.cemagref.simexplorer.is.ui.swing.action.SimExplorerAbstractTabAction; -import fr.cemagref.simexplorer.is.ui.swing.model.LoggableElementTreeHelper; -import fr.cemagref.simexplorer.is.ui.swing.model.LoggableElementTreeNode; -import fr.cemagref.simexplorer.is.ui.swing.tab.JApplicationDetailTab; - -import javax.swing.JTree; -import java.awt.event.ActionEvent; -import java.io.File; - -/** - * Action pour downloader un résultat ou une librairie - * - * @author chemit - */ - at jaxx.runtime.builder.ActionConfig( - actionCommand = "delete", - name = "simexplorer.action.application.delete", - shortDescription = "simexplorer.action.application.delete.tooltip", - longDescription = "simexplorer.action.application.delete.help", - smallIcon = "action/delete.png", - mnemonic = 'x', - hideActionText = true -) -public class DeleteAction extends SimExplorerAbstractTabAction { - - private static final long serialVersionUID = 7535647131305304738L; - - - JTree tree; - LoggableElementTreeNode node; - File file; - LoggableElement element; - String uuid; - Version version; - - public DeleteAction(String name) { - super(name); - } - - @Override - protected boolean beforeAction(ActionEvent e) throws Exception { - if (!super.beforeAction(e)) { - return false; - } - JApplicationDetailTab ui = (JApplicationDetailTab) getUI(); - tree = ui.getNavigationTree(); - node = LoggableElementTreeHelper.getSelectedNodeOrRootNode(tree); - boolean result; - result = LoggableElementTreeHelper.canDelete(node); - if (result) { - // ask user confirmation of node to delete - element = (LoggableElement) node.getUserObject(); - uuid = element.getMetaData().getUuid(); - version = element.getMetaData().getVersion(); - } - result = false; - return result; - } - - @Override - protected void doAction(ActionEvent e) throws Exception { - super.doAction(e); - //StorageService service = getContext().getStorageService(((DetailTabModel) getModel()).isRemote()); - //TODO - } - - @Override - protected void clear() { - super.clear(); - tree = null; - node = null; - file = null; - element = null; - version = null; - uuid = null; - } -} \ No newline at end of file Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/DownloadAction.java =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/DownloadAction.java 2008-02-04 19:02:40 UTC (rev 656) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/DownloadAction.java 2008-02-04 19:04:28 UTC (rev 657) @@ -1,141 +0,0 @@ -/* -* ##% 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 com.healthmarketscience.rmiio.RemoteInputStream; -import com.healthmarketscience.rmiio.RemoteInputStreamClient; -import fr.cemagref.simexplorer.is.entities.data.LoggableElement; -import fr.cemagref.simexplorer.is.entities.metadata.Version; -import fr.cemagref.simexplorer.is.service.StorageService; -import fr.cemagref.simexplorer.is.ui.swing.action.SimExplorerAbstractTabAction; -import fr.cemagref.simexplorer.is.ui.swing.model.DetailTabModel; -import fr.cemagref.simexplorer.is.ui.swing.model.LoggableElementTreeHelper; -import fr.cemagref.simexplorer.is.ui.swing.model.LoggableElementTreeNode; -import fr.cemagref.simexplorer.is.ui.swing.tab.JApplicationDetailTab; - -import javax.swing.JTree; -import java.awt.event.ActionEvent; -import java.io.BufferedInputStream; -import java.io.BufferedOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.InputStream; -import java.text.MessageFormat; - -/** - * Action pour downloader un résultat ou une librairie - * - * @author chemit - */ - at jaxx.runtime.builder.ActionConfig( - actionCommand = "download", - name = "simexplorer.action.application.download", - shortDescription = "simexplorer.action.application.download.tooltip", - longDescription = "simexplorer.action.application.download.help", - smallIcon = "action/download.png", - mnemonic = 'x', - hideActionText = true -) -public class DownloadAction extends SimExplorerAbstractTabAction { - - private static final long serialVersionUID = 7535647131305304738L; - - protected static final MessageFormat FILENAME_PATTERN = new MessageFormat("{0}.xml"); - JTree tree; - LoggableElementTreeNode node; - File file; - LoggableElement element; - String uuid; - Version version; - private static final int BUFFER_SIZE = 8 * 1024; - - public DownloadAction(String name) { - super(name); - } - - @Override - protected boolean beforeAction(ActionEvent e) throws Exception { - if (!super.beforeAction(e)) { - return false; - } - JApplicationDetailTab ui = (JApplicationDetailTab) getUI(); - tree = ui.getNavigationTree(); - node = LoggableElementTreeHelper.getSelectedNodeOrRootNode(tree); - boolean result; - result = LoggableElementTreeHelper.canDownload(node); - if (result) { - // ask user path where to save data - String dir = org.codelutin.util.FileUtil.getDirectory(); - if (dir == null) { - // user cancel action - return false; - } - - //Object obj= node.getUserObject(); - //element = (LoggableElement) node.getUserObject(); - //uuid = element.getMetaData().getUuid(); - //version = element.getMetaData().getVersion(); - //file = new File(FILENAME_PATTERN.format(new Object[]{uuid + "-" + version})); - } - result=false; - return result; - } - - @Override - protected void doAction(ActionEvent e) throws Exception { - super.doAction(e); - StorageService service = getContext().getStorageService(((DetailTabModel) getModel()).isRemote()); - RemoteInputStream ris = service.retrieveData(getContext().getToken(), uuid, version.toString(), "_xml"); - if (ris == null) { - // todo log error - log.warn("could not get incoming data for " + uuid); - return; - } - InputStream stream = RemoteInputStreamClient.wrap(ris); - FileOutputStream fos = new FileOutputStream(file); - BufferedInputStream bis = new BufferedInputStream(stream); - BufferedOutputStream bos = new BufferedOutputStream(fos); - try { - byte[] buffer = new byte[BUFFER_SIZE]; - while (bis.read(buffer, 0, BUFFER_SIZE) != -1) { - bos.write(buffer); - bos.flush(); - } - } finally { - if (bis != null) { - bis.close(); - } - if (bos != null) { - bos.flush(); - bos.close(); - } - } - } - - @Override - protected void clear() { - super.clear(); - tree = null; - node = null; - file = null; - element = null; - version = null; - uuid = null; - } -} \ No newline at end of file Deleted: 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/ExpandAllAction.java 2008-02-04 19:02:40 UTC (rev 656) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/ExpandAllAction.java 2008-02-04 19:04:28 UTC (rev 657) @@ -1,77 +0,0 @@ -/* -* ##% 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.SimExplorerAbstractTabAction; -import fr.cemagref.simexplorer.is.ui.swing.model.LoggableElementTreeNode; -import fr.cemagref.simexplorer.is.ui.swing.model.LoggableElementTreeHelper; -import fr.cemagref.simexplorer.is.ui.swing.tab.JApplicationDetailTab; - -import javax.swing.JTree; -import java.awt.event.ActionEvent; - -/** - * Pour dérouler tous les noeuds de l'arbre d'une application - * - * @author tony - */ - at jaxx.runtime.builder.ActionConfig( - actionCommand = "expandAllApplication", - name = "simexplorer.action.application.expandAll", - shortDescription = "simexplorer.action.application.expandAll.tooltip", - longDescription = "simexplorer.action.application.expandAll.help", - smallIcon = "action/expandAll.png", - mnemonic = 'e', - hideActionText = true -) -public class ExpandAllAction extends SimExplorerAbstractTabAction { - - private static final long serialVersionUID = 9033359716418852179L; - JTree tree; - LoggableElementTreeNode node; - - public ExpandAllAction(String name) { - super(name); - } - - @Override - protected boolean beforeAction(ActionEvent e) throws Exception { - if (!super.beforeAction(e)) { - return false; - } - JApplicationDetailTab ui = (JApplicationDetailTab) getUI(); - tree = ui.getNavigationTree(); - node = LoggableElementTreeHelper.getSelectedNodeOrRootNode(tree); - boolean result; - result = !(node == null || node.isLeaf()); - return result; - } - - @Override - protected void doAction(ActionEvent e) throws Exception { - node.expandAll(tree); - } - - @Override - protected void clear() { - super.clear(); - tree = null; - node = null; - } -} \ No newline at end of file Deleted: 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 2008-02-04 19:02:40 UTC (rev 656) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/ExportApplicationAction.java 2008-02-04 19:04:28 UTC (rev 657) @@ -1,101 +0,0 @@ -/* -* ##% 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.entities.data.LoggableElement; -import fr.cemagref.simexplorer.is.entities.metadata.Version; -import fr.cemagref.simexplorer.is.service.StorageService; -import fr.cemagref.simexplorer.is.ui.swing.action.SimExplorerAbstractTabAction; -import fr.cemagref.simexplorer.is.ui.swing.model.DetailTabModel; -import fr.cemagref.simexplorer.is.ui.swing.model.LoggableElementTreeHelper; -import fr.cemagref.simexplorer.is.ui.swing.model.LoggableElementTreeNode; -import fr.cemagref.simexplorer.is.ui.swing.tab.JApplicationDetailTab; - -import javax.swing.JTree; -import java.awt.event.ActionEvent; -import java.io.File; - -/** - * Action pour exporter une application - * - * @author chemit - */ - at jaxx.runtime.builder.ActionConfig( - actionCommand = "exportApplication", - name = "simexplorer.action.application.export", - shortDescription = "simexplorer.action.application.export.tooltip", - longDescription = "simexplorer.action.application.export.help", - smallIcon = "action/export-application.png", - mnemonic = 'x', - hideActionText = true -) -public class ExportApplicationAction extends SimExplorerAbstractTabAction { - - private static final long serialVersionUID = 7535647131305304738L; - - JTree tree; - LoggableElementTreeNode node; - File file; - LoggableElement element; - String uuid; - Version version; - - public ExportApplicationAction(String name) { - super(name); - } - - @Override - protected boolean beforeAction(ActionEvent e) throws Exception { - if (!super.beforeAction(e)) { - return false; - } - JApplicationDetailTab ui = (JApplicationDetailTab) getUI(); - tree = ui.getNavigationTree(); - node = LoggableElementTreeHelper.getSelectedNodeOrRootNode(tree); - boolean result; - result = LoggableElementTreeHelper.canExport(node); - if (result) { - element = (LoggableElement) node.getUserObject(); - uuid = element.getMetaData().getUuid(); - version = element.getMetaData().getVersion(); - } - return result; - } - - @Override - protected void doAction(ActionEvent e) throws Exception { - super.doAction(e); - - //TODO Where to save (if local to remote and vice-versa ?) - StorageService service = getContext().getStorageService(((DetailTabModel) getModel()).isRemote()); - - //service.exportElement(getContext().getToken(), null, uuid, version.toString()); - } - - @Override - protected void clear() { - super.clear(); - tree = null; - node = null; - file = null; - element = null; - version = null; - uuid = null; - } -} \ No newline at end of file Deleted: 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 2008-02-04 19:02:40 UTC (rev 656) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/ImportApplicationAction.java 2008-02-04 19:04:28 UTC (rev 657) @@ -1,46 +0,0 @@ -/* -* ##% 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.SimExplorerAbstractTabAction; - -/** - * Action de base pour importer une application - * - * @author tony - */ - at jaxx.runtime.builder.ActionConfig( - actionCommand = "importApplication", - name = "simexplorer.action.application.import", - shortDescription = "simexplorer.action.application.import.tooltip", - longDescription = "simexplorer.action.application.import.help", - smallIcon = "action/import-application.png", - mnemonic = 'i', - hideActionText = false -) -public class ImportApplicationAction extends SimExplorerAbstractTabAction { - - private static final long serialVersionUID = 3377670691203328711L; - - - public ImportApplicationAction(String name) { - super(name); - } - -} \ No newline at end of file Deleted: 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 2008-02-04 19:02:40 UTC (rev 656) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/LaunchSynchronizeAction.java 2008-02-04 19:04:28 UTC (rev 657) @@ -1,44 +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.action.application; - -import fr.cemagref.simexplorer.is.ui.swing.action.SimExplorerAbstractTabAction; - -/** - * Action pouyr lancer la synchro - * - * @author tony - */ - at jaxx.runtime.builder.ActionConfig( - actionCommand = "launchSynchronize", - name = "simexplorer.action.synchronize", - shortDescription = "simexplorer.action.synchronize.tooltip", - longDescription = "simexplorer.action.synchronize.help", - smallIcon = "action/reload.png", - hideActionText = false -) -public class LaunchSynchronizeAction extends SimExplorerAbstractTabAction { - - private static final long serialVersionUID = 8379937369551031306L; - - public LaunchSynchronizeAction(String name) { - super(name); - } - -} \ No newline at end of file Deleted: 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/ListApplicationsAction.java 2008-02-04 19:02:40 UTC (rev 656) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/ListApplicationsAction.java 2008-02-04 19:04:28 UTC (rev 657) @@ -1,41 +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.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); - } - - @Override - public void actionPerformed(java.awt.event.ActionEvent e) { - super.actionPerformed(e); - //TODO - } -} \ No newline at end of file Deleted: 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 2008-02-04 19:02:40 UTC (rev 656) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/ResetSearchApplicationAction.java 2008-02-04 19:04:28 UTC (rev 657) @@ -1,98 +0,0 @@ -/* -* ##% 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.SimExplorerAbstractTabAction; -import fr.cemagref.simexplorer.is.ui.swing.model.JApplicationTableModel; -import fr.cemagref.simexplorer.is.ui.swing.model.ListTabModel; -import fr.cemagref.simexplorer.is.ui.swing.tab.JApplicationListTab; -import fr.cemagref.simexplorer.is.ui.swing.SimExplorerUIRefreshHelper; - -import javax.swing.JTable; -import java.awt.event.ActionEvent; - -/** - * Action pour réinitialiser une recherche d'application - * - * @author tony - */ - at jaxx.runtime.builder.ActionConfig( - actionCommand = "resetSearchApplication", - name = "simexplorer.action.application.resetSearch", - shortDescription = "simexplorer.action.application.resetSearch.tooltip", - longDescription = "simexplorer.action.application.resetSearch.help", - smallIcon = "action/reset-search.png", - mnemonic = 'e', - hideActionText = true, - enabled = false -) -public class ResetSearchApplicationAction extends SimExplorerAbstractTabAction { - - private static final long serialVersionUID = -155773498930710467L; - - public ResetSearchApplicationAction(String name) { - super(name); - } - - @Override - protected boolean beforeAction(ActionEvent e) throws Exception { - ListTabModel model = (ListTabModel) getModel(); - JApplicationListTab ui = (JApplicationListTab) getUI(); - // always clean the input text (should be done in jaxx) - ui.getSearchText().setText(null); - if (!model.hasQuery()) { - // directly refresh search actions - // but do not realize action - SimExplorerUIRefreshHelper.refreshSearchActions(ui,model); - return false; - } - // only reset search if something was previously search - return true; - } - - @Override - protected void doAction(ActionEvent e) throws Exception { - super.doAction(e); - ListTabModel model = (ListTabModel) getModel(); - - // reset query in model - model.setQuery(null); - - // a new search begins always on first page - model.getPagination().setFirstIndex(0); - - // get data from service - model.updateTabModel(isRemote(), getContext()); - - // update table model in ui - JApplicationListTab container = (JApplicationListTab) getUI(); - JTable table = container.getTable(); - JApplicationTableModel modelTab = (JApplicationTableModel) table.getModel(); - modelTab.setData(model.getList()); - - // refresh ui - SimExplorerUIRefreshHelper.refreshListTabUI(container, model); - } - - @Override - protected void clear() { - super.clear(); - setTab(null); - } -} \ No newline at end of file Deleted: 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 2008-02-04 19:02:40 UTC (rev 656) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/application/SearchApplicationAction.java 2008-02-04 19:04:28 UTC (rev 657) @@ -1,91 +0,0 @@ -/* -* ##% 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.SimExplorerAbstractTabAction; -import fr.cemagref.simexplorer.is.ui.swing.model.ListTabModel; -import fr.cemagref.simexplorer.is.ui.swing.model.JApplicationTableModel; -import fr.cemagref.simexplorer.is.ui.swing.tab.JApplicationListTab; -import fr.cemagref.simexplorer.is.ui.swing.SimExplorerUIRefreshHelper; - -import javax.swing.JTextField; -import javax.swing.JTable; -import java.awt.event.ActionEvent; - -/** - * Action pour lancer une recherche d'application - * - * @author chemit - */ - at jaxx.runtime.builder.ActionConfig( - actionCommand = "searchApplication", - name = "simexplorer.action.application.search", - shortDescription = "simexplorer.action.application.search.tooltip", - longDescription = "simexplorer.action.application.search.help", - smallIcon = "action/search.png", - mnemonic = 'e', - hideActionText = true, - enabled = false -) -public class SearchApplicationAction extends SimExplorerAbstractTabAction { - - private static final long serialVersionUID = -8537587629478588257L; - String query; - - public SearchApplicationAction(String name) { - super(name); - } - - @Override - protected boolean beforeAction(ActionEvent e) throws Exception { - JTextField uiObject = (JTextField) getUIObject("searchText"); - query = uiObject.getText(); - ListTabModel model = (ListTabModel) getModel(); - return !query.isEmpty() && !query.equals(model.getQuery()); - } - - @Override - protected void doAction(ActionEvent e) throws Exception { - super.doAction(e); - ListTabModel model = (ListTabModel) getModel(); - model.setQuery(query); - - // a new search begins always on first page - model.getPagination().setFirstIndex(0); - - // get data from service - model.updateTabModel(isRemote(), getContext()); - - // update table model in ui - JApplicationListTab container = (JApplicationListTab) getUI(); - JTable table = container.getTable(); - JApplicationTableModel modelTab = (JApplicationTableModel) table.getModel(); - modelTab.setData(model.getList()); - - // refresh ui - SimExplorerUIRefreshHelper.refreshListTabUI(container, model); - } - - @Override - protected void clear() { - super.clear(); - query = null; - setTab(null); - } -} \ No newline at end of file Deleted: 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/ConnectAction.java 2008-02-04 19:02:40 UTC (rev 656) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/auth/ConnectAction.java 2008-02-04 19:04:28 UTC (rev 657) @@ -1,96 +0,0 @@ -/* -* ##% 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.service.SimExplorerServiceException; -import fr.cemagref.simexplorer.is.service.StorageService; -import fr.cemagref.simexplorer.is.ui.swing.action.SimExplorerAbstractAction; -import fr.cemagref.simexplorer.is.ui.swing.SimExplorerUIRefreshHelper; - -import java.awt.event.ActionEvent; - -/** - * Action de connexion au serveur distant - * - * @author chemit - */ - at jaxx.runtime.builder.ActionConfig( - actionCommand = "connect", - name = "simexplorer.action.connect", - shortDescription = "simexplorer.action.connect.tooltip", - longDescription = "simexplorer.action.connect.help", - smallIcon = "action/connect.png", - mnemonic = 'C', - hideActionText = false, - enabled = true -) -public class ConnectAction extends SimExplorerAbstractAction { - - private static final long serialVersionUID = -6172528731543675359L; - - String login; - String password; - - public ConnectAction(String name) { - super(name); - } - - @Override - protected boolean beforeAction(ActionEvent e) throws Exception { - if (getContext().isConnected()) { - return false; - } - - login = getContext().getConfig().getLogin(); - password = getContext().getConfig().getPassword(); - if (login == null || password == null) { - //TODO show login ui - password = "password"; - getContext().getConfig().setPassword(password); - } - return true; - } - - @Override - protected void doAction(ActionEvent e) throws Exception { - super.doAction(e); - StorageService service = getContext().getRemoteStorageService(); - - try { - String token = service.loginUser(login, password); - getContext().setToken(token); - } catch (SimExplorerServiceException e1) { - //TODO alert user of error - log.warn("could not connect user for reason " + e1.getMessage()); - throw e1; - } - } - - @Override - protected void afterAction(ActionEvent e) throws Exception { - SimExplorerUIRefreshHelper.refreshConnnectState(getMainUI(), true); - } - - @Override - protected void clear() { - super.clear(); - login = null; - password = null; - } -} \ No newline at end of file Deleted: 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/auth/UnconnectAction.java 2008-02-04 19:02:40 UTC (rev 656) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/auth/UnconnectAction.java 2008-02-04 19:04:28 UTC (rev 657) @@ -1,65 +0,0 @@ -/* -* ##% 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; -import fr.cemagref.simexplorer.is.ui.swing.SimExplorerUIRefreshHelper; - -import java.awt.event.ActionEvent; - -/** - * Action pour se deconnecter du serveur distant - * - * @author chemit - */ - at jaxx.runtime.builder.ActionConfig( - actionCommand = "unconnect", - name = "simexplorer.action.unconnect", - shortDescription = "simexplorer.action.unconnect.tooltip", - longDescription = "simexplorer.action.unconnect.help", - mnemonic = 'n', - smallIcon = "action/unconnect.png", - hideActionText = false, - enabled = false -) -public class UnconnectAction extends SimExplorerAbstractAction { - - private static final long serialVersionUID = 2248642521834932196L; - - public UnconnectAction(String name) { - super(name); - } - - @Override - protected boolean beforeAction(ActionEvent e) throws Exception { - return getContext().isConnected(); - } - - @Override - protected void doAction(ActionEvent e) throws Exception { - super.doAction(e); - getContext().setToken(null); - //TODO disconnect from server ? - } - - @Override - protected void afterAction(ActionEvent e) throws Exception { - SimExplorerUIRefreshHelper.refreshConnnectState(getMainUI(), false); - } -} \ No newline at end of file Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/common/ChangeI18nFRAction.java =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/common/ChangeI18nFRAction.java 2008-02-04 19:02:40 UTC (rev 656) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/common/ChangeI18nFRAction.java 2008-02-04 19:04:28 UTC (rev 657) @@ -1,39 +0,0 @@ -/* -* \#\#% 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.ChangeI18nAbstractAction; - -/** @author chemit */ - at jaxx.runtime.builder.ActionConfig( - actionCommand = "i18n_fr_FR", - name = "simexplorer.action.i18n.fr", - shortDescription = "simexplorer.action.i18n.fr.tooltip", - longDescription = "simexplorer.action.i18n.fr.help", - mnemonic = 'F', - smallIcon = "action/i18n-fr.png", - hideActionText = false -) -public class ChangeI18nFRAction extends ChangeI18nAbstractAction { - private static final long serialVersionUID = 7616779035801280791L; - - public ChangeI18nFRAction(String name) { - super(name); - } -} Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/common/ChangeI18nGBAction.java =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/common/ChangeI18nGBAction.java 2008-02-04 19:02:40 UTC (rev 656) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/common/ChangeI18nGBAction.java 2008-02-04 19:04:28 UTC (rev 657) @@ -1,39 +0,0 @@ -/* -* \#\#% 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.ChangeI18nAbstractAction; - -/** @author chemit */ - at jaxx.runtime.builder.ActionConfig( - actionCommand = "i18n_en_GB", - name = "simexplorer.action.i18n.en", - shortDescription = "simexplorer.action.i18n.en.tooltip", - longDescription = "simexplorer.action.i18n.en.help", - mnemonic = 'n', - smallIcon = "action/i18n-gb.png", - hideActionText = false -) -public class ChangeI18nGBAction extends ChangeI18nAbstractAction { - private static final long serialVersionUID = 7616779035801280791L; - - public ChangeI18nGBAction(String name) { - super(name); - } -} \ No newline at end of file Deleted: 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/ConfigAction.java 2008-02-04 19:02:40 UTC (rev 656) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/common/ConfigAction.java 2008-02-04 19:04:28 UTC (rev 657) @@ -1,51 +0,0 @@ -/* -* ##% 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 - */ - at jaxx.runtime.builder.ActionConfig( - actionCommand = "config", - name = "simexplorer.action.config", - shortDescription = "simexplorer.action.config.tooltip", - longDescription = "simexplorer.action.config.help", - smallIcon = "action/config.png", - mnemonic = 'P', - hideActionText = false -) -public class ConfigAction extends SimExplorerAbstractAction { - - private static final long serialVersionUID = 1449553547444065616L; - - public ConfigAction(String name) { - super(name); - } - - @Override - public void doAction(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/common/QuitAction.java =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/common/QuitAction.java 2008-02-04 19:02:40 UTC (rev 656) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/common/QuitAction.java 2008-02-04 19:04:28 UTC (rev 657) @@ -1,51 +0,0 @@ -/* -* ##% 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 - */ - at jaxx.runtime.builder.ActionConfig( - actionCommand = "quit", - name = "simexplorer.action.quit", - shortDescription = "simexplorer.action.quit.tooltip", - longDescription = "simexplorer.action.quit.help", - smallIcon = "action/quit.png", - mnemonic = 'Q', - hideActionText = false -) -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(); - } -} Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/help/AboutAction.java =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/help/AboutAction.java 2008-02-04 19:02:40 UTC (rev 656) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/help/AboutAction.java 2008-02-04 19:04:28 UTC (rev 657) @@ -1,45 +0,0 @@ -/* -* ##% 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.help; - -import fr.cemagref.simexplorer.is.ui.swing.action.SimExplorerAbstractAction; - -/** - * Action pour afficher la boit de dialogue About de l'application - * - * @author chemit - */ - at jaxx.runtime.builder.ActionConfig( - actionCommand = "about", - name = "simexplorer.action.about", - shortDescription = "simexplorer.action.about.tooltip", - longDescription = "simexplorer.action.about.help", - smallIcon = "action/about.png", - mnemonic = 'A', - hideActionText = false -) -public class AboutAction extends SimExplorerAbstractAction { - - private static final long serialVersionUID = 8275852970637350877L; - - public AboutAction(String name) { - super(name); - } - -} \ No newline at end of file Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/help/HelpAction.java =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/help/HelpAction.java 2008-02-04 19:02:40 UTC (rev 656) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/help/HelpAction.java 2008-02-04 19:04:28 UTC (rev 657) @@ -1,45 +0,0 @@ -/* -* ##% 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.help; - -import fr.cemagref.simexplorer.is.ui.swing.action.SimExplorerAbstractAction; - -/** - * Action pour afficher l'aide principale - * - * @author chemit - */ - at jaxx.runtime.builder.ActionConfig( - actionCommand = "help", - name = "simexplorer.action.help", - shortDescription = "simexplorer.action.help.tooltip", - longDescription = "simexplorer.action.help.help", - smallIcon = "action/help.png", - mnemonic = 'e', - hideActionText = false -) -public class HelpAction extends SimExplorerAbstractAction { - - private static final long serialVersionUID = 8250247303366300958L; - - public HelpAction(String name) { - super(name); - } - -} \ No newline at end of file Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/help/SiteAction.java =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/help/SiteAction.java 2008-02-04 19:02:40 UTC (rev 656) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/help/SiteAction.java 2008-02-04 19:04:28 UTC (rev 657) @@ -1,45 +0,0 @@ -/* -* ##% 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.help; - -import fr.cemagref.simexplorer.is.ui.swing.action.SimExplorerAbstractAction; - -/** - * Action pour accéder au site de l'application - * - * @author chemit - */ - at jaxx.runtime.builder.ActionConfig( - actionCommand = "site", - name = "simexplorer.action.site", - shortDescription = "simexplorer.action.site.tooltip", - longDescription = "simexplorer.action.site.help", - smallIcon = "action/site.png", - mnemonic = 'S', - hideActionText = false -) -public class SiteAction extends SimExplorerAbstractAction { - - private static final long serialVersionUID = 7458557977976803799L; - - public SiteAction(String name) { - super(name); - } - -} \ No newline at end of file