Simexplorer-si-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
February 2008
- 2 participants
- 701 discussions
r655 - in trunk/simexplorer-is-swing/src: java/fr/cemagref/simexplorer/is/ui/swing/action/pagination java/fr/cemagref/simexplorer/is/ui/swing/action/tab java/fr/cemagref/simexplorer/is/ui/swing/actions resources
by tchemit@users.labs.libre-entreprise.org 04 Feb '08
by tchemit@users.labs.libre-entreprise.org 04 Feb '08
04 Feb '08
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
1
0
r654 - in trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing: action/tab actions/util
by tchemit@users.labs.libre-entreprise.org 04 Feb '08
by tchemit@users.labs.libre-entreprise.org 04 Feb '08
04 Feb '08
Author: tchemit
Date: 2008-02-04 18:59:16 +0000 (Mon, 04 Feb 2008)
New Revision: 654
Added:
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/ShowListTabAbstractAction.java
Removed:
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ShowListTabAbstractAction.java
Log:
normalisation nom paquetage
Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ShowListTabAbstractAction.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ShowListTabAbstractAction.java 2008-02-04 18:58:07 UTC (rev 653)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ShowListTabAbstractAction.java 2008-02-04 18:59:16 UTC (rev 654)
@@ -1,134 +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.data.LoggableElement;
-import fr.cemagref.simexplorer.is.entities.metadata.MetaData;
-import fr.cemagref.simexplorer.is.entities.metadata.Version;
-import fr.cemagref.simexplorer.is.ui.SimExplorerRuntimeException;
-import fr.cemagref.simexplorer.is.ui.StorageServiceHelper;
-import fr.cemagref.simexplorer.is.ui.swing.SimExplorerActionManager;
-import fr.cemagref.simexplorer.is.ui.swing.SimExplorerTab;
-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.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.AbstractAction;
-import javax.swing.AbstractButton;
-import javax.swing.JTabbedPane;
-import java.awt.Component;
-import java.awt.event.ActionEvent;
-import java.awt.event.KeyAdapter;
-import java.awt.event.KeyEvent;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-
-/** @author chemit */
-public class ShowListTabAbstractAction extends ShowTabAbstractAction<JApplicationListTab, ListTabModel> {
- private static final long serialVersionUID = 3813479850648257169L;
-
- /** flag pour indiquer si la liste est locale ou remote */
- protected boolean remote;
-
- public ShowListTabAbstractAction(String name, boolean remote) {
- super(name);
- this.remote = remote;
- }
-
- @Override
- protected boolean beforeAction(ActionEvent e) throws Exception {
- super.beforeAction(e);
- JTabbedPane tabbedPane = getTabContainer();
- JAXXObject ui = getUI();
-
- if (getTab().isTabVisible(tabbedPane)) {
- // tab is already visible, just select it
- tabbedPane.setSelectedComponent((Component) ui);
- return false;
- }
-
- ListTabModel model = (ListTabModel) getModel();
-
- MetaData[] data = model.getList();
-
- if (data == null) {
- // first coming here, init model
- model.initTabModel(remote, getContext());
- }
- return true;
- }
-
- protected void initFirstUsage(final JApplicationListTab ui, final ListTabModel model) {
- // add a show detail action when double click on a row of the table
- ui.getTable().addMouseListener(new MouseAdapter() {
-
- /** l'action d'affichage de l'onglet de détail */
- AbstractAction detailAction = SimExplorerActionManager.newAction("showTab_detail", (AbstractButton) null);
-
- @Override
- public void mouseClicked(MouseEvent e) {
- if (e.getClickCount() == 2) {
- // récupération du metadata à afficher
- MetaData data = model.get(ui.getTable().getSelectedRow());
- // récupération de l'uuid à afficher
- String uuid = data.getUuid();
- // récupération de la version à afficher
- Version version = data.getVersion();
- try {
- // chargement de l'élément à partir du service
- LoggableElement element = StorageServiceHelper.getElement(getContext(), remote, uuid, version.toString());
- // préparation du modèle de détail
- DetailTabModel detailModel = (DetailTabModel) SimExplorerTab.detail.getModel();
- // on supprime les anciennes données du modèle
- detailModel.reset();
- // positionnement du type de détail (local ou remote)
- detailModel.setRemote(remote);
- // positionnement du rootNode du modèle
- detailModel.setRootNode(element);
- log.info("prepare detail - uuid:" + uuid + ", version:" + version + " (remote ?" + remote + ")");
- // lancement de l'action d'affichage du tab
- detailAction.actionPerformed(new ActionEvent(e.getSource(), ActionEvent.ACTION_FIRST, "showTab_detail"));
- } catch (Exception e1) {
- throw new SimExplorerRuntimeException(e1);
- }
- }
- }
- });
- // add search actions listeners
-
- ui.getSearchText().addKeyListener(new KeyAdapter() {
- @Override
- public void keyReleased(KeyEvent e) {
- SimExplorerUIRefreshHelper.refreshSearchActions(ui, model);
- }
- });
- //TODO Est-ce vraiment le bon endroit pour faire ça ?
- // push model into tableModel
- JApplicationTableModel modelTab = (JApplicationTableModel) ui.getTable().getModel();
- modelTab.setData(model.getList());
- }
-
- protected void initUI(JApplicationListTab ui, ListTabModel model) {
- SimExplorerUIRefreshHelper.refreshListTabUI(ui, model);
- }
-}
Copied: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/ShowListTabAbstractAction.java (from rev 649, trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/tab/ShowListTabAbstractAction.java)
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/ShowListTabAbstractAction.java (rev 0)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/ShowListTabAbstractAction.java 2008-02-04 18:59:16 UTC (rev 654)
@@ -0,0 +1,134 @@
+/*
+* ##% 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.util;
+
+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.ui.SimExplorerRuntimeException;
+import fr.cemagref.simexplorer.is.ui.StorageServiceHelper;
+import fr.cemagref.simexplorer.is.ui.swing.SimExplorerActionManager;
+import fr.cemagref.simexplorer.is.ui.swing.SimExplorerTab;
+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.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.AbstractAction;
+import javax.swing.AbstractButton;
+import javax.swing.JTabbedPane;
+import java.awt.Component;
+import java.awt.event.ActionEvent;
+import java.awt.event.KeyAdapter;
+import java.awt.event.KeyEvent;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+
+/** @author chemit */
+public class ShowListTabAbstractAction extends ShowTabAbstractAction<JApplicationListTab, ListTabModel> {
+ private static final long serialVersionUID = 3813479850648257169L;
+
+ /** flag pour indiquer si la liste est locale ou remote */
+ protected boolean remote;
+
+ public ShowListTabAbstractAction(String name, boolean remote) {
+ super(name);
+ this.remote = remote;
+ }
+
+ @Override
+ protected boolean beforeAction(ActionEvent e) throws Exception {
+ super.beforeAction(e);
+ JTabbedPane tabbedPane = getTabContainer();
+ JAXXObject ui = getUI();
+
+ if (getTab().isTabVisible(tabbedPane)) {
+ // tab is already visible, just select it
+ tabbedPane.setSelectedComponent((Component) ui);
+ return false;
+ }
+
+ ListTabModel model = (ListTabModel) getModel();
+
+ MetaData[] data = model.getList();
+
+ if (data == null) {
+ // first coming here, init model
+ model.initTabModel(remote, getContext());
+ }
+ return true;
+ }
+
+ protected void initFirstUsage(final JApplicationListTab ui, final ListTabModel model) {
+ // add a show detail action when double click on a row of the table
+ ui.getTable().addMouseListener(new MouseAdapter() {
+
+ /** l'action d'affichage de l'onglet de détail */
+ AbstractAction detailAction = SimExplorerActionManager.newAction("showTab_detail", (AbstractButton) null);
+
+ @Override
+ public void mouseClicked(MouseEvent e) {
+ if (e.getClickCount() == 2) {
+ // récupération du metadata à afficher
+ MetaData data = model.get(ui.getTable().getSelectedRow());
+ // récupération de l'uuid à afficher
+ String uuid = data.getUuid();
+ // récupération de la version à afficher
+ Version version = data.getVersion();
+ try {
+ // chargement de l'élément à partir du service
+ LoggableElement element = StorageServiceHelper.getElement(getContext(), remote, uuid, version.toString());
+ // préparation du modèle de détail
+ DetailTabModel detailModel = (DetailTabModel) SimExplorerTab.detail.getModel();
+ // on supprime les anciennes données du modèle
+ detailModel.reset();
+ // positionnement du type de détail (local ou remote)
+ detailModel.setRemote(remote);
+ // positionnement du rootNode du modèle
+ detailModel.setRootNode(element);
+ log.info("prepare detail - uuid:" + uuid + ", version:" + version + " (remote ?" + remote + ")");
+ // lancement de l'action d'affichage du tab
+ detailAction.actionPerformed(new ActionEvent(e.getSource(), ActionEvent.ACTION_FIRST, "showTab_detail"));
+ } catch (Exception e1) {
+ throw new SimExplorerRuntimeException(e1);
+ }
+ }
+ }
+ });
+ // add search actions listeners
+
+ ui.getSearchText().addKeyListener(new KeyAdapter() {
+ @Override
+ public void keyReleased(KeyEvent e) {
+ SimExplorerUIRefreshHelper.refreshSearchActions(ui, model);
+ }
+ });
+ //TODO Est-ce vraiment le bon endroit pour faire ça ?
+ // push model into tableModel
+ JApplicationTableModel modelTab = (JApplicationTableModel) ui.getTable().getModel();
+ modelTab.setData(model.getList());
+ }
+
+ protected void initUI(JApplicationListTab ui, ListTabModel model) {
+ SimExplorerUIRefreshHelper.refreshListTabUI(ui, model);
+ }
+}
1
0
r653 - trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action
by tchemit@users.labs.libre-entreprise.org 04 Feb '08
by tchemit@users.labs.libre-entreprise.org 04 Feb '08
04 Feb '08
Author: tchemit
Date: 2008-02-04 18:58:07 +0000 (Mon, 04 Feb 2008)
New Revision: 653
Removed:
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/ChangeI18nAbstractAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/ShowTabAbstractAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/SimExplorerAbstractAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/SimExplorerAbstractTabAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/ToggleTabAbstractAction.java
Log:
normalisation nom paquetage
Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/ChangeI18nAbstractAction.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/ChangeI18nAbstractAction.java 2008-02-04 18:57:45 UTC (rev 652)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/ChangeI18nAbstractAction.java 2008-02-04 18:58:07 UTC (rev 653)
@@ -1,87 +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;
-
-import fr.cemagref.simexplorer.is.ui.SimExplorer;
-import org.apache.commons.beanutils.Converter;
-import org.codelutin.i18n.CountryEnum;
-import org.codelutin.i18n.I18n;
-import org.codelutin.i18n.LanguageEnum;
-import org.codelutin.util.ConverterUtil;
-
-import java.awt.event.ActionEvent;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * Une action pour recharger la locale.
- * <p/>
- * Le nom de l'action doit etre de la forme i18n_XX_YY où XX est la langue
- * et YY le pays de la locale à charger.
- *
- * @author chemit
- * @see LanguageEnum
- * @see CountryEnum
- */
-public abstract class ChangeI18nAbstractAction extends SimExplorerAbstractAction {
-
- public static final Pattern PATTERN_NAME = Pattern.compile("i18n_(\\w\\w)_(\\w\\w)");
-
- protected LanguageEnum language;
- protected CountryEnum country;
-
- private static final long serialVersionUID = 4180668477670765253L;
-
- public ChangeI18nAbstractAction(String name) {
- super(name);
- Matcher matcher = PATTERN_NAME.matcher(name);
- if (!matcher.matches()) {
- throw new IllegalArgumentException(I18n._(getClass().getName() + " should have a nmae like this 'i18n_XX_YY', but was {0}", name));
- }
- Converter convertorLanguage = ConverterUtil.getConverter(LanguageEnum.class);
- language = (LanguageEnum) convertorLanguage.convert(LanguageEnum.class, matcher.group(1));
-
- convertorLanguage = ConverterUtil.getConverter(CountryEnum.class);
- country = (CountryEnum) convertorLanguage.convert(CountryEnum.class, matcher.group(2));
- }
-
- @Override
- public void doAction(java.awt.event.ActionEvent e) {
-
- //TODO Should ask confirm from user since it will close ui, and re instanciate ui
-
- getMainUI().getQuit().getAction().actionPerformed(new ActionEvent(this, ActionEvent.ACTION_FIRST, "cancel"));
- SimExplorer.reloadUI();
- getContext().getConfig().setI18n(language, country);
- getContext().getConfig().initI18n();
-
- SimExplorer.launch();
-
- SimExplorer.getContext().saveSafely();
- }
-
- public boolean equalsLocale(LanguageEnum lang, CountryEnum countr) {
- return language == lang && country == countr;
- }
-
- @Override
- public String toString() {
- return super.toString() + " Language " + language + " Country " + country;
- }
-}
\ No newline at end of file
Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/ShowTabAbstractAction.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/ShowTabAbstractAction.java 2008-02-04 18:57:45 UTC (rev 652)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/ShowTabAbstractAction.java 2008-02-04 18:58:07 UTC (rev 653)
@@ -1,89 +0,0 @@
-/*
-* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin,
-* Tony Chemit, Gariel Landais
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-* ##% */
-package fr.cemagref.simexplorer.is.ui.swing.action;
-
-import jaxx.runtime.JAXXObject;
-import jaxx.runtime.builder.TabModel;
-
-import java.awt.event.ActionEvent;
-
-/**
- * Action pour afficher une tab. *
- *
- * @author chemit
- */
-public abstract class ShowTabAbstractAction<U extends JAXXObject, M extends TabModel> extends SimExplorerAbstractTabAction {
-
- protected abstract void initFirstUsage(U ui, M model);
-
- protected abstract void initUI(U ui, M model);
-
- protected Boolean firstTime;
-
-
- private static final long serialVersionUID = -2050956371415306760L;
-
- protected ShowTabAbstractAction(String name) {
- super(name, "showTab");
- }
-
-
- @Override
- protected boolean beforeAction(ActionEvent e) throws Exception {
-
- // mark the first use of the tab
- firstTime = getUI() == null;
-
- return true;
- }
-
- @Override
- protected void doAction(ActionEvent e) throws Exception {
- getTab().showTab(getTabContainer());
- }
-
- @Override
- protected void afterAction(ActionEvent e) throws Exception {
- super.afterAction(e);
- U ui = getTabUI();
- M model = getTabModel();
- if (firstTime) {
- initFirstUsage(ui, model);
- }
- initUI(ui,model);
-
- }
-
- @Override
- protected void clear() {
- super.clear();
- firstTime = null;
- }
-
- @SuppressWarnings({"unchecked"})
- protected U getTabUI() {
- return (U) getUI();
- }
-
- @SuppressWarnings({"unchecked"})
- protected M getTabModel() {
- return (M) getModel();
- }
-
-}
Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/SimExplorerAbstractAction.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/SimExplorerAbstractAction.java 2008-02-04 18:57:45 UTC (rev 652)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/SimExplorerAbstractAction.java 2008-02-04 18:58:07 UTC (rev 653)
@@ -1,107 +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;
-
-import fr.cemagref.simexplorer.is.ui.SimExplorer;
-import fr.cemagref.simexplorer.is.ui.SimExplorerContext;
-import fr.cemagref.simexplorer.is.ui.SimExplorerRuntimeException;
-import fr.cemagref.simexplorer.is.ui.swing.SimExplorerMainUI;
-import jaxx.runtime.JAXXObject;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import javax.swing.JComponent;
-import java.awt.event.ActionEvent;
-
-/**
- * La classe de base à utiliser pour toutes les action de l'application
- *
- * @author chemit
- */
-public abstract class SimExplorerAbstractAction extends javax.swing.AbstractAction {
-
- private static final long serialVersionUID = -810023044364620841L;
-
- static protected Log log = LogFactory.getLog(SimExplorerAbstractAction.class);
-
- public void actionPerformed(java.awt.event.ActionEvent e) {
-
- log.info("------------------------------------------------------------");
- log.info("event : " + e);
- log.info("source : " + e.getSource());
- try {
- boolean accepted = beforeAction(e);
- log.info("action : " + this);
- log.info("doAction : (" + accepted + ") : " + getActionName());
- if (accepted) {
- doAction(e);
- afterAction(e);
- }
- } catch (Exception e1) {
- throw new SimExplorerRuntimeException(e1);
- } finally {
- // always clear action after use : actions are staless
- clear();
- }
- }
-
- protected SimExplorerAbstractAction(String name) {
- super(name);
- log.debug("> " + this);
- }
-
- protected SimExplorerContext getContext() {
- return SimExplorer.getContext();
- }
-
- protected SimExplorerMainUI getMainUI() {
- return SimExplorer.getUI();
- }
-
- protected String getActionName() {
- return (String) getValue(ACTION_COMMAND_KEY);
- }
-
- protected String getName() {
- return (String) getValue(NAME);
- }
-
- protected boolean beforeAction(ActionEvent e) throws Exception {
- return isEnabled();
- }
-
- protected void doAction(ActionEvent e) throws Exception {
- // nothing by default
- }
-
- protected void afterAction(ActionEvent e) throws Exception {
- // nothing by default
- }
-
- protected void clear() {
- // nothing by default
- }
-
- protected JComponent getUIObject(String name, JAXXObject container) {
- if (container == null) {
- return null;
- }
- return (JComponent) container.getObjectById(name);
- }
-}
Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/SimExplorerAbstractTabAction.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/SimExplorerAbstractTabAction.java 2008-02-04 18:57:45 UTC (rev 652)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/SimExplorerAbstractTabAction.java 2008-02-04 18:58:07 UTC (rev 653)
@@ -1,121 +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;
-
-import fr.cemagref.simexplorer.is.ui.swing.SimExplorerTab;
-import jaxx.runtime.JAXXObject;
-import jaxx.runtime.builder.TabModel;
-import org.apache.commons.beanutils.Converter;
-import org.codelutin.i18n.I18n;
-import org.codelutin.util.ConverterUtil;
-
-import javax.swing.JComponent;
-import javax.swing.JTabbedPane;
-import java.awt.Component;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * La classe d'action de base pour toutes les action sur les Tab
- *
- * @author chemit
- */
-public abstract class SimExplorerAbstractTabAction extends SimExplorerAbstractAction {
-
- private SimExplorerTab tab;
- protected String param;
-
- private static final long serialVersionUID = 5285229914266682509L;
-
- protected SimExplorerAbstractTabAction(String name, String prefixPatternName) {
- super(name);
- if (prefixPatternName == null) {
- throw new IllegalArgumentException("prefixPatternName can not be null, but was.");
- }
-
- Pattern patternName = Pattern.compile(prefixPatternName + "_(\\w+)");
- Matcher matcher = patternName.matcher(name);
- if (!matcher.matches()) {
- throw new IllegalArgumentException(I18n._("{0} should have a name like this {1}, but was {2}", getClass().getName(), patternName, name));
- }
-
- param = prefixPatternName;
-
- Converter convertorLanguage = ConverterUtil.getConverter(SimExplorerTab.class);
- tab = (SimExplorerTab) convertorLanguage.convert(SimExplorerTab.class, matcher.group(1));
-
- log.debug(">>> " + this);
- }
-
- protected SimExplorerAbstractTabAction(String name) {
- super(name);
- param = name;
- log.debug(">>> " + this);
- }
-
- public String getParam() {
- return param;
- }
-
- public JTabbedPane getTabContainer() {
- return getMainUI().getContent();
- }
-
- public SimExplorerTab getTab() {
- if (tab == null) {
- Component comp = getTabContainer().getSelectedComponent();
- for (SimExplorerTab explorerTab : SimExplorerTab.values()) {
- if (comp.equals(explorerTab.getUI())) {
- tab = explorerTab;
- break;
- }
- }
- if (tab == null) {
- throw new IllegalStateException("could not found tab to match for action " + this);
- }
- }
- return tab;
- }
-
- public JAXXObject getUI() {
- return getTab().getUI();
- }
-
- public TabModel getModel() {
- return getTab().getModel();
- }
-
- @Override
- public String toString() {
- String s = super.toString();
- return s.substring(s.lastIndexOf(".") + 1) + "<tab: " + tab + ", param: " + param + ">";
- }
-
- protected JComponent getUIObject(String name) {
- return getUIObject(name, getUI());
- }
-
- protected void setTab(SimExplorerTab tab) {
- this.tab = tab;
- }
-
- protected boolean isRemote() {
- return getTab() == SimExplorerTab.remote;
- }
-}
Deleted: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/ToggleTabAbstractAction.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/ToggleTabAbstractAction.java 2008-02-04 18:57:45 UTC (rev 652)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/ToggleTabAbstractAction.java 2008-02-04 18:58:07 UTC (rev 653)
@@ -1,77 +0,0 @@
-/*
-* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin,
-* Tony Chemit, Gabriel Landais
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-* ##% */
-package fr.cemagref.simexplorer.is.ui.swing.action;
-
-import fr.cemagref.simexplorer.is.ui.swing.SimExplorerActionManager;
-
-import javax.swing.AbstractAction;
-import javax.swing.AbstractButton;
-import javax.swing.JTabbedPane;
-import java.awt.event.ActionEvent;
-
-/**
- * Action pour siwtcher un tab
- *
- * @author chemit
- */
-public abstract class ToggleTabAbstractAction extends SimExplorerAbstractTabAction {
-
- private static final long serialVersionUID = -5457476021698351850L;
-
- AbstractAction showAction;
- AbstractAction closeAction;
-
- AbstractAction action;
-
- public ToggleTabAbstractAction(String name) {
- super(name, "toggleTab");
- }
-
- @Override
- protected boolean beforeAction(ActionEvent e) throws Exception {
- super.beforeAction(e);
- // find real action to perform
- JTabbedPane container = getMainUI().getContent();
- if (getTab().isTabVisible(container)) {
- action = getCloseAction();
- } else {
- action = getShowAction();
- }
- return action != null;
- }
-
- @Override
- protected void doAction(ActionEvent e) throws Exception {
- action.actionPerformed(e);
- }
-
- public AbstractAction getCloseAction() {
- if (closeAction == null) {
- closeAction = SimExplorerActionManager.newAction("closeTab_" + getTab().name(), (AbstractButton) null);
- }
- return closeAction;
- }
-
- public AbstractAction getShowAction() {
- if (showAction == null) {
- showAction = SimExplorerActionManager.newAction("showTab_" + getTab().name(), (AbstractButton) null);
- }
- return showAction;
- }
-}
1
0
r652 - in trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing: . actions/util
by tchemit@users.labs.libre-entreprise.org 04 Feb '08
by tchemit@users.labs.libre-entreprise.org 04 Feb '08
04 Feb '08
Author: tchemit
Date: 2008-02-04 18:57:45 +0000 (Mon, 04 Feb 2008)
New Revision: 652
Added:
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/ChangeI18nAbstractAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/ShowTabAbstractAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/SimExplorerAbstractAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/SimExplorerAbstractTabAction.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/ToggleTabAbstractAction.java
Modified:
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorerActionManager.java
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorerUIRefreshHelper.java
Log:
normalisation nom paquetage
Modified: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorerActionManager.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorerActionManager.java 2008-02-04 18:56:22 UTC (rev 651)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorerActionManager.java 2008-02-04 18:57:45 UTC (rev 652)
@@ -19,7 +19,7 @@
package fr.cemagref.simexplorer.is.ui.swing;
import fr.cemagref.simexplorer.is.ui.SimExplorerRuntimeException;
-import fr.cemagref.simexplorer.is.ui.swing.action.SimExplorerAbstractAction;
+import fr.cemagref.simexplorer.is.ui.swing.actions.util.SimExplorerAbstractAction;
import jaxx.runtime.JAXXObject;
import jaxx.runtime.builder.ActionFactory;
import org.apache.commons.logging.Log;
@@ -42,7 +42,7 @@
* dans l'ui les actions connues.
*
* @author tony
- * @see SimExplorerAbstractAction
+ * @see fr.cemagref.simexplorer.is.ui.swing.actions.util.SimExplorerAbstractAction
*/
public class SimExplorerActionManager {
Modified: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorerUIRefreshHelper.java
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorerUIRefreshHelper.java 2008-02-04 18:56:22 UTC (rev 651)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/SimExplorerUIRefreshHelper.java 2008-02-04 18:57:45 UTC (rev 652)
@@ -20,7 +20,7 @@
import fr.cemagref.simexplorer.is.entities.metadata.Version;
import fr.cemagref.simexplorer.is.ui.SimExplorer;
-import fr.cemagref.simexplorer.is.ui.swing.action.ChangeI18nAbstractAction;
+import fr.cemagref.simexplorer.is.ui.swing.actions.util.ChangeI18nAbstractAction;
import fr.cemagref.simexplorer.is.ui.swing.model.DetailTabModel;
import fr.cemagref.simexplorer.is.ui.swing.model.ListTabModel;
import fr.cemagref.simexplorer.is.ui.swing.model.LoggableElementTreeNode;
Copied: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/ChangeI18nAbstractAction.java (from rev 649, trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/ChangeI18nAbstractAction.java)
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/ChangeI18nAbstractAction.java (rev 0)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/ChangeI18nAbstractAction.java 2008-02-04 18:57:45 UTC (rev 652)
@@ -0,0 +1,87 @@
+/*
+* ##% 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.util;
+
+import fr.cemagref.simexplorer.is.ui.SimExplorer;
+import org.apache.commons.beanutils.Converter;
+import org.codelutin.i18n.CountryEnum;
+import org.codelutin.i18n.I18n;
+import org.codelutin.i18n.LanguageEnum;
+import org.codelutin.util.ConverterUtil;
+
+import java.awt.event.ActionEvent;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * Une action pour recharger la locale.
+ * <p/>
+ * Le nom de l'action doit etre de la forme i18n_XX_YY où XX est la langue
+ * et YY le pays de la locale à charger.
+ *
+ * @author chemit
+ * @see LanguageEnum
+ * @see CountryEnum
+ */
+public abstract class ChangeI18nAbstractAction extends SimExplorerAbstractAction {
+
+ public static final Pattern PATTERN_NAME = Pattern.compile("i18n_(\\w\\w)_(\\w\\w)");
+
+ protected LanguageEnum language;
+ protected CountryEnum country;
+
+ private static final long serialVersionUID = 4180668477670765253L;
+
+ public ChangeI18nAbstractAction(String name) {
+ super(name);
+ Matcher matcher = PATTERN_NAME.matcher(name);
+ if (!matcher.matches()) {
+ throw new IllegalArgumentException(I18n._(getClass().getName() + " should have a nmae like this 'i18n_XX_YY', but was {0}", name));
+ }
+ Converter convertorLanguage = ConverterUtil.getConverter(LanguageEnum.class);
+ language = (LanguageEnum) convertorLanguage.convert(LanguageEnum.class, matcher.group(1));
+
+ convertorLanguage = ConverterUtil.getConverter(CountryEnum.class);
+ country = (CountryEnum) convertorLanguage.convert(CountryEnum.class, matcher.group(2));
+ }
+
+ @Override
+ public void doAction(java.awt.event.ActionEvent e) {
+
+ //TODO Should ask confirm from user since it will close ui, and re instanciate ui
+
+ getMainUI().getQuit().getAction().actionPerformed(new ActionEvent(this, ActionEvent.ACTION_FIRST, "cancel"));
+ SimExplorer.reloadUI();
+ getContext().getConfig().setI18n(language, country);
+ getContext().getConfig().initI18n();
+
+ SimExplorer.launch();
+
+ SimExplorer.getContext().saveSafely();
+ }
+
+ public boolean equalsLocale(LanguageEnum lang, CountryEnum countr) {
+ return language == lang && country == countr;
+ }
+
+ @Override
+ public String toString() {
+ return super.toString() + " Language " + language + " Country " + country;
+ }
+}
\ No newline at end of file
Copied: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/ShowTabAbstractAction.java (from rev 649, trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/ShowTabAbstractAction.java)
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/ShowTabAbstractAction.java (rev 0)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/ShowTabAbstractAction.java 2008-02-04 18:57:45 UTC (rev 652)
@@ -0,0 +1,89 @@
+/*
+* ##% Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Code Lutin,
+* Tony Chemit, Gariel Landais
+*
+* This program is free software; you can redistribute it and/or
+* modify it under the terms of the GNU General Public License
+* as published by the Free Software Foundation; either version 2
+* of the License, or (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+* ##% */
+package fr.cemagref.simexplorer.is.ui.swing.actions.util;
+
+import jaxx.runtime.JAXXObject;
+import jaxx.runtime.builder.TabModel;
+
+import java.awt.event.ActionEvent;
+
+/**
+ * Action pour afficher une tab. *
+ *
+ * @author chemit
+ */
+public abstract class ShowTabAbstractAction<U extends JAXXObject, M extends TabModel> extends SimExplorerAbstractTabAction {
+
+ protected abstract void initFirstUsage(U ui, M model);
+
+ protected abstract void initUI(U ui, M model);
+
+ protected Boolean firstTime;
+
+
+ private static final long serialVersionUID = -2050956371415306760L;
+
+ protected ShowTabAbstractAction(String name) {
+ super(name, "showTab");
+ }
+
+
+ @Override
+ protected boolean beforeAction(ActionEvent e) throws Exception {
+
+ // mark the first use of the tab
+ firstTime = getUI() == null;
+
+ return true;
+ }
+
+ @Override
+ protected void doAction(ActionEvent e) throws Exception {
+ getTab().showTab(getTabContainer());
+ }
+
+ @Override
+ protected void afterAction(ActionEvent e) throws Exception {
+ super.afterAction(e);
+ U ui = getTabUI();
+ M model = getTabModel();
+ if (firstTime) {
+ initFirstUsage(ui, model);
+ }
+ initUI(ui,model);
+
+ }
+
+ @Override
+ protected void clear() {
+ super.clear();
+ firstTime = null;
+ }
+
+ @SuppressWarnings({"unchecked"})
+ protected U getTabUI() {
+ return (U) getUI();
+ }
+
+ @SuppressWarnings({"unchecked"})
+ protected M getTabModel() {
+ return (M) getModel();
+ }
+
+}
Copied: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/SimExplorerAbstractAction.java (from rev 649, trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/SimExplorerAbstractAction.java)
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/SimExplorerAbstractAction.java (rev 0)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/SimExplorerAbstractAction.java 2008-02-04 18:57:45 UTC (rev 652)
@@ -0,0 +1,107 @@
+/*
+* ##% 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.util;
+
+import fr.cemagref.simexplorer.is.ui.SimExplorer;
+import fr.cemagref.simexplorer.is.ui.SimExplorerContext;
+import fr.cemagref.simexplorer.is.ui.SimExplorerRuntimeException;
+import fr.cemagref.simexplorer.is.ui.swing.SimExplorerMainUI;
+import jaxx.runtime.JAXXObject;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import javax.swing.JComponent;
+import java.awt.event.ActionEvent;
+
+/**
+ * La classe de base à utiliser pour toutes les action de l'application
+ *
+ * @author chemit
+ */
+public abstract class SimExplorerAbstractAction extends javax.swing.AbstractAction {
+
+ private static final long serialVersionUID = -810023044364620841L;
+
+ static protected Log log = LogFactory.getLog(SimExplorerAbstractAction.class);
+
+ public void actionPerformed(java.awt.event.ActionEvent e) {
+
+ log.info("------------------------------------------------------------");
+ log.info("event : " + e);
+ log.info("source : " + e.getSource());
+ try {
+ boolean accepted = beforeAction(e);
+ log.info("action : " + this);
+ log.info("doAction : (" + accepted + ") : " + getActionName());
+ if (accepted) {
+ doAction(e);
+ afterAction(e);
+ }
+ } catch (Exception e1) {
+ throw new SimExplorerRuntimeException(e1);
+ } finally {
+ // always clear action after use : actions are staless
+ clear();
+ }
+ }
+
+ protected SimExplorerAbstractAction(String name) {
+ super(name);
+ log.debug("> " + this);
+ }
+
+ protected SimExplorerContext getContext() {
+ return SimExplorer.getContext();
+ }
+
+ protected SimExplorerMainUI getMainUI() {
+ return SimExplorer.getUI();
+ }
+
+ protected String getActionName() {
+ return (String) getValue(ACTION_COMMAND_KEY);
+ }
+
+ protected String getName() {
+ return (String) getValue(NAME);
+ }
+
+ protected boolean beforeAction(ActionEvent e) throws Exception {
+ return isEnabled();
+ }
+
+ protected void doAction(ActionEvent e) throws Exception {
+ // nothing by default
+ }
+
+ protected void afterAction(ActionEvent e) throws Exception {
+ // nothing by default
+ }
+
+ protected void clear() {
+ // nothing by default
+ }
+
+ protected JComponent getUIObject(String name, JAXXObject container) {
+ if (container == null) {
+ return null;
+ }
+ return (JComponent) container.getObjectById(name);
+ }
+}
Copied: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/SimExplorerAbstractTabAction.java (from rev 649, trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/SimExplorerAbstractTabAction.java)
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/SimExplorerAbstractTabAction.java (rev 0)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/SimExplorerAbstractTabAction.java 2008-02-04 18:57:45 UTC (rev 652)
@@ -0,0 +1,121 @@
+/*
+* ##% 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.util;
+
+import fr.cemagref.simexplorer.is.ui.swing.SimExplorerTab;
+import jaxx.runtime.JAXXObject;
+import jaxx.runtime.builder.TabModel;
+import org.apache.commons.beanutils.Converter;
+import org.codelutin.i18n.I18n;
+import org.codelutin.util.ConverterUtil;
+
+import javax.swing.JComponent;
+import javax.swing.JTabbedPane;
+import java.awt.Component;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * La classe d'action de base pour toutes les action sur les Tab
+ *
+ * @author chemit
+ */
+public abstract class SimExplorerAbstractTabAction extends SimExplorerAbstractAction {
+
+ private SimExplorerTab tab;
+ protected String param;
+
+ private static final long serialVersionUID = 5285229914266682509L;
+
+ protected SimExplorerAbstractTabAction(String name, String prefixPatternName) {
+ super(name);
+ if (prefixPatternName == null) {
+ throw new IllegalArgumentException("prefixPatternName can not be null, but was.");
+ }
+
+ Pattern patternName = Pattern.compile(prefixPatternName + "_(\\w+)");
+ Matcher matcher = patternName.matcher(name);
+ if (!matcher.matches()) {
+ throw new IllegalArgumentException(I18n._("{0} should have a name like this {1}, but was {2}", getClass().getName(), patternName, name));
+ }
+
+ param = prefixPatternName;
+
+ Converter convertorLanguage = ConverterUtil.getConverter(SimExplorerTab.class);
+ tab = (SimExplorerTab) convertorLanguage.convert(SimExplorerTab.class, matcher.group(1));
+
+ log.debug(">>> " + this);
+ }
+
+ protected SimExplorerAbstractTabAction(String name) {
+ super(name);
+ param = name;
+ log.debug(">>> " + this);
+ }
+
+ public String getParam() {
+ return param;
+ }
+
+ public JTabbedPane getTabContainer() {
+ return getMainUI().getContent();
+ }
+
+ public SimExplorerTab getTab() {
+ if (tab == null) {
+ Component comp = getTabContainer().getSelectedComponent();
+ for (SimExplorerTab explorerTab : SimExplorerTab.values()) {
+ if (comp.equals(explorerTab.getUI())) {
+ tab = explorerTab;
+ break;
+ }
+ }
+ if (tab == null) {
+ throw new IllegalStateException("could not found tab to match for action " + this);
+ }
+ }
+ return tab;
+ }
+
+ public JAXXObject getUI() {
+ return getTab().getUI();
+ }
+
+ public TabModel getModel() {
+ return getTab().getModel();
+ }
+
+ @Override
+ public String toString() {
+ String s = super.toString();
+ return s.substring(s.lastIndexOf(".") + 1) + "<tab: " + tab + ", param: " + param + ">";
+ }
+
+ protected JComponent getUIObject(String name) {
+ return getUIObject(name, getUI());
+ }
+
+ protected void setTab(SimExplorerTab tab) {
+ this.tab = tab;
+ }
+
+ protected boolean isRemote() {
+ return getTab() == SimExplorerTab.remote;
+ }
+}
Copied: trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/ToggleTabAbstractAction.java (from rev 649, trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/action/ToggleTabAbstractAction.java)
===================================================================
--- trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/ToggleTabAbstractAction.java (rev 0)
+++ trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/ToggleTabAbstractAction.java 2008-02-04 18:57:45 UTC (rev 652)
@@ -0,0 +1,77 @@
+/*
+* ##% 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.util;
+
+import fr.cemagref.simexplorer.is.ui.swing.SimExplorerActionManager;
+
+import javax.swing.AbstractAction;
+import javax.swing.AbstractButton;
+import javax.swing.JTabbedPane;
+import java.awt.event.ActionEvent;
+
+/**
+ * Action pour siwtcher un tab
+ *
+ * @author chemit
+ */
+public abstract class ToggleTabAbstractAction extends SimExplorerAbstractTabAction {
+
+ private static final long serialVersionUID = -5457476021698351850L;
+
+ AbstractAction showAction;
+ AbstractAction closeAction;
+
+ AbstractAction action;
+
+ public ToggleTabAbstractAction(String name) {
+ super(name, "toggleTab");
+ }
+
+ @Override
+ protected boolean beforeAction(ActionEvent e) throws Exception {
+ super.beforeAction(e);
+ // find real action to perform
+ JTabbedPane container = getMainUI().getContent();
+ if (getTab().isTabVisible(container)) {
+ action = getCloseAction();
+ } else {
+ action = getShowAction();
+ }
+ return action != null;
+ }
+
+ @Override
+ protected void doAction(ActionEvent e) throws Exception {
+ action.actionPerformed(e);
+ }
+
+ public AbstractAction getCloseAction() {
+ if (closeAction == null) {
+ closeAction = SimExplorerActionManager.newAction("closeTab_" + getTab().name(), (AbstractButton) null);
+ }
+ return closeAction;
+ }
+
+ public AbstractAction getShowAction() {
+ if (showAction == null) {
+ showAction = SimExplorerActionManager.newAction("showTab_" + getTab().name(), (AbstractButton) null);
+ }
+ return showAction;
+ }
+}
1
0
r651 - in trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing: . actions
by tchemit@users.labs.libre-entreprise.org 04 Feb '08
by tchemit@users.labs.libre-entreprise.org 04 Feb '08
04 Feb '08
Author: tchemit
Date: 2008-02-04 18:56:22 +0000 (Mon, 04 Feb 2008)
New Revision: 651
Added:
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/
trunk/simexplorer-is-swing/src/java/fr/cemagref/simexplorer/is/ui/swing/actions/util/
Log:
normalisation nom paquetage
1
0
04 Feb '08
Author: tchemit
Date: 2008-02-04 18:42:24 +0000 (Mon, 04 Feb 2008)
New Revision: 650
Modified:
trunk/simexplorer-is-service/pom.xml
Log:
inutile d'identifier une ex?\195?\169cution lors qu'il y en a une seule :)
Modified: trunk/simexplorer-is-service/pom.xml
===================================================================
--- trunk/simexplorer-is-service/pom.xml 2008-02-04 18:34:56 UTC (rev 649)
+++ trunk/simexplorer-is-service/pom.xml 2008-02-04 18:42:24 UTC (rev 650)
@@ -33,7 +33,6 @@
<executions>
<execution>
<phase>compile</phase>
- <id>java</id>
<goals>
<goal>parserJava</goal>
<goal>gen</goal>
1
0
r649 - trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/grid
by tchemit@users.labs.libre-entreprise.org 04 Feb '08
by tchemit@users.labs.libre-entreprise.org 04 Feb '08
04 Feb '08
Author: tchemit
Date: 2008-02-04 18:34:56 +0000 (Mon, 04 Feb 2008)
New Revision: 649
Modified:
trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/grid/ElementDataSource.java
Log:
redundant initializer
Modified: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/grid/ElementDataSource.java
===================================================================
--- trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/grid/ElementDataSource.java 2008-02-04 18:30:35 UTC (rev 648)
+++ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/grid/ElementDataSource.java 2008-02-04 18:34:56 UTC (rev 649)
@@ -74,7 +74,7 @@
* @see org.apache.tapestry.grid.GridDataSource#getAvailableRows()
*/
public int getAvailableRows() {
- int result = 0;
+ int result;
try {
if (query.equals("")) {
result = RemoteStorageService.getStorageService()
1
0
r648 - in trunk: simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/factories simexplorer-is-entities/src/resources simexplorer-is-entities/src/resources/i18n simexplorer-is-service simexplorer-is-service/src simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/storage/engine simexplorer-is-service/src/resources simexplorer-is-service/src/resources/i18n simexplorer-is-storage/src/java/fr/cemagref/simex
by glandais@users.labs.libre-entreprise.org 04 Feb '08
by glandais@users.labs.libre-entreprise.org 04 Feb '08
04 Feb '08
Author: glandais
Date: 2008-02-04 18:30:35 +0000 (Mon, 04 Feb 2008)
New Revision: 648
Added:
trunk/simexplorer-is-entities/src/resources/i18n/
trunk/simexplorer-is-entities/src/resources/i18n/simexplorer-is-entities-en_GB.properties
trunk/simexplorer-is-entities/src/resources/i18n/simexplorer-is-entities-fr_FR.properties
trunk/simexplorer-is-service/src/resources/
trunk/simexplorer-is-service/src/resources/i18n/
trunk/simexplorer-is-service/src/resources/i18n/simexplorer-is-service-en_GB.properties
trunk/simexplorer-is-service/src/resources/i18n/simexplorer-is-service-fr_FR.properties
trunk/simexplorer-is-web/src/resources/i18n/
trunk/simexplorer-is-web/src/resources/i18n/simexplorer-is-web-en_GB.properties
trunk/simexplorer-is-web/src/resources/i18n/simexplorer-is-web-fr_FR.properties
Modified:
trunk/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/factories/XmlConstants.java
trunk/simexplorer-is-service/pom.xml
trunk/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceClient.java
trunk/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceCommon.java
trunk/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/storage/engine/StorageEngineSecuImpl.java
trunk/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/storage/VersionGenerator.java
trunk/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/storage/database/lucene/LuceneDatabase.java
trunk/simexplorer-is-swing/src/resources/i18n/simexplorer-is-swing-en_GB.properties
trunk/simexplorer-is-swing/src/resources/i18n/simexplorer-is-swing-fr_FR.properties
trunk/simexplorer-is-web/pom.xml
trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/components/Layout.java
trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementDelete.java
trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementDetail.java
trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementExport.java
trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementHistory.java
trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementImport.java
trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementList.java
trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementPageDetail.java
trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementRights.java
trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ExceptionReport.java
trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/GroupEdit.java
trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/GroupList.java
trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/Install.java
trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/Login.java
trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/UserEdit.java
trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/UserList.java
trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/security/ProtectedPage.java
trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/services/AppModule.java
Log:
String externalisation
Modified: trunk/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/factories/XmlConstants.java
===================================================================
--- trunk/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/factories/XmlConstants.java 2008-02-04 18:24:48 UTC (rev 647)
+++ trunk/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/factories/XmlConstants.java 2008-02-04 18:30:35 UTC (rev 648)
@@ -24,8 +24,17 @@
*/
public interface XmlConstants {
+ /** The Constant KEY_XML. */
+ public static final String KEY_XML = "_xml";
+
+ /** The Constant DOT. */
+ public static final String DOT = ".";
+
+ /** The Constant FOLDER_SEPARATOR. */
+ public static final String FOLDER_SEPARATOR = "/";
+
/** The Constant FACTORY_SUFFIX. */
- public static final String FACTORY_SUFFIX = "language";
+ public static final String FACTORY_SUFFIX = "Factory";
/** The Constant KEY_CODE_LANGUAGE. */
public static final String KEY_CODE_LANGUAGE = "language";
Added: trunk/simexplorer-is-entities/src/resources/i18n/simexplorer-is-entities-en_GB.properties
===================================================================
--- trunk/simexplorer-is-entities/src/resources/i18n/simexplorer-is-entities-en_GB.properties (rev 0)
+++ trunk/simexplorer-is-entities/src/resources/i18n/simexplorer-is-entities-en_GB.properties 2008-02-04 18:30:35 UTC (rev 648)
@@ -0,0 +1,2 @@
+#Mon Feb 04 19:19:22 CET 2008
+simexplorer.contenttype.rawtype=Raw file (text)
Added: trunk/simexplorer-is-entities/src/resources/i18n/simexplorer-is-entities-fr_FR.properties
===================================================================
--- trunk/simexplorer-is-entities/src/resources/i18n/simexplorer-is-entities-fr_FR.properties (rev 0)
+++ trunk/simexplorer-is-entities/src/resources/i18n/simexplorer-is-entities-fr_FR.properties 2008-02-04 18:30:35 UTC (rev 648)
@@ -0,0 +1,2 @@
+#Mon Feb 04 19:19:22 CET 2008
+simexplorer.contenttype.rawtype=Fichier brut (texte)
Modified: trunk/simexplorer-is-service/pom.xml
===================================================================
--- trunk/simexplorer-is-service/pom.xml 2008-02-04 18:24:48 UTC (rev 647)
+++ trunk/simexplorer-is-service/pom.xml 2008-02-04 18:30:35 UTC (rev 648)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>simexplorer-is</groupId>
@@ -18,13 +18,41 @@
<version>0.0.1-SNAPSHOT</version>
</parent>
- <repositories>
- <repository>
- <id>openhms</id>
- <url>http://open.hmsonline.com/repo/maven2</url>
- </repository>
- </repositories>
- <dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>lutinplugin</groupId>
+ <artifactId>maven-i18n-plugin</artifactId>
+ <version>0.2-SNAPSHOT</version>
+ <configuration>
+ <bundles>
+ <param>fr_FR</param>
+ <param>en_GB</param>
+ </bundles>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>compile</phase>
+ <id>java</id>
+ <goals>
+ <goal>parserJava</goal>
+ <goal>gen</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ </plugins>
+ </build>
+
+
+ <repositories>
+ <repository>
+ <id>openhms</id>
+ <url>http://open.hmsonline.com/repo/maven2</url>
+ </repository>
+ </repositories>
+ <dependencies>
<dependency>
<groupId>simexplorer-is</groupId>
<artifactId>simexplorer-is-storage</artifactId>
Modified: trunk/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceClient.java
===================================================================
--- trunk/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceClient.java 2008-02-04 18:24:48 UTC (rev 647)
+++ trunk/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceClient.java 2008-02-04 18:30:35 UTC (rev 648)
@@ -17,6 +17,8 @@
* ##% */
package fr.cemagref.simexplorer.is.service;
+import static org.codelutin.i18n.I18n._;
+
import fr.cemagref.simexplorer.is.storage.SimExplorerStorageException;
import fr.cemagref.simexplorer.is.storage.engine.StorageEngine;
import fr.cemagref.simexplorer.is.storage.engine.StorageEngineImpl;
@@ -34,7 +36,7 @@
*/
public String loginUser(String login, String password)
throws SimExplorerServiceException {
- throw new SimExplorerServiceException("can not log to local service");
+ throw new SimExplorerServiceException(_("simexplorer.service.nologonlocal"));
}
/* (non-Javadoc)
Modified: trunk/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceCommon.java
===================================================================
--- trunk/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceCommon.java 2008-02-04 18:24:48 UTC (rev 647)
+++ trunk/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/service/StorageServiceCommon.java 2008-02-04 18:30:35 UTC (rev 648)
@@ -54,9 +54,6 @@
public abstract class StorageServiceCommon implements StorageService,
XmlConstants {
- /** The Constant KEY_XML. */
- private static final String KEY_XML = "_xml";
-
/**
* Gets the storage engine.
*
@@ -216,7 +213,7 @@
try {
LoggableElement le;
le = (LoggableElement) BaseEntityFactory.getFactory(
- LoggableElement.class.getPackage().getName() + "."
+ LoggableElement.class.getPackage().getName() + DOT
+ mde.getType()).loadElement(
getStorageEngine().retrieveData(token, mde, KEY_XML));
@@ -256,7 +253,7 @@
} else {
if (entryName.startsWith(FILE_DATA_PREFIX)) {
String fileName = entryName.replace(
- FILE_DATA_PREFIX + "/", "");
+ FILE_DATA_PREFIX + FOLDER_SEPARATOR, "");
String idFile = getStorageEngine().storeTempData(
zis);
attachments.put(fileName, idFile);
@@ -366,9 +363,9 @@
List<Attachment> attachments = loggableElement.getMetaData()
.getAttachments();
for (Attachment attachment : attachments) {
- files.put(
- FILE_DATA_PREFIX + "/" + attachment.getUniqueId(),
- getStorageEngine().retrieveData(token, thisMde,
+ files.put(FILE_DATA_PREFIX + FOLDER_SEPARATOR
+ + attachment.getUniqueId(), getStorageEngine()
+ .retrieveData(token, thisMde,
attachment.getFileName()));
}
}
Modified: trunk/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/storage/engine/StorageEngineSecuImpl.java
===================================================================
--- trunk/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/storage/engine/StorageEngineSecuImpl.java 2008-02-04 18:24:48 UTC (rev 647)
+++ trunk/simexplorer-is-service/src/java/fr/cemagref/simexplorer/is/storage/engine/StorageEngineSecuImpl.java 2008-02-04 18:30:35 UTC (rev 648)
@@ -17,6 +17,8 @@
* ##% */
package fr.cemagref.simexplorer.is.storage.engine;
+import static org.codelutin.i18n.I18n._;
+
import java.io.InputStream;
import java.util.List;
import java.util.Map;
@@ -53,7 +55,8 @@
if (permission != null && permission.isCanAdmin()) {
super.deleteElement(token, uuid, version);
} else {
- throw new SimExplorerStorageException("Permission denied");
+ throw new SimExplorerStorageException(
+ _("simexplorer.service.security.norights"));
}
}
@@ -68,7 +71,8 @@
if (permission != null && permission.isCanAdmin()) {
super.deleteElements(token, uuid);
} else {
- throw new SimExplorerStorageException("Permission denied");
+ throw new SimExplorerStorageException(
+ _("simexplorer.service.security.norights"));
}
}
@@ -129,7 +133,8 @@
if (permission != null && permission.isCanRead()) {
mde = super.getMetadata(token, uuid, version);
} else {
- throw new SimExplorerStorageException("Permission denied");
+ throw new SimExplorerStorageException(
+ _("simexplorer.service.security.norights"));
}
return mde;
}
@@ -145,7 +150,8 @@
if (permission != null && permission.isCanRead()) {
mde = super.getMetadata(token, uuid);
} else {
- throw new SimExplorerStorageException("Permission denied");
+ throw new SimExplorerStorageException(
+ _("simexplorer.service.security.norights"));
}
return mde;
}
@@ -161,7 +167,8 @@
if (permission != null && permission.isCanRead()) {
versions = super.getVersions(token, uuid);
} else {
- throw new SimExplorerStorageException("Permission denied");
+ throw new SimExplorerStorageException(
+ _("simexplorer.service.security.norights"));
}
return versions;
}
@@ -178,7 +185,8 @@
if (permission != null && permission.isCanRead()) {
stream = super.retrieveData(token, entity, field);
} else {
- throw new SimExplorerStorageException("Permission denied");
+ throw new SimExplorerStorageException(
+ _("simexplorer.service.security.norights"));
}
return stream;
}
@@ -196,7 +204,8 @@
super.saveElement(token, element, attachments);
credentialManager.saveElement(token, element.getUuid());
} else {
- throw new SimExplorerStorageException("Permission denied");
+ throw new SimExplorerStorageException(
+ _("simexplorer.service.security.norights"));
}
}
Added: trunk/simexplorer-is-service/src/resources/i18n/simexplorer-is-service-en_GB.properties
===================================================================
--- trunk/simexplorer-is-service/src/resources/i18n/simexplorer-is-service-en_GB.properties (rev 0)
+++ trunk/simexplorer-is-service/src/resources/i18n/simexplorer-is-service-en_GB.properties 2008-02-04 18:30:35 UTC (rev 648)
@@ -0,0 +1,8 @@
+#Mon Feb 04 19:19:30 CET 2008
+simexplorer.service.mail.footer=simexplorer.service.mail.footer
+simexplorer.service.mail.header=simexplorer.service.mail.header
+simexplorer.service.mail.login=simexplorer.service.mail.login
+simexplorer.service.mail.password=simexplorer.service.mail.password
+simexplorer.service.mail.subject=simexplorer.service.mail.subject
+simexplorer.service.nologonlocal=simexplorer.service.nologonlocal
+simexplorer.service.security.norights=simexplorer.service.security.norights
Added: trunk/simexplorer-is-service/src/resources/i18n/simexplorer-is-service-fr_FR.properties
===================================================================
--- trunk/simexplorer-is-service/src/resources/i18n/simexplorer-is-service-fr_FR.properties (rev 0)
+++ trunk/simexplorer-is-service/src/resources/i18n/simexplorer-is-service-fr_FR.properties 2008-02-04 18:30:35 UTC (rev 648)
@@ -0,0 +1,8 @@
+#Mon Feb 04 19:19:30 CET 2008
+simexplorer.service.mail.footer=
+simexplorer.service.mail.header=
+simexplorer.service.mail.login=
+simexplorer.service.mail.password=
+simexplorer.service.mail.subject=
+simexplorer.service.nologonlocal=
+simexplorer.service.security.norights=
Modified: trunk/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/storage/VersionGenerator.java
===================================================================
--- trunk/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/storage/VersionGenerator.java 2008-02-04 18:24:48 UTC (rev 647)
+++ trunk/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/storage/VersionGenerator.java 2008-02-04 18:30:35 UTC (rev 648)
@@ -32,10 +32,10 @@
*/
public class VersionGenerator {
- /** la taille maximum d'une version generee. */
+ /** la taille maximum d'une version generée. */
static final int MAX_SIZE = 5;
- /** la valeur maximum d'un numéro de version à generer. */
+ /** la valeur maximum d'un numero de version a generer. */
static final int MAX_VERSION_NUMBER = 10;
/**
Modified: trunk/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/storage/database/lucene/LuceneDatabase.java
===================================================================
--- trunk/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/storage/database/lucene/LuceneDatabase.java 2008-02-04 18:24:48 UTC (rev 647)
+++ trunk/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/storage/database/lucene/LuceneDatabase.java 2008-02-04 18:30:35 UTC (rev 648)
@@ -715,8 +715,8 @@
if (fieldable.name().startsWith(KEY_DESCRIPTOR)) {
String fieldValue = fieldable.stringValue();
- String key = fieldable.name().replace(KEY_DESCRIPTOR + ".", "");
- StringTokenizer st = new StringTokenizer(key, ".");
+ String key = fieldable.name().replace(KEY_DESCRIPTOR + DOT, "");
+ StringTokenizer st = new StringTokenizer(key, DOT);
Integer iDescriptor = Integer.valueOf(st.nextToken());
KeyValue kv = descriptors.get(iDescriptor);
@@ -736,8 +736,8 @@
String fieldValue = fieldable.stringValue();
- String key = fieldable.name().replace(KEY_ATTACHMENT + ".", "");
- StringTokenizer st = new StringTokenizer(key, ".");
+ String key = fieldable.name().replace(KEY_ATTACHMENT + DOT, "");
+ StringTokenizer st = new StringTokenizer(key, DOT);
Integer iAttachment = Integer.valueOf(st.nextToken());
Attachment attachment = attachments.get(iAttachment);
@@ -843,10 +843,10 @@
Map<String, String> descriptors = element.getDescriptors();
int i = 0;
for (Map.Entry<String, String> entry : descriptors.entrySet()) {
- String key = KEY_DESCRIPTOR + "." + i;
- addSimpleField(document, key + "." + KEY_DESCRIPTOR_KEY, entry
+ String key = KEY_DESCRIPTOR + DOT + i;
+ addSimpleField(document, key + DOT + KEY_DESCRIPTOR_KEY, entry
.getKey());
- addSimpleField(document, key + "." + KEY_DESCRIPTOR_VALUE, entry
+ addSimpleField(document, key + DOT + KEY_DESCRIPTOR_VALUE, entry
.getValue());
i++;
}
@@ -854,12 +854,12 @@
List<Attachment> attachments = element.getAttachments();
i = 0;
for (Attachment attachment : attachments) {
- String key = KEY_ATTACHMENT + "." + i;
- addSimpleField(document, key + "." + KEY_ATTACHMENT_FILENAME,
+ String key = KEY_ATTACHMENT + DOT + i;
+ addSimpleField(document, key + DOT + KEY_ATTACHMENT_FILENAME,
attachment.getFileName());
- addSimpleField(document, key + "." + KEY_ATTACHMENT_HASH, Integer
+ addSimpleField(document, key + DOT + KEY_ATTACHMENT_HASH, Integer
.toHexString(attachment.getDataHash()));
- addSimpleField(document, key + "." + KEY_ATTACHMENT_TYPE,
+ addSimpleField(document, key + DOT + KEY_ATTACHMENT_TYPE,
attachment.getContentType().getClass().getSimpleName());
i++;
}
Modified: trunk/simexplorer-is-swing/src/resources/i18n/simexplorer-is-swing-en_GB.properties
===================================================================
--- trunk/simexplorer-is-swing/src/resources/i18n/simexplorer-is-swing-en_GB.properties 2008-02-04 18:24:48 UTC (rev 647)
+++ trunk/simexplorer-is-swing/src/resources/i18n/simexplorer-is-swing-en_GB.properties 2008-02-04 18:30:35 UTC (rev 648)
@@ -1,4 +1,4 @@
-#Sat Feb 02 16:53:15 GMT 2008
+#Mon Feb 04 19:19:45 CET 2008
simexplorer.action.about=About
simexplorer.action.about.help=
simexplorer.action.about.tooltip=Show About dialog
Modified: trunk/simexplorer-is-swing/src/resources/i18n/simexplorer-is-swing-fr_FR.properties
===================================================================
--- trunk/simexplorer-is-swing/src/resources/i18n/simexplorer-is-swing-fr_FR.properties 2008-02-04 18:24:48 UTC (rev 647)
+++ trunk/simexplorer-is-swing/src/resources/i18n/simexplorer-is-swing-fr_FR.properties 2008-02-04 18:30:35 UTC (rev 648)
@@ -1,4 +1,4 @@
-#Sat Feb 02 16:53:15 GMT 2008
+#Mon Feb 04 19:19:45 CET 2008
simexplorer.action.about=A propos
simexplorer.action.about.help=
simexplorer.action.about.tooltip=Afficher les cr\u00E9dits
Modified: trunk/simexplorer-is-web/pom.xml
===================================================================
--- trunk/simexplorer-is-web/pom.xml 2008-02-04 18:24:48 UTC (rev 647)
+++ trunk/simexplorer-is-web/pom.xml 2008-02-04 18:30:35 UTC (rev 648)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>simexplorer-is</groupId>
@@ -17,13 +17,15 @@
<artifactId>simexplorer-is</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
- <repositories>
- <repository>
- <id>t5components</id>
- <name>T5Components Maven Repository</name>
- <url>http://213.160.23.119:8080/t5components/maven-repository</url>
- </repository>
- </repositories>
+ <repositories>
+ <repository>
+ <id>t5components</id>
+ <name>T5Components Maven Repository</name>
+ <url>
+ http://213.160.23.119:8080/t5components/maven-repository
+ </url>
+ </repository>
+ </repositories>
<build>
<plugins>
<!--WebApp in JAR -->
@@ -69,6 +71,29 @@
</configuration>
</plugin>
+ <plugin>
+ <groupId>lutinplugin</groupId>
+ <artifactId>maven-i18n-plugin</artifactId>
+ <version>0.2-SNAPSHOT</version>
+ <configuration>
+ <bundles>
+ <param>fr_FR</param>
+ <param>en_GB</param>
+ </bundles>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>compile</phase>
+ <id>java</id>
+ <goals>
+ <goal>parserJava</goal>
+ <goal>gen</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+
</plugins>
</build>
Modified: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/components/Layout.java
===================================================================
--- trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/components/Layout.java 2008-02-04 18:24:48 UTC (rev 647)
+++ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/components/Layout.java 2008-02-04 18:30:35 UTC (rev 648)
@@ -93,7 +93,7 @@
* @return the object
*/
Object onActionFromSwitchLocaleFr() {
- persistentLocale.set(new Locale("fr"));
+ persistentLocale.set(new Locale("fr_FR"));
return null;
}
@@ -103,7 +103,7 @@
* @return the object
*/
Object onActionFromSwitchLocaleEn() {
- persistentLocale.set(new Locale("en"));
+ persistentLocale.set(new Locale("en_GB"));
return null;
}
Modified: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementDelete.java
===================================================================
--- trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementDelete.java 2008-02-04 18:24:48 UTC (rev 647)
+++ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementDelete.java 2008-02-04 18:30:35 UTC (rev 648)
@@ -17,6 +17,8 @@
* ##% */
package fr.cemagref.simexplorer.is.ui.web.pages;
+import static org.codelutin.i18n.I18n._;
+
import org.apache.tapestry.annotations.InjectPage;
import fr.cemagref.simexplorer.is.service.SimExplorerServiceException;
@@ -68,7 +70,7 @@
*/
@Override
public String getWindowTitle() {
- return "";
+ return _("simexplorer.ui.web.title.deleteelement");
}
}
Modified: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementDetail.java
===================================================================
--- trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementDetail.java 2008-02-04 18:24:48 UTC (rev 647)
+++ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementDetail.java 2008-02-04 18:30:35 UTC (rev 648)
@@ -17,6 +17,8 @@
* ##% */
package fr.cemagref.simexplorer.is.ui.web.pages;
+import static org.codelutin.i18n.I18n._;
+
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
@@ -42,7 +44,7 @@
*/
@Override
public String getWindowTitle() {
- return "";
+ return _("simexplorer.ui.web.title.elementdetail");
}
/**
@@ -52,10 +54,10 @@
*/
public List<String> getHeaders() {
List<String> result = new ArrayList<String>();
- result.add("Type");
- result.add("Name");
- result.add("Version");
- result.add("Actions");
+ result.add(_("simexplorer.ui.web.type"));
+ result.add(_("simexplorer.ui.web.name"));
+ result.add(_("simexplorer.ui.web.version"));
+ result.add(_("simexplorer.ui.web.actions"));
return result;
}
@@ -120,22 +122,25 @@
node.setType(TreeNode.TYPE_FOLDER);
- node.setColumns(generateStringArray("Application exploration",
- getMetadata().getName(), getElement().getMetaData()
- .getVersion().toString(), getElement().getMetaData(),
- true, "export", "history", "delete"));
+ node.setColumns(generateStringArray(
+ _("simexplorer.ui.web.applicationexploration"), getMetadata()
+ .getName(), getElement().getMetaData().getVersion()
+ .toString(), getElement().getMetaData(), true,
+ "export", "history", "delete"));
List<TreeNode> children = new ArrayList<TreeNode>();
TreeNode node1 = new TreeNode();
node1.setType(TreeNode.TYPE_FOLDER);
- node1.setColumns(generateStringArray("Components", "", ""));
+ node1.setColumns(generateStringArray(
+ _("simexplorer.ui.web.components"), "", ""));
node1
.setChildren(generateComponents((ExplorationApplication) getElement()));
children.add(node1);
TreeNode node2 = new TreeNode();
node2.setType(TreeNode.TYPE_FOLDER);
- node2.setColumns(generateStringArray("Explorations", "", ""));
+ node2.setColumns(generateStringArray(
+ _("simexplorer.ui.web.explorations"), "", ""));
node2
.setChildren(generateExplorations((ExplorationApplication) getElement()));
children.add(node2);
@@ -176,10 +181,11 @@
TreeNode explorationDataNode = new TreeNode();
explorationDataNode.setType(TreeNode.TYPE_FOLDER);
- explorationDataNode.setColumns(generateStringArray("Exploration data",
- explorationData.getMetaData().getName(), explorationData
- .getMetaData().getVersion().toString(), explorationData
- .getMetaData(), true, "history", "delete"));
+ explorationDataNode.setColumns(generateStringArray(
+ _("simexplorer.ui.web.explorationdata"), explorationData
+ .getMetaData().getName(), explorationData.getMetaData()
+ .getVersion().toString(),
+ explorationData.getMetaData(), true, "history", "delete"));
List<TreeNode> children = new ArrayList<TreeNode>();
@@ -187,8 +193,9 @@
TreeNode node1 = new TreeNode();
node1.setType(TreeNode.TYPE_FOLDER);
- node1.setColumns(generateStringArray("Values", generateHeader("Type"),
- generateHeader("Value")));
+ node1.setColumns(generateStringArray(_("simexplorer.ui.web.values"),
+ generateHeader(_("simexplorer.ui.web.type")),
+ generateHeader(_("simexplorer.ui.web.value"))));
node1.setChildren(generateValues(explorationData));
children.add(node1);
@@ -231,8 +238,8 @@
TreeNode res = new TreeNode();
res.setType(TreeNode.TYPE_DOCUMENT);
- res.setColumns(generateStringArray("Result", "", "", explorationData
- .getMetaData(), false, "export"));
+ res.setColumns(generateStringArray(_("simexplorer.ui.web.result"), "",
+ "", explorationData.getMetaData(), false, "export"));
return res;
}
@@ -279,38 +286,42 @@
TreeNode componentNode = new TreeNode();
componentNode.setType(TreeNode.TYPE_FOLDER);
- componentNode
- .setColumns(generateStringArray("Component", component
- .getMetaData().getName(), component.getMetaData()
- .getVersion().toString(), component.getMetaData(),
- true, "history", "delete"));
+ componentNode.setColumns(generateStringArray(
+ _("simexplorer.ui.web.component"), component.getMetaData()
+ .getName(), component.getMetaData().getVersion()
+ .toString(), component.getMetaData(), true, "history",
+ "delete"));
List<TreeNode> children = new ArrayList<TreeNode>();
TreeNode node;
node = initNode();
- node.setColumns(generateStringArray("Constants",
- generateHeader("Name"), generateHeader("Type")));
+ node.setColumns(generateStringArray(_("simexplorer.ui.web.constant"),
+ generateHeader(_("simexplorer.ui.web.name")),
+ generateHeader(_("simexplorer.ui.web.type"))));
node.setChildren(generateConstants(component.getConstants()));
children.add(node);
node = initNode();
- node.setColumns(generateStringArray("Structures", "", ""));
+ node.setColumns(generateStringArray(_("simexplorer.ui.web.structures"),
+ "", ""));
node.setChildren(generateStructures(component.getStructures()));
children.add(node);
node = initNode();
- node.setColumns(generateStringArray("Codes",
- generateHeader("Language"), generateHeader("Code")));
+ node.setColumns(generateStringArray(_("simexplorer.ui.web.codes"),
+ generateHeader(_("simexplorer.ui.web.language")),
+ generateHeader(_("simexplorer.ui.web.code"))));
node.setChildren(generateCodes(component.getCodes()));
children.add(node);
node = initNode();
- node.setColumns(generateStringArray("Libraries", "", ""));
+ node.setColumns(generateStringArray(_("simexplorer.ui.web.libraries"),
+ "", ""));
node.setChildren(generateLibraries(component));
children.add(node);
@@ -350,9 +361,9 @@
private TreeNode generateLibrary(Library library) {
TreeNode node = new TreeNode();
node.setType(TreeNode.TYPE_DOCUMENT);
- node.setColumns(generateStringArray("Library", library
- .getMetaData().getName(), library.getMetaData()
- .getVersion().toString(), library.getMetaData(), true,
+ node.setColumns(generateStringArray(_("simexplorer.ui.web.library"),
+ library.getMetaData().getName(), library.getMetaData()
+ .getVersion().toString(), library.getMetaData(), true,
"export"));
return node;
}
@@ -370,8 +381,8 @@
for (Code code : codes) {
TreeNode node = new TreeNode();
node.setType(TreeNode.TYPE_DOCUMENT);
- node.setColumns(generateStringArray("Code", code.getLanguage(),
- code.getCode()));
+ node.setColumns(generateStringArray(_("simexplorer.ui.web.code"),
+ code.getLanguage(), code.getCode()));
res.add(node);
}
return res;
@@ -391,7 +402,8 @@
for (Structure structure : structures) {
TreeNode node = new TreeNode();
node.setType(TreeNode.TYPE_DOCUMENT);
- node.setColumns(generateStringArray("Structure", "", ""));
+ node.setColumns(generateStringArray(
+ _("simexplorer.ui.web.structure"), "", ""));
res.add(node);
}
return res;
@@ -410,7 +422,8 @@
for (Constant constant : constants) {
TreeNode node = new TreeNode();
node.setType(TreeNode.TYPE_DOCUMENT);
- node.setColumns(generateStringArray("Constant", constant.getName(),
+ node.setColumns(generateStringArray(
+ _("simexplorer.ui.web.constant"), constant.getName(),
constant.getType().getSimpleName()));
res.add(node);
}
Modified: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementExport.java
===================================================================
--- trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementExport.java 2008-02-04 18:24:48 UTC (rev 647)
+++ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementExport.java 2008-02-04 18:30:35 UTC (rev 648)
@@ -17,6 +17,8 @@
* ##% */
package fr.cemagref.simexplorer.is.ui.web.pages;
+import static org.codelutin.i18n.I18n._;
+
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
@@ -52,7 +54,7 @@
*/
@Override
public String getWindowTitle() {
- return "";
+ return _("simexplorer.ui.web.title.elementexport");
}
/**
@@ -140,9 +142,9 @@
*/
public List<String> getHeaders() {
List<String> result = new ArrayList<String>();
- result.add("Type");
- result.add("Name");
- result.add("Hash");
+ result.add(_("simexplorer.ui.web.type"));
+ result.add(_("simexplorer.ui.web.name"));
+ result.add(_("simexplorer.ui.web.hash"));
result.add("");
return result;
}
@@ -372,10 +374,10 @@
+ explorationData.getMetaData().getVersion() + ","
+ attachment.getUniqueId();
- node
- .setColumns(generateStringArray(attachment.getContentType().getDescription(),
- Integer.toHexString(attachment.getDataHash()), generateString(attachment.getFileName(),
- "downloadFile", context)));
+ node.setColumns(generateStringArray(attachment.getContentType()
+ .getDescription(), Integer
+ .toHexString(attachment.getDataHash()), generateString(
+ attachment.getFileName(), "downloadFile", context)));
return node;
}
Modified: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementHistory.java
===================================================================
--- trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementHistory.java 2008-02-04 18:24:48 UTC (rev 647)
+++ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementHistory.java 2008-02-04 18:30:35 UTC (rev 648)
@@ -17,6 +17,8 @@
* ##% */
package fr.cemagref.simexplorer.is.ui.web.pages;
+import static org.codelutin.i18n.I18n._;
+
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
@@ -72,7 +74,7 @@
*/
@Override
public String getWindowTitle() {
- return "";
+ return _("simexplorer.ui.web.title.elementhistory");
}
/**
@@ -82,9 +84,9 @@
*/
public List<String> getHeaders() {
List<String> result = new ArrayList<String>();
- result.add("Version");
- result.add("Description");
- result.add("Date");
+ result.add(_("simexplorer.ui.web.version"));
+ result.add(_("simexplorer.ui.web.description"));
+ result.add(_("simexplorer.ui.web.date"));
return result;
}
@@ -108,7 +110,8 @@
Arrays.sort(versions, new MetadataVersionComparator());
TreeNode rootNode = new TreeNode();
rootNode.setType(TreeNode.TYPE_FOLDER);
- rootNode.setColumns(generateStringArray("History"));
+ rootNode
+ .setColumns(generateStringArray(_("simexplorer.ui.web.history")));
rootNode.setObject(new Version(""));
rootNode.setChildren(new ArrayList<TreeNode>());
for (MetaData mde : versions) {
Modified: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementImport.java
===================================================================
--- trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementImport.java 2008-02-04 18:24:48 UTC (rev 647)
+++ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementImport.java 2008-02-04 18:30:35 UTC (rev 648)
@@ -17,6 +17,8 @@
* ##% */
package fr.cemagref.simexplorer.is.ui.web.pages;
+import static org.codelutin.i18n.I18n._;
+
import org.apache.tapestry.upload.services.UploadedFile;
import com.healthmarketscience.rmiio.RemoteInputStreamServer;
@@ -71,7 +73,7 @@
*/
@Override
public String getWindowTitle() {
- return "";
+ return _("simexplorer.ui.web.title.elementimport");
}
}
Modified: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementList.java
===================================================================
--- trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementList.java 2008-02-04 18:24:48 UTC (rev 647)
+++ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementList.java 2008-02-04 18:30:35 UTC (rev 648)
@@ -17,6 +17,8 @@
* ##% */
package fr.cemagref.simexplorer.is.ui.web.pages;
+import static org.codelutin.i18n.I18n._;
+
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
@@ -156,10 +158,13 @@
String windowTitle = null;
if (elementDataSource.getQuery() != null
&& !elementDataSource.getQuery().equals("")) {
- windowTitle = String.format("Search results for \"%s\"",
+ windowTitle = String.format(
+ _("simexplorer.ui.web.title.searchresults"),// "Search
+ // results for
+ // \"%s\"",
elementDataSource.getQuery());
} else {
- windowTitle = "Application list";
+ windowTitle = _("simexplorer.ui.web.title.applicationlist");
}
return windowTitle;
}
Modified: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementPageDetail.java
===================================================================
--- trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementPageDetail.java 2008-02-04 18:24:48 UTC (rev 647)
+++ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementPageDetail.java 2008-02-04 18:30:35 UTC (rev 648)
@@ -17,6 +17,8 @@
* ##% */
package fr.cemagref.simexplorer.is.ui.web.pages;
+import static org.codelutin.i18n.I18n._;
+
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
@@ -198,11 +200,13 @@
String res;
for (String anAction : actions) {
sb.append("<br>");
- sb.append(generateString(anAction, anAction, element));
+ sb.append(generateString(_("simexplorer.ui.web." + anAction
+ + ".action"), anAction, element));
}
if (security) {
sb.append("<br>");
- sb.append(generateString("rights", "rights", element));
+ sb.append(generateString(_("simexplorer.ui.web.rights.action"),
+ "rights", element));
}
res = sb.substring(4);
Modified: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementRights.java
===================================================================
--- trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementRights.java 2008-02-04 18:24:48 UTC (rev 647)
+++ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ElementRights.java 2008-02-04 18:30:35 UTC (rev 648)
@@ -17,6 +17,8 @@
* ##% */
package fr.cemagref.simexplorer.is.ui.web.pages;
+import static org.codelutin.i18n.I18n._;
+
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
@@ -90,7 +92,7 @@
*/
@Override
public String getWindowTitle() {
- return "";
+ return _("simexplorer.ui.web.title.elementrights");
}
/* (non-Javadoc)
Modified: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ExceptionReport.java
===================================================================
--- trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ExceptionReport.java 2008-02-04 18:24:48 UTC (rev 647)
+++ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/ExceptionReport.java 2008-02-04 18:30:35 UTC (rev 648)
@@ -17,6 +17,8 @@
* ##% */
package fr.cemagref.simexplorer.is.ui.web.pages;
+import static org.codelutin.i18n.I18n._;
+
import java.util.List;
import org.apache.tapestry.ioc.annotations.Inject;
@@ -68,7 +70,7 @@
* @return the window title
*/
public String getWindowTitle() {
- return "Error";
+ return _("simexplorer.ui.web.title.pageerror");
}
/* (non-Javadoc)
Modified: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/GroupEdit.java
===================================================================
--- trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/GroupEdit.java 2008-02-04 18:24:48 UTC (rev 647)
+++ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/GroupEdit.java 2008-02-04 18:30:35 UTC (rev 648)
@@ -17,6 +17,8 @@
* ##% */
package fr.cemagref.simexplorer.is.ui.web.pages;
+import static org.codelutin.i18n.I18n._;
+
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -68,7 +70,7 @@
*/
@Override
public String getWindowTitle() {
- return "";
+ return _("simexplorer.ui.web.title.groupedit");
}
/**
Modified: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/GroupList.java
===================================================================
--- trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/GroupList.java 2008-02-04 18:24:48 UTC (rev 647)
+++ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/GroupList.java 2008-02-04 18:30:35 UTC (rev 648)
@@ -17,6 +17,8 @@
* ##% */
package fr.cemagref.simexplorer.is.ui.web.pages;
+import static org.codelutin.i18n.I18n._;
+
import java.util.ArrayList;
import java.util.List;
@@ -65,7 +67,7 @@
*/
@Override
public String getWindowTitle() {
- return "";
+ return _("simexplorer.ui.web.title.grouplist");
}
/**
Modified: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/Install.java
===================================================================
--- trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/Install.java 2008-02-04 18:24:48 UTC (rev 647)
+++ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/Install.java 2008-02-04 18:30:35 UTC (rev 648)
@@ -17,6 +17,8 @@
* ##% */
package fr.cemagref.simexplorer.is.ui.web.pages;
+import static org.codelutin.i18n.I18n._;
+
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
@@ -57,7 +59,7 @@
*/
@Override
public String getWindowTitle() {
- return "";
+ return _("simexplorer.ui.web.title.install");
}
/**
Modified: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/Login.java
===================================================================
--- trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/Login.java 2008-02-04 18:24:48 UTC (rev 647)
+++ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/Login.java 2008-02-04 18:30:35 UTC (rev 648)
@@ -17,6 +17,8 @@
* ##% */
package fr.cemagref.simexplorer.is.ui.web.pages;
+import static org.codelutin.i18n.I18n._;
+
import org.apache.tapestry.annotations.ApplicationState;
import org.apache.tapestry.annotations.InjectPage;
import org.apache.tapestry.annotations.Persist;
@@ -118,7 +120,7 @@
* @return the window title
*/
public String getWindowTitle() {
- return "Login";
+ return _("simexplorer.ui.web.title.login");
}
}
Modified: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/UserEdit.java
===================================================================
--- trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/UserEdit.java 2008-02-04 18:24:48 UTC (rev 647)
+++ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/UserEdit.java 2008-02-04 18:30:35 UTC (rev 648)
@@ -17,6 +17,8 @@
* ##% */
package fr.cemagref.simexplorer.is.ui.web.pages;
+import static org.codelutin.i18n.I18n._;
+
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -83,7 +85,7 @@
*/
@Override
public String getWindowTitle() {
- return "";
+ return _("simexplorer.ui.web.title.useredit");
}
/**
Modified: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/UserList.java
===================================================================
--- trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/UserList.java 2008-02-04 18:24:48 UTC (rev 647)
+++ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/UserList.java 2008-02-04 18:30:35 UTC (rev 648)
@@ -17,6 +17,8 @@
* ##% */
package fr.cemagref.simexplorer.is.ui.web.pages;
+import static org.codelutin.i18n.I18n._;
+
import java.util.ArrayList;
import java.util.List;
@@ -66,7 +68,7 @@
*/
@Override
public String getWindowTitle() {
- return "";
+ return _("simexplorer.ui.web.title.userlist");
}
/**
Modified: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/security/ProtectedPage.java
===================================================================
--- trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/security/ProtectedPage.java 2008-02-04 18:24:48 UTC (rev 647)
+++ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/pages/security/ProtectedPage.java 2008-02-04 18:30:35 UTC (rev 648)
@@ -17,6 +17,8 @@
* ##% */
package fr.cemagref.simexplorer.is.ui.web.pages.security;
+import static org.codelutin.i18n.I18n._;
+
import org.apache.tapestry.annotations.ApplicationState;
import org.apache.tapestry.annotations.Persist;
@@ -60,7 +62,8 @@
if (!userLogged)
return "Login";
if (!hasAccessToPage())
- throw new SimExplorerWebException("simexplorer.security.norights");
+ throw new SimExplorerWebException(
+ _("simexplorer.service.security.norights"));
return null;
}
Modified: trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/services/AppModule.java
===================================================================
--- trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/services/AppModule.java 2008-02-04 18:24:48 UTC (rev 647)
+++ trunk/simexplorer-is-web/src/java/fr/cemagref/simexplorer/is/ui/web/services/AppModule.java 2008-02-04 18:30:35 UTC (rev 648)
@@ -61,8 +61,8 @@
*/
public static void contributeApplicationDefaults(
MappedConfiguration<String, String> configuration) {
- configuration.add("tapestry.supported-locales", "en");
- configuration.add("tapestry.supported-locales", "fr");
+ configuration.add("tapestry.supported-locales", "en_GB");
+ configuration.add("tapestry.supported-locales", "fr_FR");
}
/**
@@ -149,6 +149,6 @@
// contributed filter
// within the pipeline.
- configuration.add("Timing", filter);
+ //configuration.add("Timing", filter);
}
}
Added: trunk/simexplorer-is-web/src/resources/i18n/simexplorer-is-web-en_GB.properties
===================================================================
--- trunk/simexplorer-is-web/src/resources/i18n/simexplorer-is-web-en_GB.properties (rev 0)
+++ trunk/simexplorer-is-web/src/resources/i18n/simexplorer-is-web-en_GB.properties 2008-02-04 18:30:35 UTC (rev 648)
@@ -0,0 +1,43 @@
+#Mon Feb 04 19:19:33 CET 2008
+simexplorer.service.security.norights=simexplorer.service.security.norights
+simexplorer.ui.web.=
+simexplorer.ui.web.actions=simexplorer.ui.web.actions
+simexplorer.ui.web.applicationexploration=simexplorer.ui.web.applicationexploration
+simexplorer.ui.web.code=simexplorer.ui.web.code
+simexplorer.ui.web.codes=simexplorer.ui.web.codes
+simexplorer.ui.web.component=simexplorer.ui.web.component
+simexplorer.ui.web.components=simexplorer.ui.web.components
+simexplorer.ui.web.constant=simexplorer.ui.web.constant
+simexplorer.ui.web.date=simexplorer.ui.web.date
+simexplorer.ui.web.description=simexplorer.ui.web.description
+simexplorer.ui.web.explorationdata=simexplorer.ui.web.explorationdata
+simexplorer.ui.web.explorations=simexplorer.ui.web.explorations
+simexplorer.ui.web.hash=simexplorer.ui.web.hash
+simexplorer.ui.web.history=simexplorer.ui.web.history
+simexplorer.ui.web.language=simexplorer.ui.web.language
+simexplorer.ui.web.libraries=simexplorer.ui.web.libraries
+simexplorer.ui.web.library=simexplorer.ui.web.library
+simexplorer.ui.web.name=simexplorer.ui.web.name
+simexplorer.ui.web.result=simexplorer.ui.web.result
+simexplorer.ui.web.rights.action=simexplorer.ui.web.rights.action
+simexplorer.ui.web.structure=simexplorer.ui.web.structure
+simexplorer.ui.web.structures=simexplorer.ui.web.structures
+simexplorer.ui.web.title.applicationlist=simexplorer.ui.web.title.applicationlist
+simexplorer.ui.web.title.deleteelement=simexplorer.ui.web.title.deleteelement
+simexplorer.ui.web.title.elementdetail=simexplorer.ui.web.title.elementdetail
+simexplorer.ui.web.title.elementexport=simexplorer.ui.web.title.elementexport
+simexplorer.ui.web.title.elementhistory=simexplorer.ui.web.title.elementhistory
+simexplorer.ui.web.title.elementimport=simexplorer.ui.web.title.elementimport
+simexplorer.ui.web.title.elementrights=simexplorer.ui.web.title.elementrights
+simexplorer.ui.web.title.groupedit=simexplorer.ui.web.title.groupedit
+simexplorer.ui.web.title.grouplist=simexplorer.ui.web.title.grouplist
+simexplorer.ui.web.title.install=simexplorer.ui.web.title.install
+simexplorer.ui.web.title.login=simexplorer.ui.web.title.login
+simexplorer.ui.web.title.pageerror=simexplorer.ui.web.title.pageerror
+simexplorer.ui.web.title.searchresults=simexplorer.ui.web.title.searchresults
+simexplorer.ui.web.title.useredit=simexplorer.ui.web.title.useredit
+simexplorer.ui.web.title.userlist=simexplorer.ui.web.title.userlist
+simexplorer.ui.web.type=simexplorer.ui.web.type
+simexplorer.ui.web.value=simexplorer.ui.web.value
+simexplorer.ui.web.values=simexplorer.ui.web.values
+simexplorer.ui.web.version=simexplorer.ui.web.version
Added: trunk/simexplorer-is-web/src/resources/i18n/simexplorer-is-web-fr_FR.properties
===================================================================
--- trunk/simexplorer-is-web/src/resources/i18n/simexplorer-is-web-fr_FR.properties (rev 0)
+++ trunk/simexplorer-is-web/src/resources/i18n/simexplorer-is-web-fr_FR.properties 2008-02-04 18:30:35 UTC (rev 648)
@@ -0,0 +1,43 @@
+#Mon Feb 04 19:19:33 CET 2008
+simexplorer.service.security.norights=
+simexplorer.ui.web.=
+simexplorer.ui.web.actions=
+simexplorer.ui.web.applicationexploration=
+simexplorer.ui.web.code=
+simexplorer.ui.web.codes=
+simexplorer.ui.web.component=
+simexplorer.ui.web.components=
+simexplorer.ui.web.constant=
+simexplorer.ui.web.date=
+simexplorer.ui.web.description=
+simexplorer.ui.web.explorationdata=
+simexplorer.ui.web.explorations=
+simexplorer.ui.web.hash=
+simexplorer.ui.web.history=
+simexplorer.ui.web.language=
+simexplorer.ui.web.libraries=
+simexplorer.ui.web.library=
+simexplorer.ui.web.name=
+simexplorer.ui.web.result=
+simexplorer.ui.web.rights.action=
+simexplorer.ui.web.structure=
+simexplorer.ui.web.structures=
+simexplorer.ui.web.title.applicationlist=
+simexplorer.ui.web.title.deleteelement=
+simexplorer.ui.web.title.elementdetail=
+simexplorer.ui.web.title.elementexport=
+simexplorer.ui.web.title.elementhistory=
+simexplorer.ui.web.title.elementimport=
+simexplorer.ui.web.title.elementrights=
+simexplorer.ui.web.title.groupedit=
+simexplorer.ui.web.title.grouplist=
+simexplorer.ui.web.title.install=
+simexplorer.ui.web.title.login=
+simexplorer.ui.web.title.pageerror=
+simexplorer.ui.web.title.searchresults=
+simexplorer.ui.web.title.useredit=
+simexplorer.ui.web.title.userlist=
+simexplorer.ui.web.type=
+simexplorer.ui.web.value=
+simexplorer.ui.web.values=
+simexplorer.ui.web.version=
1
0
04 Feb '08
Author: tchemit
Date: 2008-02-04 18:24:48 +0000 (Mon, 04 Feb 2008)
New Revision: 647
Modified:
trunk/simexplorer-is-entities/pom.xml
Log:
mise en place i18n dans le module entities
Modified: trunk/simexplorer-is-entities/pom.xml
===================================================================
--- trunk/simexplorer-is-entities/pom.xml 2008-02-04 18:23:10 UTC (rev 646)
+++ trunk/simexplorer-is-entities/pom.xml 2008-02-04 18:24:48 UTC (rev 647)
@@ -19,12 +19,37 @@
<version>0.0.1-SNAPSHOT</version>
</parent>
- <dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>lutinplugin</groupId>
+ <artifactId>maven-i18n-plugin</artifactId>
+ <version>0.2-SNAPSHOT</version>
+ <configuration>
+ <bundles>
+ <param>fr_FR</param>
+ <param>en_GB</param>
+ </bundles>
+ <keysModifier>false</keysModifier>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>compile</phase>
+ <goals>
+ <goal>parserJava</goal>
+ <goal>gen</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.3</version>
</dependency>
</dependencies>
-
</project>
\ No newline at end of file
1
0
r646 - trunk/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities
by tchemit@users.labs.libre-entreprise.org 04 Feb '08
by tchemit@users.labs.libre-entreprise.org 04 Feb '08
04 Feb '08
Author: tchemit
Date: 2008-02-04 18:23:10 +0000 (Mon, 04 Feb 2008)
New Revision: 646
Modified:
trunk/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/BaseEntity.java
Log:
serialVersionUID
Modified: trunk/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/BaseEntity.java
===================================================================
--- trunk/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/BaseEntity.java 2008-02-04 17:34:46 UTC (rev 645)
+++ trunk/simexplorer-is-entities/src/java/fr/cemagref/simexplorer/is/entities/BaseEntity.java 2008-02-04 18:23:10 UTC (rev 646)
@@ -26,4 +26,5 @@
// empty class
+ private static final long serialVersionUID = -1180452401816397351L;
}
1
0