Author: tchemit Date: 2008-02-04 19:00:41 +0000 (Mon, 04 Feb 2008) New Revision: 655 Added: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ChangePageAction.java trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ChangeSizorAction.java trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/CloseTabAction.java trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/GoFirstPageAction.java trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/GoLastPageAction.java trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/GoNextPageAction.java trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/GoPreviousPageAction.java trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ShowDetailTabAction.java trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ShowLocalTabAction.java trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ShowRemoteTabAction.java trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ShowSynchronizeTabAction.java trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ToggleLocalTabAction.java trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ToggleRemoteTabAction.java trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ToggleSynchronizeTabAction.java Removed: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/pagination/ChangePageAction.java trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/pagination/ChangeSizorAction.java trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/pagination/GoFirstPageAction.java trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/pagination/GoLastPageAction.java trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/pagination/GoNextPageAction.java trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/pagination/GoPreviousPageAction.java 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/ShowDetailTabAction.java trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ShowLocalTabAction.java trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ShowRemoteTabAction.java trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ShowSynchronizeTabAction.java trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ToggleLocalTabAction.java trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ToggleRemoteTabAction.java trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ToggleSynchronizeTabAction.java Modified: trunk/simexplorer-is-swing/src/resources/actions.properties Log: normalisation nom paquetage Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/pagination/ChangePageAction.java =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/pagination/ChangePageAction.java 2008-02-04 18:59:16 UTC (rev 654) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/pagination/ChangePageAction.java 2008-02-04 19:00:41 UTC (rev 655) @@ -1,117 +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.pagination; - -import fr.cemagref.simexplorer.is.ui.swing.SimExplorerActionManager; -import fr.cemagref.simexplorer.is.ui.swing.SimExplorerUIRefreshHelper; -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.model.PaginationModel; -import fr.cemagref.simexplorer.is.ui.swing.tab.JApplicationListTab; - -import javax.swing.AbstractAction; -import javax.swing.AbstractButton; -import javax.swing.Action; -import javax.swing.JComboBox; -import javax.swing.JComponent; -import javax.swing.JTable; -import java.awt.event.ActionEvent; - -/** - * Action pour lancer une recherche d'application - * - * @author chemit - */ - at jaxx.runtime.builder.SelectActionConfig( - actionCommand = "goPage", - name = "simexplorer.action.pagination.goPage", - shortDescription = "simexplorer.action.pagination.goPage.tooltip", - longDescription = "simexplorer.action.pagination.goPage.help", - selectedIndex = -1 -) -public class ChangePageAction extends SimExplorerAbstractTabAction { - - private static final long serialVersionUID = 448524625085364914L; - - protected Integer newPage; - - public ChangePageAction(String name) { - super(name); - } - - @Override - protected boolean beforeAction(ActionEvent e) throws Exception { - JComboBox jComboBox = getChangePageComboBox(); - if (!jComboBox.isEnabled()) { - return false; - } - ListTabModel model = (ListTabModel) getModel(); - Integer oldPage = model.getPagination().getCurrentPage(); - Object o = jComboBox.getSelectedItem(); - if (o != null) { - newPage = Integer.valueOf(o + ""); - } - return o != null && !oldPage.equals(newPage); - } - - @Override - protected void doAction(ActionEvent e) throws Exception { - // user ask to change page - final ListTabModel model = (ListTabModel) getModel(); - final PaginationModel pagination = model.getPagination(); - - int width = pagination.getWidth(); - long newFirstIndex = newPage * width; - - // save new firstIndex in model - pagination.setFirstIndex(newFirstIndex); - - model.updateTabModel(isRemote(), getContext()); - - // update table model - 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() { - setTab(null); - newPage = null; - } - - protected JComboBox getChangePageComboBox() { - JComponent uiObject = getUIObject((String) getValue(Action.ACTION_COMMAND_KEY)); - if (uiObject instanceof JComboBox) { - return (JComboBox) uiObject; - } - // find with hard name - AbstractAction action = SimExplorerActionManager.newAction("goPage", (AbstractButton) null); - uiObject = getUIObject((String) action.getValue(Action.ACTION_COMMAND_KEY)); - if (uiObject instanceof JComboBox) { - return (JComboBox) uiObject; - } - throw new IllegalStateException("could not find ChangePageComboBox for action " + this); - } -} \ No newline at end of file Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/pagination/ChangeSizorAction.java =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/pagination/ChangeSizorAction.java 2008-02-04 18:59:16 UTC (rev 654) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/pagination/ChangeSizorAction.java 2008-02-04 19:00:41 UTC (rev 655) @@ -1,104 +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.pagination; - -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.model.PaginationModel; -import fr.cemagref.simexplorer.is.ui.swing.tab.JApplicationListTab; -import fr.cemagref.simexplorer.is.ui.swing.SimExplorerUIRefreshHelper; - -import javax.swing.Action; -import javax.swing.JComboBox; -import javax.swing.JTable; -import java.awt.event.ActionEvent; - -/** - * Action pour lancer une recherche d'application - * - * @author chemit - */ - at jaxx.runtime.builder.SelectActionConfig( - actionCommand = "changeSizor", - name = "simexplorer.action.pagination.changeSizor", - shortDescription = "simexplorer.action.pagination.changeSizor.tooltip", - longDescription = "simexplorer.action.pagination.changeSizor.help", - selectedIndex = -1 -) -public class ChangeSizorAction extends SimExplorerAbstractTabAction { - private static final long serialVersionUID = 5137512273375524199L; - - protected Integer newWidth; - - public ChangeSizorAction(String name) { - super(name); - } - - @Override - protected boolean beforeAction(ActionEvent e) throws Exception { - - JComboBox jComboBox = getComboBox(); - if (!jComboBox.isEnabled()) { - return false; - } - - ListTabModel model = (ListTabModel) getModel(); - Integer oldIndex = model.getPagination().getWidth(); - Object o = jComboBox.getSelectedItem(); - if (o != null) { - newWidth = Integer.valueOf(o + ""); - } - return o != null && !oldIndex.equals(newWidth); - } - - @Override - protected void doAction(ActionEvent e) throws Exception { - - final ListTabModel model = (ListTabModel) getModel(); - final PaginationModel pagination = model.getPagination(); - - // pour le moment, chaque retaille de fenetre repositionne - // la liste à zero pour simplifier - pagination.setWidth(newWidth); - pagination.setFirstIndex(0); - - model.updateTabModel(isRemote(), getContext()); - - - // save in TableModel - JApplicationListTab container = (JApplicationListTab) getUI(); - JTable jApplicationTable = container.getTable(); - JApplicationTableModel modelTab = (JApplicationTableModel) jApplicationTable.getModel(); - modelTab.setData(model.getList()); - - // refresh ui - SimExplorerUIRefreshHelper.refreshListTabUI(container, model); - } - - @Override - protected void clear() { - setTab(null); - newWidth = null; - } - - protected JComboBox getComboBox() { - return (JComboBox) getUIObject((String) getValue(Action.ACTION_COMMAND_KEY)); - } -} \ No newline at end of file Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/pagination/GoFirstPageAction.java =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/pagination/GoFirstPageAction.java 2008-02-04 18:59:16 UTC (rev 654) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/pagination/GoFirstPageAction.java 2008-02-04 19:00:41 UTC (rev 655) @@ -1,61 +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.pagination; - -import fr.cemagref.simexplorer.is.ui.swing.model.ListTabModel; - -import javax.swing.Action; -import java.awt.event.ActionEvent; - -/** - * Action pour afficher la première page - * - * @author chemit - */ - at jaxx.runtime.builder.ActionConfig( - actionCommand = "goFirstPage", - name = "simexplorer.action.pagination.goFirstPage", - shortDescription = "simexplorer.action.pagination.goFirstPage.tooltip", - longDescription = "simexplorer.action.pagination.goFirstPage.help", - smallIcon = "action/go-first.png", - mnemonic = 'f', - hideActionText = true -) -public class GoFirstPageAction extends ChangePageAction { - - private static final long serialVersionUID = -7292269279566418188L; - - public GoFirstPageAction(String name) { - super(name); - } - - @Override - protected boolean beforeAction(ActionEvent e) throws Exception { - if (!getUIObject((String) getValue(Action.ACTION_COMMAND_KEY)).isEnabled()) { - return false; - } - ListTabModel model = (ListTabModel) getModel(); - Integer oldPage = model.getPagination().getCurrentPage(); - boolean b = oldPage > 0; - if (b) { - newPage = 0; - } - return b; - } -} \ No newline at end of file Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/pagination/GoLastPageAction.java =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/pagination/GoLastPageAction.java 2008-02-04 18:59:16 UTC (rev 654) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/pagination/GoLastPageAction.java 2008-02-04 19:00:41 UTC (rev 655) @@ -1,61 +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.pagination; - -import fr.cemagref.simexplorer.is.ui.swing.model.ListTabModel; - -import javax.swing.Action; -import java.awt.event.ActionEvent; - -/** - * Action pour afficher la dernière page - * - * @author chemit - */ - at jaxx.runtime.builder.ActionConfig( - actionCommand = "goLastPage", - name = "simexplorer.action.pagination.goLastPage", - shortDescription = "simexplorer.action.pagination.goLastPage.tooltip", - longDescription = "simexplorer.action.pagination.goLastPage.help", - smallIcon = "action/go-last.png", - mnemonic = 'f', - hideActionText = true -) -public class GoLastPageAction extends ChangePageAction { - - private static final long serialVersionUID = 3453164752580608948L; - - public GoLastPageAction(String name) { - super(name); - } - - @Override - protected boolean beforeAction(ActionEvent e) throws Exception { - if (!getUIObject((String) getValue(Action.ACTION_COMMAND_KEY)).isEnabled()) { - return false; - } - ListTabModel model = (ListTabModel) getModel(); - Integer oldPage = model.getPagination().getCurrentPage(); - boolean b = oldPage < model.getPagination().getNbPages(); - if (b) { - newPage = getChangePageComboBox().getItemCount() - 1; - } - return b; - } -} \ No newline at end of file Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/pagination/GoNextPageAction.java =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/pagination/GoNextPageAction.java 2008-02-04 18:59:16 UTC (rev 654) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/pagination/GoNextPageAction.java 2008-02-04 19:00:41 UTC (rev 655) @@ -1,61 +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.pagination; - -import fr.cemagref.simexplorer.is.ui.swing.model.ListTabModel; - -import javax.swing.Action; -import java.awt.event.ActionEvent; - -/** - * Action pour afficher la page suivante - * - * @author chemit - */ - at jaxx.runtime.builder.ActionConfig( - actionCommand = "goNextPage", - name = "simexplorer.action.pagination.goNextPage", - shortDescription = "simexplorer.action.pagination.goNextPage.tooltip", - longDescription = "simexplorer.action.pagination.goNextPage.help", - smallIcon = "action/go-next.png", - mnemonic = 'f', - hideActionText = true -) -public class GoNextPageAction extends ChangePageAction { - - private static final long serialVersionUID = 836465304625059733L; - - public GoNextPageAction(String name) { - super(name); - } - - @Override - protected boolean beforeAction(ActionEvent e) throws Exception { - if (!getUIObject((String) getValue(Action.ACTION_COMMAND_KEY)).isEnabled()) { - return false; - } - ListTabModel model = (ListTabModel) getModel(); - Integer oldPage = model.getPagination().getCurrentPage(); - boolean b = oldPage < model.getPagination().getNbPages(); - if (b) { - newPage = getChangePageComboBox().getSelectedIndex() + 1; - } - return b; - } -} \ No newline at end of file Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/pagination/GoPreviousPageAction.java =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/pagination/GoPreviousPageAction.java 2008-02-04 18:59:16 UTC (rev 654) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/pagination/GoPreviousPageAction.java 2008-02-04 19:00:41 UTC (rev 655) @@ -1,61 +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.pagination; - -import fr.cemagref.simexplorer.is.ui.swing.model.ListTabModel; - -import javax.swing.Action; -import java.awt.event.ActionEvent; - -/** - * Action pour afficher la page précédente - * - * @author chemit - */ - at jaxx.runtime.builder.ActionConfig( - actionCommand = "goPreviousPage", - name = "simexplorer.action.pagination.goPreviousPage", - shortDescription = "simexplorer.action.pagination.goPreviousPage.tooltip", - longDescription = "simexplorer.action.pagination.goPreviousPage.help", - smallIcon = "action/go-previous.png", - mnemonic = 'f', - hideActionText = true -) -public class GoPreviousPageAction extends ChangePageAction { - - private static final long serialVersionUID = 3318383412609641337L; - - public GoPreviousPageAction(String name) { - super(name); - } - - @Override - protected boolean beforeAction(ActionEvent e) throws Exception { - if (!getUIObject((String) getValue(Action.ACTION_COMMAND_KEY)).isEnabled()) { - return false; - } - ListTabModel model = (ListTabModel) getModel(); - Integer oldPage = model.getPagination().getCurrentPage(); - boolean b = oldPage > 0; - if (b) { - newPage = oldPage - 1; - } - return b; - } -} \ No newline at end of file Deleted: 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 2008-02-04 18:59:16 UTC (rev 654) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/CloseTabAction.java 2008-02-04 19:00:41 UTC (rev 655) @@ -1,50 +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.tab; - -import fr.cemagref.simexplorer.is.ui.swing.action.SimExplorerAbstractTabAction; - -import java.awt.event.ActionEvent; - -/** - * Action pour fermer un tab - * - * @author chemit - */ - at jaxx.runtime.builder.ActionConfig( - actionCommand = "closeTab", - name = "simexplorer.action.closeTab", - shortDescription = "simexplorer.action.closeTab.tooltip", - longDescription = "simexplorer.action.closeTab.help", - smallIcon = "closeTab.png", - hideActionText = true -) -public class CloseTabAction extends SimExplorerAbstractTabAction { - - private static final long serialVersionUID = -3088257073806742313L; - - public CloseTabAction(String name) { - super(name, "closeTab"); - } - - @Override - protected void doAction(ActionEvent e) throws Exception { - getTab().closeTab(getMainUI().getContent()); - } -} Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ShowDetailTabAction.java =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ShowDetailTabAction.java 2008-02-04 18:59:16 UTC (rev 654) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ShowDetailTabAction.java 2008-02-04 19:00:41 UTC (rev 655) @@ -1,176 +0,0 @@ -/* -* ##% Copyright (C) 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.entities.data.LoggableElement; -import fr.cemagref.simexplorer.is.entities.metadata.MetaData; -import fr.cemagref.simexplorer.is.entities.metadata.Version; -import fr.cemagref.simexplorer.is.service.SimExplorerServiceException; -import fr.cemagref.simexplorer.is.service.StorageService; -import fr.cemagref.simexplorer.is.ui.SimExplorerRuntimeException; -import fr.cemagref.simexplorer.is.ui.swing.SimExplorerUIRefreshHelper; -import fr.cemagref.simexplorer.is.ui.swing.action.ShowTabAbstractAction; -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.DefaultListModel; -import javax.swing.JTree; -import javax.swing.ListModel; -import javax.swing.event.ListSelectionEvent; -import javax.swing.event.ListSelectionListener; -import javax.swing.event.TreeSelectionEvent; -import javax.swing.event.TreeSelectionListener; -import javax.swing.tree.DefaultTreeModel; -import javax.swing.tree.TreeNode; -import javax.swing.tree.TreePath; - -/** - * Action pour afficher le tab de détail d'un LoggableElement - * - * @author chemit - */ - at jaxx.runtime.builder.ActionConfig( - actionCommand = "showTab_detail", - name = "simexplorer.action.show.detail", - shortDescription = "simexplorer.action.show.detail.tooltip", - longDescription = "simexplorer.action.show.detail.help", - //smallIcon = "action/detail.png", - mnemonic = 'd', - hideActionText = false -) -public class ShowDetailTabAction extends ShowTabAbstractAction<JApplicationDetailTab, DetailTabModel> { - - private static final long serialVersionUID = 6643631041114311643L; - - public ShowDetailTabAction(String name) { - super(name); - } - - /*@Override - protected boolean beforeAction(ActionEvent e) throws Exception { - super.beforeAction(e); - DetailTabModel model = getTabModel(); - LoggableElement bean = model.getRootNode(); - MetaData data = bean.getMetaData(); - String uuid = data.getUuid(); - Version version = data.getVersion(); - log.info("show detail uuid:" + uuid + ", version:" + version + " (remote ?" + model.isRemote() + ")"); - return true; - } */ - - protected void initFirstUsage(final JApplicationDetailTab ui, final DetailTabModel model) { - //TODO cela peut être fait dans jaxx - ui.getNavigationTree().setModel(new DefaultTreeModel(null)); - //TODO cela peut être fait dans jaxx - ui.getHistoryList().setModel(new DefaultListModel()); - - // add a listener on navigation tree - ui.getNavigationTree().addTreeSelectionListener(new TreeSelectionListener() { - public void valueChanged(TreeSelectionEvent e) { - TreePath path = e.getNewLeadSelectionPath(); - LoggableElementTreeNode node = null; - if (path != null) { - node = (LoggableElementTreeNode) path.getLastPathComponent(); - } - StorageService service = getContext().getStorageService(model.isRemote()); - String token = getContext().getToken(); - - // update actions - SimExplorerUIRefreshHelper.refreshDetailActions(ui, model, node); - - model.setSelectedNode((LoggableElement) (node == null ? null : node.getUserObject())); - - // update detail panel - //updateDetail(ui, model, node, service, token); - - // update history list - updateHistoryList(ui, model, node, service, token); - - // refresh ui - SimExplorerUIRefreshHelper.refreshDetailTabUI(ui, model); - } - }); - - // add a listener on history list - ui.getHistoryList().addListSelectionListener(new ListSelectionListener() { - public void valueChanged(ListSelectionEvent e) { - int index = e.getLastIndex(); - //int lastIndex = e.getLastIndex(); - log.info("last index : " + index); - ListModel listModel = ui.getHistoryList().getModel(); - if (index > -1 && listModel.getSize() > index && ui.getHistoryList().getSelectedIndex() != index) { - Object selectedVersion = listModel.getElementAt(index); - log.info("selected version " + selectedVersion); - //TODO load details for this version - } - } - }); - } - - protected void initUI(JApplicationDetailTab ui, DetailTabModel model) { - // création de l'arbre de navigation - TreeNode root = LoggableElementTreeHelper.buildLoggableElementNode(model.getRootNode()); - // push tree model - JTree tree = ui.getNavigationTree(); - DefaultTreeModel modelTree = (DefaultTreeModel) tree.getModel(); - modelTree.setRoot(root); - // by default select the root node (to display info about the exploration) - tree.setSelectionRow(0); - // refresh ui - SimExplorerUIRefreshHelper.refreshDetailTabUI(ui, model); - } - - public static void updateDetail(JApplicationDetailTab ui, DetailTabModel model, LoggableElementTreeNode node, StorageService service, String token) { - boolean detail = LoggableElementTreeHelper.isLoggableElement(node); - String text; - if (detail) { - LoggableElement element = (LoggableElement) node.getUserObject(); - model.setSelectedNode(element); - text = "detail [" + node.getUserObject().getClass().getSimpleName() + "]" + element; - } else { - text = "No detail"; - } - ui.getDetailFake().setText(text); - } - - public static void updateHistoryList(JApplicationDetailTab ui, DetailTabModel model, LoggableElementTreeNode node, StorageService service, String token) { - //boolean history = LoggableElementTreeHelper.isLoggableElement(node); - LoggableElement element = model.getSelectedNode(); - boolean history = element !=null; - if (!history) { - model.setVersions(null); - model.setSelectedVersion(null); - return; - } - //LoggableElement element = (LoggableElement) node.getUserObject(); - try { - MetaData[] metas = service.getVersions(token, element.getMetaData().getUuid()); - Version[] versions = new Version[metas.length]; - for (int i = 0; i < metas.length; i++) { - MetaData meta = metas[i]; - versions[i] = meta.getVersion(); - } - model.setVersions(versions); - model.setSelectedVersion(element.getMetaData().getVersion()); - } catch (SimExplorerServiceException e) { - throw new SimExplorerRuntimeException(e); - } - } -} Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ShowLocalTabAction.java =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ShowLocalTabAction.java 2008-02-04 18:59:16 UTC (rev 654) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ShowLocalTabAction.java 2008-02-04 19:00:41 UTC (rev 655) @@ -1,54 +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.tab; - -import fr.cemagref.simexplorer.is.entities.metadata.MetaData; -import fr.cemagref.simexplorer.is.ui.swing.action.ShowTabAbstractAction; -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 jaxx.runtime.JAXXObject; - -import javax.swing.JTabbedPane; -import java.awt.Component; -import java.awt.event.ActionEvent; -import java.awt.event.KeyAdapter; -import java.awt.event.KeyEvent; - -/** - * Action pour afficher le tab local - * - * @author chemit - */ - at jaxx.runtime.builder.ActionConfig( - actionCommand = "showtag_local", - name = "simexplorer.action.show.local", - shortDescription = "simexplorer.action.show.local.tooltip", - longDescription = "simexplorer.action.show.local.help", - smallIcon = "action/local.png", - mnemonic = 'A', - hideActionText = false -) -public class ShowLocalTabAction extends ShowListTabAbstractAction { - private static final long serialVersionUID = 7009836674867908237L; - - public ShowLocalTabAction(String name) { - super(name,false); - } -} \ No newline at end of file Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ShowRemoteTabAction.java =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ShowRemoteTabAction.java 2008-02-04 18:59:16 UTC (rev 654) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ShowRemoteTabAction.java 2008-02-04 19:00:41 UTC (rev 655) @@ -1,41 +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.tab; - -/** - * Action pour afficher le tab local - * - * @author chemit - */ - at jaxx.runtime.builder.ActionConfig( - actionCommand = "showtag_remote", - name = "simexplorer.action.show.remote", - shortDescription = "simexplorer.action.show.remote.tooltip", - longDescription = "simexplorer.action.show.remote.help", - smallIcon = "action/remote.png", - mnemonic = 'p', - hideActionText = false -) -public class ShowRemoteTabAction extends ShowListTabAbstractAction { - private static final long serialVersionUID = -5791049785753596347L; - - public ShowRemoteTabAction(String name) { - super(name,true); - } -} \ No newline at end of file Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ShowSynchronizeTabAction.java =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ShowSynchronizeTabAction.java 2008-02-04 18:59:16 UTC (rev 654) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ShowSynchronizeTabAction.java 2008-02-04 19:00:41 UTC (rev 655) @@ -1,62 +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.tab; - -import fr.cemagref.simexplorer.is.ui.swing.action.ShowTabAbstractAction; -import fr.cemagref.simexplorer.is.ui.swing.model.SynchronizeTabModel; -import fr.cemagref.simexplorer.is.ui.swing.tab.JApplicationSynchronizeTab; - -import java.awt.event.ActionEvent; - -/** - * Action pour afficher le tab de synchronisation - * - * @author chemit - */ - at jaxx.runtime.builder.ActionConfig( - actionCommand = "showtag_synchronize", - name = "simexplorer.action.show.synchronize", - shortDescription = "simexplorer.action.show.synchronize.tooltip", - longDescription = "simexplorer.action.show.synchronize.help", - smallIcon = "action/reload.png", - mnemonic = 'S', - hideActionText = false -) -public class ShowSynchronizeTabAction extends ShowTabAbstractAction<JApplicationSynchronizeTab, SynchronizeTabModel> { - private static final long serialVersionUID = -3901398502496915785L; - - public ShowSynchronizeTabAction(String name) { - super(name); - } - - @Override - protected boolean beforeAction(ActionEvent e) throws Exception { - //TODO - return super.beforeAction(e); - } - - protected void initFirstUsage(JApplicationSynchronizeTab ui, SynchronizeTabModel model) { - //TODO - } - - protected void initUI(JApplicationSynchronizeTab ui, SynchronizeTabModel model) { - //TODO - } - -} Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ToggleLocalTabAction.java =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ToggleLocalTabAction.java 2008-02-04 18:59:16 UTC (rev 654) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ToggleLocalTabAction.java 2008-02-04 19:00:41 UTC (rev 655) @@ -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.tab; - -import fr.cemagref.simexplorer.is.ui.swing.action.ToggleTabAbstractAction; - -/** @author chemit */ - at jaxx.runtime.builder.ToggleActionConfig( - actionCommand = "toggleTab_local", - name = "simexplorer.action.show.local", - shortDescription = "simexplorer.action.show.local.tooltip", - longDescription = "simexplorer.action.show.local.help", - smallIcon = "action/local.png", - mnemonic = 'A', - name2 = "simexplorer.action.hide.local", - shortDescription2 = "simexplorer.action.hide.local.tooltip", - longDescription2 = "simexplorer.action.hide.local.help", - //smallIcon = "action/hide-local.png", - mnemonic2 = 'A', - selected = true, - hideActionText = false -) -public class ToggleLocalTabAction extends ToggleTabAbstractAction { - private static final long serialVersionUID = 9177105156859413014L; - - public ToggleLocalTabAction(String name) { - super(name); - } -} Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ToggleRemoteTabAction.java =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ToggleRemoteTabAction.java 2008-02-04 18:59:16 UTC (rev 654) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ToggleRemoteTabAction.java 2008-02-04 19:00:41 UTC (rev 655) @@ -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.tab; - -import fr.cemagref.simexplorer.is.ui.swing.action.ToggleTabAbstractAction; - -/** @author chemit */ - at jaxx.runtime.builder.ToggleActionConfig( - actionCommand = "toggleTab_remote", - name = "simexplorer.action.show.remote", - shortDescription = "simexplorer.action.show.remote.tooltip", - longDescription = "simexplorer.action.show.remote.help", - smallIcon = "action/remote.png", - mnemonic = 'P', - name2 = "simexplorer.action.hide.remote", - shortDescription2 = "simexplorer.action.hide.remote.tooltip", - longDescription2 = "simexplorer.action.hide.remote.help", - //smallIcon = "action/hide-remote.png", - mnemonic2 = 'P', - selected = true, - hideActionText = false -) -public class ToggleRemoteTabAction extends ToggleTabAbstractAction { - - private static final long serialVersionUID = -2309266315349330872L; - - public ToggleRemoteTabAction(String name) { - super(name); - } -} \ No newline at end of file Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ToggleSynchronizeTabAction.java =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ToggleSynchronizeTabAction.java 2008-02-04 18:59:16 UTC (rev 654) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ToggleSynchronizeTabAction.java 2008-02-04 19:00:41 UTC (rev 655) @@ -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.tab; - -import fr.cemagref.simexplorer.is.ui.swing.action.ToggleTabAbstractAction; - -/** @author chemit */ - at jaxx.runtime.builder.ToggleActionConfig( - actionCommand = "toggleTab_synchronize", - name = "simexplorer.action.show.synchronize", - shortDescription = "simexplorer.action.show.synchronize.tooltip", - longDescription = "simexplorer.action.show.synchronize.help", - smallIcon = "action/reload.png", - mnemonic = 'S', - name2 = "simexplorer.action.hide.synchronize", - shortDescription2 = "simexplorer.action.hide.synchronize.tooltip", - longDescription2 = "simexplorer.action.hide.synchronize.help", - smallIcon2 = "action/reload.png", - mnemonic2 = 'S', - selected = true, - hideActionText = false -) -public class ToggleSynchronizeTabAction extends ToggleTabAbstractAction { - private static final long serialVersionUID = -3389620707293969262L; - - public ToggleSynchronizeTabAction(String name) { - super(name); - } -} \ No newline at end of file Copied: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ChangePageAction.java (from rev 649, trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/pagination/ChangePageAction.java) =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ChangePageAction.java (rev 0) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ChangePageAction.java 2008-02-04 19:00:41 UTC (rev 655) @@ -0,0 +1,117 @@ +/* +* ##% 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.actions; + +import fr.cemagref.simexplorer.is.ui.swing.SimExplorerActionManager; +import fr.cemagref.simexplorer.is.ui.swing.SimExplorerUIRefreshHelper; +import fr.cemagref.simexplorer.is.ui.swing.actions.util.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.model.PaginationModel; +import fr.cemagref.simexplorer.is.ui.swing.tab.JApplicationListTab; + +import javax.swing.AbstractAction; +import javax.swing.AbstractButton; +import javax.swing.Action; +import javax.swing.JComboBox; +import javax.swing.JComponent; +import javax.swing.JTable; +import java.awt.event.ActionEvent; + +/** + * Action pour lancer une recherche d'application + * + * @author chemit + */ + at jaxx.runtime.builder.SelectActionConfig( + actionCommand = "goPage", + name = "simexplorer.action.pagination.goPage", + shortDescription = "simexplorer.action.pagination.goPage.tooltip", + longDescription = "simexplorer.action.pagination.goPage.help", + selectedIndex = -1 +) +public class ChangePageAction extends SimExplorerAbstractTabAction { + + private static final long serialVersionUID = 448524625085364914L; + + protected Integer newPage; + + public ChangePageAction(String name) { + super(name); + } + + @Override + protected boolean beforeAction(ActionEvent e) throws Exception { + JComboBox jComboBox = getChangePageComboBox(); + if (!jComboBox.isEnabled()) { + return false; + } + ListTabModel model = (ListTabModel) getModel(); + Integer oldPage = model.getPagination().getCurrentPage(); + Object o = jComboBox.getSelectedItem(); + if (o != null) { + newPage = Integer.valueOf(o + ""); + } + return o != null && !oldPage.equals(newPage); + } + + @Override + protected void doAction(ActionEvent e) throws Exception { + // user ask to change page + final ListTabModel model = (ListTabModel) getModel(); + final PaginationModel pagination = model.getPagination(); + + int width = pagination.getWidth(); + long newFirstIndex = newPage * width; + + // save new firstIndex in model + pagination.setFirstIndex(newFirstIndex); + + model.updateTabModel(isRemote(), getContext()); + + // update table model + 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() { + setTab(null); + newPage = null; + } + + protected JComboBox getChangePageComboBox() { + JComponent uiObject = getUIObject((String) getValue(Action.ACTION_COMMAND_KEY)); + if (uiObject instanceof JComboBox) { + return (JComboBox) uiObject; + } + // find with hard name + AbstractAction action = SimExplorerActionManager.newAction("goPage", (AbstractButton) null); + uiObject = getUIObject((String) action.getValue(Action.ACTION_COMMAND_KEY)); + if (uiObject instanceof JComboBox) { + return (JComboBox) uiObject; + } + throw new IllegalStateException("could not find ChangePageComboBox for action " + this); + } +} \ No newline at end of file Copied: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ChangeSizorAction.java (from rev 649, trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/pagination/ChangeSizorAction.java) =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ChangeSizorAction.java (rev 0) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ChangeSizorAction.java 2008-02-04 19:00:41 UTC (rev 655) @@ -0,0 +1,104 @@ +/* +* ##% 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.actions; + +import fr.cemagref.simexplorer.is.ui.swing.actions.util.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.model.PaginationModel; +import fr.cemagref.simexplorer.is.ui.swing.tab.JApplicationListTab; +import fr.cemagref.simexplorer.is.ui.swing.SimExplorerUIRefreshHelper; + +import javax.swing.Action; +import javax.swing.JComboBox; +import javax.swing.JTable; +import java.awt.event.ActionEvent; + +/** + * Action pour lancer une recherche d'application + * + * @author chemit + */ + at jaxx.runtime.builder.SelectActionConfig( + actionCommand = "changeSizor", + name = "simexplorer.action.pagination.changeSizor", + shortDescription = "simexplorer.action.pagination.changeSizor.tooltip", + longDescription = "simexplorer.action.pagination.changeSizor.help", + selectedIndex = -1 +) +public class ChangeSizorAction extends SimExplorerAbstractTabAction { + private static final long serialVersionUID = 5137512273375524199L; + + protected Integer newWidth; + + public ChangeSizorAction(String name) { + super(name); + } + + @Override + protected boolean beforeAction(ActionEvent e) throws Exception { + + JComboBox jComboBox = getComboBox(); + if (!jComboBox.isEnabled()) { + return false; + } + + ListTabModel model = (ListTabModel) getModel(); + Integer oldIndex = model.getPagination().getWidth(); + Object o = jComboBox.getSelectedItem(); + if (o != null) { + newWidth = Integer.valueOf(o + ""); + } + return o != null && !oldIndex.equals(newWidth); + } + + @Override + protected void doAction(ActionEvent e) throws Exception { + + final ListTabModel model = (ListTabModel) getModel(); + final PaginationModel pagination = model.getPagination(); + + // pour le moment, chaque retaille de fenetre repositionne + // la liste à zero pour simplifier + pagination.setWidth(newWidth); + pagination.setFirstIndex(0); + + model.updateTabModel(isRemote(), getContext()); + + + // save in TableModel + JApplicationListTab container = (JApplicationListTab) getUI(); + JTable jApplicationTable = container.getTable(); + JApplicationTableModel modelTab = (JApplicationTableModel) jApplicationTable.getModel(); + modelTab.setData(model.getList()); + + // refresh ui + SimExplorerUIRefreshHelper.refreshListTabUI(container, model); + } + + @Override + protected void clear() { + setTab(null); + newWidth = null; + } + + protected JComboBox getComboBox() { + return (JComboBox) getUIObject((String) getValue(Action.ACTION_COMMAND_KEY)); + } +} \ No newline at end of file Copied: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/CloseTabAction.java (from rev 649, 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/actions/CloseTabAction.java (rev 0) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/CloseTabAction.java 2008-02-04 19:00:41 UTC (rev 655) @@ -0,0 +1,50 @@ +/* +* ##% 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.actions; + +import fr.cemagref.simexplorer.is.ui.swing.actions.util.SimExplorerAbstractTabAction; + +import java.awt.event.ActionEvent; + +/** + * Action pour fermer un tab + * + * @author chemit + */ + at jaxx.runtime.builder.ActionConfig( + actionCommand = "closeTab", + name = "simexplorer.action.closeTab", + shortDescription = "simexplorer.action.closeTab.tooltip", + longDescription = "simexplorer.action.closeTab.help", + smallIcon = "closeTab.png", + hideActionText = true +) +public class CloseTabAction extends SimExplorerAbstractTabAction { + + private static final long serialVersionUID = -3088257073806742313L; + + public CloseTabAction(String name) { + super(name, "closeTab"); + } + + @Override + protected void doAction(ActionEvent e) throws Exception { + getTab().closeTab(getMainUI().getContent()); + } +} Copied: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/GoFirstPageAction.java (from rev 649, trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/pagination/GoFirstPageAction.java) =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/GoFirstPageAction.java (rev 0) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/GoFirstPageAction.java 2008-02-04 19:00:41 UTC (rev 655) @@ -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.actions; + +import fr.cemagref.simexplorer.is.ui.swing.model.ListTabModel; + +import java.awt.event.ActionEvent; + +/** + * Action pour afficher la première page + * + * @author chemit + */ + at jaxx.runtime.builder.ActionConfig( + actionCommand = "goFirstPage", + name = "simexplorer.action.pagination.goFirstPage", + shortDescription = "simexplorer.action.pagination.goFirstPage.tooltip", + longDescription = "simexplorer.action.pagination.goFirstPage.help", + smallIcon = "action/go-first.png", + mnemonic = 'f', + hideActionText = true +) +public class GoFirstPageAction extends ChangePageAction { + + private static final long serialVersionUID = -7292269279566418188L; + + public GoFirstPageAction(String name) { + super(name); + } + + @Override + protected boolean beforeAction(ActionEvent e) throws Exception { + if (!getUIObject((String) getValue(ACTION_COMMAND_KEY)).isEnabled()) { + return false; + } + ListTabModel model = (ListTabModel) getModel(); + Integer oldPage = model.getPagination().getCurrentPage(); + boolean b = oldPage > 0; + if (b) { + newPage = 0; + } + return b; + } +} \ No newline at end of file Copied: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/GoLastPageAction.java (from rev 649, trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/pagination/GoLastPageAction.java) =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/GoLastPageAction.java (rev 0) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/GoLastPageAction.java 2008-02-04 19:00:41 UTC (rev 655) @@ -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.actions; + +import fr.cemagref.simexplorer.is.ui.swing.model.ListTabModel; + +import java.awt.event.ActionEvent; + +/** + * Action pour afficher la dernière page + * + * @author chemit + */ + at jaxx.runtime.builder.ActionConfig( + actionCommand = "goLastPage", + name = "simexplorer.action.pagination.goLastPage", + shortDescription = "simexplorer.action.pagination.goLastPage.tooltip", + longDescription = "simexplorer.action.pagination.goLastPage.help", + smallIcon = "action/go-last.png", + mnemonic = 'f', + hideActionText = true +) +public class GoLastPageAction extends ChangePageAction { + + private static final long serialVersionUID = 3453164752580608948L; + + public GoLastPageAction(String name) { + super(name); + } + + @Override + protected boolean beforeAction(ActionEvent e) throws Exception { + if (!getUIObject((String) getValue(ACTION_COMMAND_KEY)).isEnabled()) { + return false; + } + ListTabModel model = (ListTabModel) getModel(); + Integer oldPage = model.getPagination().getCurrentPage(); + boolean b = oldPage < model.getPagination().getNbPages(); + if (b) { + newPage = getChangePageComboBox().getItemCount() - 1; + } + return b; + } +} \ No newline at end of file Copied: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/GoNextPageAction.java (from rev 649, trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/pagination/GoNextPageAction.java) =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/GoNextPageAction.java (rev 0) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/GoNextPageAction.java 2008-02-04 19:00:41 UTC (rev 655) @@ -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.actions; + +import fr.cemagref.simexplorer.is.ui.swing.model.ListTabModel; + +import java.awt.event.ActionEvent; + +/** + * Action pour afficher la page suivante + * + * @author chemit + */ + at jaxx.runtime.builder.ActionConfig( + actionCommand = "goNextPage", + name = "simexplorer.action.pagination.goNextPage", + shortDescription = "simexplorer.action.pagination.goNextPage.tooltip", + longDescription = "simexplorer.action.pagination.goNextPage.help", + smallIcon = "action/go-next.png", + mnemonic = 'f', + hideActionText = true +) +public class GoNextPageAction extends ChangePageAction { + + private static final long serialVersionUID = 836465304625059733L; + + public GoNextPageAction(String name) { + super(name); + } + + @Override + protected boolean beforeAction(ActionEvent e) throws Exception { + if (!getUIObject((String) getValue(ACTION_COMMAND_KEY)).isEnabled()) { + return false; + } + ListTabModel model = (ListTabModel) getModel(); + Integer oldPage = model.getPagination().getCurrentPage(); + boolean b = oldPage < model.getPagination().getNbPages(); + if (b) { + newPage = getChangePageComboBox().getSelectedIndex() + 1; + } + return b; + } +} \ No newline at end of file Copied: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/GoPreviousPageAction.java (from rev 649, trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/pagination/GoPreviousPageAction.java) =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/GoPreviousPageAction.java (rev 0) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/GoPreviousPageAction.java 2008-02-04 19:00:41 UTC (rev 655) @@ -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.actions; + +import fr.cemagref.simexplorer.is.ui.swing.model.ListTabModel; + +import java.awt.event.ActionEvent; + +/** + * Action pour afficher la page précédente + * + * @author chemit + */ + at jaxx.runtime.builder.ActionConfig( + actionCommand = "goPreviousPage", + name = "simexplorer.action.pagination.goPreviousPage", + shortDescription = "simexplorer.action.pagination.goPreviousPage.tooltip", + longDescription = "simexplorer.action.pagination.goPreviousPage.help", + smallIcon = "action/go-previous.png", + mnemonic = 'f', + hideActionText = true +) +public class GoPreviousPageAction extends ChangePageAction { + + private static final long serialVersionUID = 3318383412609641337L; + + public GoPreviousPageAction(String name) { + super(name); + } + + @Override + protected boolean beforeAction(ActionEvent e) throws Exception { + if (!getUIObject((String) getValue(ACTION_COMMAND_KEY)).isEnabled()) { + return false; + } + ListTabModel model = (ListTabModel) getModel(); + Integer oldPage = model.getPagination().getCurrentPage(); + boolean b = oldPage > 0; + if (b) { + newPage = oldPage - 1; + } + return b; + } +} \ No newline at end of file Copied: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ShowDetailTabAction.java (from rev 649, trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ShowDetailTabAction.java) =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ShowDetailTabAction.java (rev 0) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ShowDetailTabAction.java 2008-02-04 19:00:41 UTC (rev 655) @@ -0,0 +1,176 @@ +/* +* ##% Copyright (C) 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.actions; + +import fr.cemagref.simexplorer.is.entities.data.LoggableElement; +import fr.cemagref.simexplorer.is.entities.metadata.MetaData; +import fr.cemagref.simexplorer.is.entities.metadata.Version; +import fr.cemagref.simexplorer.is.service.SimExplorerServiceException; +import fr.cemagref.simexplorer.is.service.StorageService; +import fr.cemagref.simexplorer.is.ui.SimExplorerRuntimeException; +import fr.cemagref.simexplorer.is.ui.swing.SimExplorerUIRefreshHelper; +import fr.cemagref.simexplorer.is.ui.swing.actions.util.ShowTabAbstractAction; +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.DefaultListModel; +import javax.swing.JTree; +import javax.swing.ListModel; +import javax.swing.event.ListSelectionEvent; +import javax.swing.event.ListSelectionListener; +import javax.swing.event.TreeSelectionEvent; +import javax.swing.event.TreeSelectionListener; +import javax.swing.tree.DefaultTreeModel; +import javax.swing.tree.TreeNode; +import javax.swing.tree.TreePath; + +/** + * Action pour afficher le tab de détail d'un LoggableElement + * + * @author chemit + */ + at jaxx.runtime.builder.ActionConfig( + actionCommand = "showTab_detail", + name = "simexplorer.action.show.detail", + shortDescription = "simexplorer.action.show.detail.tooltip", + longDescription = "simexplorer.action.show.detail.help", + //smallIcon = "action/detail.png", + mnemonic = 'd', + hideActionText = false +) +public class ShowDetailTabAction extends ShowTabAbstractAction<JApplicationDetailTab, DetailTabModel> { + + private static final long serialVersionUID = 6643631041114311643L; + + public ShowDetailTabAction(String name) { + super(name); + } + + /*@Override + protected boolean beforeAction(ActionEvent e) throws Exception { + super.beforeAction(e); + DetailTabModel model = getTabModel(); + LoggableElement bean = model.getRootNode(); + MetaData data = bean.getMetaData(); + String uuid = data.getUuid(); + Version version = data.getVersion(); + log.info("show detail uuid:" + uuid + ", version:" + version + " (remote ?" + model.isRemote() + ")"); + return true; + } */ + + protected void initFirstUsage(final JApplicationDetailTab ui, final DetailTabModel model) { + //TODO cela peut être fait dans jaxx + ui.getNavigationTree().setModel(new DefaultTreeModel(null)); + //TODO cela peut être fait dans jaxx + ui.getHistoryList().setModel(new DefaultListModel()); + + // add a listener on navigation tree + ui.getNavigationTree().addTreeSelectionListener(new TreeSelectionListener() { + public void valueChanged(TreeSelectionEvent e) { + TreePath path = e.getNewLeadSelectionPath(); + LoggableElementTreeNode node = null; + if (path != null) { + node = (LoggableElementTreeNode) path.getLastPathComponent(); + } + StorageService service = getContext().getStorageService(model.isRemote()); + String token = getContext().getToken(); + + // update actions + SimExplorerUIRefreshHelper.refreshDetailActions(ui, model, node); + + model.setSelectedNode((LoggableElement) (node == null ? null : node.getUserObject())); + + // update detail panel + //updateDetail(ui, model, node, service, token); + + // update history list + updateHistoryList(ui, model, node, service, token); + + // refresh ui + SimExplorerUIRefreshHelper.refreshDetailTabUI(ui, model); + } + }); + + // add a listener on history list + ui.getHistoryList().addListSelectionListener(new ListSelectionListener() { + public void valueChanged(ListSelectionEvent e) { + int index = e.getLastIndex(); + //int lastIndex = e.getLastIndex(); + log.info("last index : " + index); + ListModel listModel = ui.getHistoryList().getModel(); + if (index > -1 && listModel.getSize() > index && ui.getHistoryList().getSelectedIndex() != index) { + Object selectedVersion = listModel.getElementAt(index); + log.info("selected version " + selectedVersion); + //TODO load details for this version + } + } + }); + } + + protected void initUI(JApplicationDetailTab ui, DetailTabModel model) { + // création de l'arbre de navigation + TreeNode root = LoggableElementTreeHelper.buildLoggableElementNode(model.getRootNode()); + // push tree model + JTree tree = ui.getNavigationTree(); + DefaultTreeModel modelTree = (DefaultTreeModel) tree.getModel(); + modelTree.setRoot(root); + // by default select the root node (to display info about the exploration) + tree.setSelectionRow(0); + // refresh ui + SimExplorerUIRefreshHelper.refreshDetailTabUI(ui, model); + } + + public static void updateDetail(JApplicationDetailTab ui, DetailTabModel model, LoggableElementTreeNode node, StorageService service, String token) { + boolean detail = LoggableElementTreeHelper.isLoggableElement(node); + String text; + if (detail) { + LoggableElement element = (LoggableElement) node.getUserObject(); + model.setSelectedNode(element); + text = "detail [" + node.getUserObject().getClass().getSimpleName() + "]" + element; + } else { + text = "No detail"; + } + ui.getDetailFake().setText(text); + } + + public static void updateHistoryList(JApplicationDetailTab ui, DetailTabModel model, LoggableElementTreeNode node, StorageService service, String token) { + //boolean history = LoggableElementTreeHelper.isLoggableElement(node); + LoggableElement element = model.getSelectedNode(); + boolean history = element !=null; + if (!history) { + model.setVersions(null); + model.setSelectedVersion(null); + return; + } + //LoggableElement element = (LoggableElement) node.getUserObject(); + try { + MetaData[] metas = service.getVersions(token, element.getMetaData().getUuid()); + Version[] versions = new Version[metas.length]; + for (int i = 0; i < metas.length; i++) { + MetaData meta = metas[i]; + versions[i] = meta.getVersion(); + } + model.setVersions(versions); + model.setSelectedVersion(element.getMetaData().getVersion()); + } catch (SimExplorerServiceException e) { + throw new SimExplorerRuntimeException(e); + } + } +} Copied: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ShowLocalTabAction.java (from rev 649, trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ShowLocalTabAction.java) =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ShowLocalTabAction.java (rev 0) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ShowLocalTabAction.java 2008-02-04 19:00:41 UTC (rev 655) @@ -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.actions; + +import fr.cemagref.simexplorer.is.ui.swing.actions.util.ShowListTabAbstractAction; + +/** + * Action pour afficher le tab local + * + * @author chemit + */ + at jaxx.runtime.builder.ActionConfig( + actionCommand = "showtag_local", + name = "simexplorer.action.show.local", + shortDescription = "simexplorer.action.show.local.tooltip", + longDescription = "simexplorer.action.show.local.help", + smallIcon = "action/local.png", + mnemonic = 'A', + hideActionText = false +) +public class ShowLocalTabAction extends ShowListTabAbstractAction { + private static final long serialVersionUID = 7009836674867908237L; + + public ShowLocalTabAction(String name) { + super(name,false); + } +} \ No newline at end of file Copied: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ShowRemoteTabAction.java (from rev 649, trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ShowRemoteTabAction.java) =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ShowRemoteTabAction.java (rev 0) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ShowRemoteTabAction.java 2008-02-04 19:00:41 UTC (rev 655) @@ -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.actions; + +import fr.cemagref.simexplorer.is.ui.swing.actions.util.ShowListTabAbstractAction; + +/** + * Action pour afficher le tab local + * + * @author chemit + */ + at jaxx.runtime.builder.ActionConfig( + actionCommand = "showtag_remote", + name = "simexplorer.action.show.remote", + shortDescription = "simexplorer.action.show.remote.tooltip", + longDescription = "simexplorer.action.show.remote.help", + smallIcon = "action/remote.png", + mnemonic = 'p', + hideActionText = false +) +public class ShowRemoteTabAction extends ShowListTabAbstractAction { + private static final long serialVersionUID = -5791049785753596347L; + + public ShowRemoteTabAction(String name) { + super(name,true); + } +} \ No newline at end of file Copied: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ShowSynchronizeTabAction.java (from rev 649, trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ShowSynchronizeTabAction.java) =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ShowSynchronizeTabAction.java (rev 0) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ShowSynchronizeTabAction.java 2008-02-04 19:00:41 UTC (rev 655) @@ -0,0 +1,62 @@ +/* +* \#\#% 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.actions; + +import fr.cemagref.simexplorer.is.ui.swing.actions.util.ShowTabAbstractAction; +import fr.cemagref.simexplorer.is.ui.swing.model.SynchronizeTabModel; +import fr.cemagref.simexplorer.is.ui.swing.tab.JApplicationSynchronizeTab; + +import java.awt.event.ActionEvent; + +/** + * Action pour afficher le tab de synchronisation + * + * @author chemit + */ + at jaxx.runtime.builder.ActionConfig( + actionCommand = "showtag_synchronize", + name = "simexplorer.action.show.synchronize", + shortDescription = "simexplorer.action.show.synchronize.tooltip", + longDescription = "simexplorer.action.show.synchronize.help", + smallIcon = "action/reload.png", + mnemonic = 'S', + hideActionText = false +) +public class ShowSynchronizeTabAction extends ShowTabAbstractAction<JApplicationSynchronizeTab, SynchronizeTabModel> { + private static final long serialVersionUID = -3901398502496915785L; + + public ShowSynchronizeTabAction(String name) { + super(name); + } + + @Override + protected boolean beforeAction(ActionEvent e) throws Exception { + //TODO + return super.beforeAction(e); + } + + protected void initFirstUsage(JApplicationSynchronizeTab ui, SynchronizeTabModel model) { + //TODO + } + + protected void initUI(JApplicationSynchronizeTab ui, SynchronizeTabModel model) { + //TODO + } + +} Copied: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ToggleLocalTabAction.java (from rev 649, trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ToggleLocalTabAction.java) =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ToggleLocalTabAction.java (rev 0) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ToggleLocalTabAction.java 2008-02-04 19:00:41 UTC (rev 655) @@ -0,0 +1,45 @@ +/* +* \#\#% 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.actions; + +import fr.cemagref.simexplorer.is.ui.swing.actions.util.ToggleTabAbstractAction; + +/** @author chemit */ + at jaxx.runtime.builder.ToggleActionConfig( + actionCommand = "toggleTab_local", + name = "simexplorer.action.show.local", + shortDescription = "simexplorer.action.show.local.tooltip", + longDescription = "simexplorer.action.show.local.help", + smallIcon = "action/local.png", + mnemonic = 'A', + name2 = "simexplorer.action.hide.local", + shortDescription2 = "simexplorer.action.hide.local.tooltip", + longDescription2 = "simexplorer.action.hide.local.help", + //smallIcon = "action/hide-local.png", + mnemonic2 = 'A', + selected = true, + hideActionText = false +) +public class ToggleLocalTabAction extends ToggleTabAbstractAction { + private static final long serialVersionUID = 9177105156859413014L; + + public ToggleLocalTabAction(String name) { + super(name); + } +} Copied: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ToggleRemoteTabAction.java (from rev 649, trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ToggleRemoteTabAction.java) =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ToggleRemoteTabAction.java (rev 0) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ToggleRemoteTabAction.java 2008-02-04 19:00:41 UTC (rev 655) @@ -0,0 +1,46 @@ +/* +* \#\#% 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.actions; + +import fr.cemagref.simexplorer.is.ui.swing.actions.util.ToggleTabAbstractAction; + +/** @author chemit */ + at jaxx.runtime.builder.ToggleActionConfig( + actionCommand = "toggleTab_remote", + name = "simexplorer.action.show.remote", + shortDescription = "simexplorer.action.show.remote.tooltip", + longDescription = "simexplorer.action.show.remote.help", + smallIcon = "action/remote.png", + mnemonic = 'P', + name2 = "simexplorer.action.hide.remote", + shortDescription2 = "simexplorer.action.hide.remote.tooltip", + longDescription2 = "simexplorer.action.hide.remote.help", + //smallIcon = "action/hide-remote.png", + mnemonic2 = 'P', + selected = true, + hideActionText = false +) +public class ToggleRemoteTabAction extends ToggleTabAbstractAction { + + private static final long serialVersionUID = -2309266315349330872L; + + public ToggleRemoteTabAction(String name) { + super(name); + } +} \ No newline at end of file Copied: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ToggleSynchronizeTabAction.java (from rev 649, trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ToggleSynchronizeTabAction.java) =================================================================== --- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ToggleSynchronizeTabAction.java (rev 0) +++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/ToggleSynchronizeTabAction.java 2008-02-04 19:00:41 UTC (rev 655) @@ -0,0 +1,45 @@ +/* +* \#\#% 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.actions; + +import fr.cemagref.simexplorer.is.ui.swing.actions.util.ToggleTabAbstractAction; + +/** @author chemit */ + at jaxx.runtime.builder.ToggleActionConfig( + actionCommand = "toggleTab_synchronize", + name = "simexplorer.action.show.synchronize", + shortDescription = "simexplorer.action.show.synchronize.tooltip", + longDescription = "simexplorer.action.show.synchronize.help", + smallIcon = "action/reload.png", + mnemonic = 'S', + name2 = "simexplorer.action.hide.synchronize", + shortDescription2 = "simexplorer.action.hide.synchronize.tooltip", + longDescription2 = "simexplorer.action.hide.synchronize.help", + smallIcon2 = "action/reload.png", + mnemonic2 = 'S', + selected = true, + hideActionText = false +) +public class ToggleSynchronizeTabAction extends ToggleTabAbstractAction { + private static final long serialVersionUID = -3389620707293969262L; + + public ToggleSynchronizeTabAction(String name) { + super(name); + } +} \ No newline at end of file Modified: trunk/simexplorer-is-swing/src/resources/actions.properties =================================================================== --- trunk/simexplorer-is-swing/src/resources/actions.properties 2008-02-04 18:59:16 UTC (rev 654) +++ trunk/simexplorer-is-swing/src/resources/actions.properties 2008-02-04 19:00:41 UTC (rev 655) @@ -6,19 +6,19 @@ action.i18n_fr_FR=fr.cemagref.simexplorer.is.ui.swing.action.common.ChangeI18nFRAction action.i18n_en_GB=fr.cemagref.simexplorer.is.ui.swing.action.common.ChangeI18nGBAction -action.closeTab_local=fr.cemagref.simexplorer.is.ui.swing.action.tab.CloseTabAction -action.closeTab_remote=fr.cemagref.simexplorer.is.ui.swing.action.tab.CloseTabAction -action.closeTab_detail=fr.cemagref.simexplorer.is.ui.swing.action.tab.CloseTabAction -action.closeTab_synchronize=fr.cemagref.simexplorer.is.ui.swing.action.tab.CloseTabAction +action.closeTab_local=fr.cemagref.simexplorer.is.ui.swing.actions.CloseTabAction +action.closeTab_remote=fr.cemagref.simexplorer.is.ui.swing.actions.CloseTabAction +action.closeTab_detail=fr.cemagref.simexplorer.is.ui.swing.actions.CloseTabAction +action.closeTab_synchronize=fr.cemagref.simexplorer.is.ui.swing.actions.CloseTabAction -action.showTab_local=fr.cemagref.simexplorer.is.ui.swing.action.tab.ShowLocalTabAction -action.showTab_remote=fr.cemagref.simexplorer.is.ui.swing.action.tab.ShowRemoteTabAction -action.showTab_detail=fr.cemagref.simexplorer.is.ui.swing.action.tab.ShowDetailTabAction -action.showTab_synchronize=fr.cemagref.simexplorer.is.ui.swing.action.tab.ShowSynchronizeTabAction +action.showTab_local=fr.cemagref.simexplorer.is.ui.swing.actions.ShowLocalTabAction +action.showTab_remote=fr.cemagref.simexplorer.is.ui.swing.actions.ShowRemoteTabAction +action.showTab_detail=fr.cemagref.simexplorer.is.ui.swing.actions.ShowDetailTabAction +action.showTab_synchronize=fr.cemagref.simexplorer.is.ui.swing.actions.ShowSynchronizeTabAction -action.toggleTab_local=fr.cemagref.simexplorer.is.ui.swing.action.tab.ToggleLocalTabAction -action.toggleTab_remote=fr.cemagref.simexplorer.is.ui.swing.action.tab.ToggleRemoteTabAction -action.toggleTab_synchronize=fr.cemagref.simexplorer.is.ui.swing.action.tab.ToggleSynchronizeTabAction +action.toggleTab_local=fr.cemagref.simexplorer.is.ui.swing.actions.ToggleLocalTabAction +action.toggleTab_remote=fr.cemagref.simexplorer.is.ui.swing.actions.ToggleRemoteTabAction +action.toggleTab_synchronize=fr.cemagref.simexplorer.is.ui.swing.actions.ToggleSynchronizeTabAction action.config=fr.cemagref.simexplorer.is.ui.swing.action.common.ConfigAction @@ -26,12 +26,12 @@ action.resetSearchApplication=fr.cemagref.simexplorer.is.ui.swing.action.application.ResetSearchApplicationAction action.advancedSearchApplication=fr.cemagref.simexplorer.is.ui.swing.action.application.AdvancedSearchApplicationAction -action.goFirstPage=fr.cemagref.simexplorer.is.ui.swing.action.pagination.GoFirstPageAction -action.goPreviousPage=fr.cemagref.simexplorer.is.ui.swing.action.pagination.GoPreviousPageAction -action.goPage=fr.cemagref.simexplorer.is.ui.swing.action.pagination.ChangePageAction -action.goNextPage=fr.cemagref.simexplorer.is.ui.swing.action.pagination.GoNextPageAction -action.goLastPage=fr.cemagref.simexplorer.is.ui.swing.action.pagination.GoLastPageAction -action.changeSizor=fr.cemagref.simexplorer.is.ui.swing.action.pagination.ChangeSizorAction +action.goFirstPage=fr.cemagref.simexplorer.is.ui.swing.actions.GoFirstPageAction +action.goPreviousPage=fr.cemagref.simexplorer.is.ui.swing.actions.GoPreviousPageAction +action.goPage=fr.cemagref.simexplorer.is.ui.swing.actions.ChangePageAction +action.goNextPage=fr.cemagref.simexplorer.is.ui.swing.actions.GoNextPageAction +action.goLastPage=fr.cemagref.simexplorer.is.ui.swing.actions.GoLastPageAction +action.changeSizor=fr.cemagref.simexplorer.is.ui.swing.actions.ChangeSizorAction action.collapseAllApplication=fr.cemagref.simexplorer.is.ui.swing.action.application.CollapseAllAction action.expandAllApplication=fr.cemagref.simexplorer.is.ui.swing.action.application.ExpandAllAction