Isis-fish-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
December 2008
- 3 participants
- 82 discussions
r1662 - in isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui: . simulator
by chatellier@users.labs.libre-entreprise.org 12 Dec '08
by chatellier@users.labs.libre-entreprise.org 12 Dec '08
12 Dec '08
Author: chatellier
Date: 2008-12-12 15:27:58 +0000 (Fri, 12 Dec 2008)
New Revision: 1662
Modified:
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/Common.java
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/SimulAction.java
Log:
Fix la creation d'un repertoire vide ne contenant aucune simulation
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/Common.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/Common.java 2008-12-12 14:19:06 UTC (rev 1661)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/Common.java 2008-12-12 15:27:58 UTC (rev 1662)
@@ -70,11 +70,7 @@
try {
List<String> oldSimul = new ArrayList<String>();
-
- // FIXME chatellier : Ajout d'une entrée vide pour forcer la sélection
- // et que le changement lance un evenement sur la liste
- oldSimul.add(" ");
-
+
FilterModel<SimulationProperties, String> filterModel;
// keep in context list of old simulation names (for filter process)
oldSimul.addAll(SimulationStorage.getSimulationNames());
@@ -84,6 +80,11 @@
// we must fill filterModel result with original items
filterModel.selectAll();
Object[] result = oldSimul.toArray();
+
+ // FIXME chatellier : Ajout d'une entrée vide pour forcer la sélection
+ // et que le changement lance un evenement sur la liste
+ oldSimul.add(0," ");
+
return result;
} catch (ParseException ex) {
Logger.getLogger(Common.class.getName()).log(Level.SEVERE, null, ex);
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/SimulAction.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/SimulAction.java 2008-12-12 14:19:06 UTC (rev 1661)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/SimulAction.java 2008-12-12 15:27:58 UTC (rev 1662)
@@ -60,6 +60,7 @@
import fr.ifremer.isisfish.simulator.launcher.SimulationJob;
import fr.ifremer.isisfish.simulator.launcher.SimulationService;
import fr.ifremer.isisfish.simulator.launcher.SimulatorLauncher;
+import fr.ifremer.isisfish.ui.Common;
import fr.ifremer.isisfish.ui.simulator.filter.SimulationFilterUtil;
import fr.ifremer.isisfish.ui.widget.filter.FilterModel;
import java.io.BufferedReader;
@@ -211,7 +212,7 @@
SimulationLoggerUtil.showSimulationLogConsole(id);
} catch (Exception eee) {
UserLog.error(_("Can't open log for %s", id), eee);
- return ("Error.xml" + "error" + eee.getMessage());
+ return (_("isisfish.simulator.simulaction.viewlogerror",eee.getMessage()));
}
return null;
}
@@ -235,7 +236,7 @@
}
}
catch (Exception eee){
- return ("Error.xml" + "error" + eee.getMessage());
+ return (_("isisfish.simulator.simulaction.regionChange",eee.getMessage()));
}
return null;
}
@@ -257,7 +258,7 @@
regionStorage = param.getRegion();
} catch (Exception eee) {
log.error("Can't load old Simulation: " + simulName, eee);
- return ("Error.xml" + "error" + eee.getMessage());
+ return (_("isisfish.simulator.simulaction.loadOldSimulation",eee.getMessage()));
}
return null;
}
@@ -401,22 +402,19 @@
return SimulatorStorage.getSimulatorNames();
}
-
/*
* Return old simulations
*
* @param
* @return old simulations
+ *
+ * @deprecated use fr.ifremer.isisfish.ui.Common.getOldSimulationItem()
*/
public List<String> getOldSimulationItem() {
try {
oldSimulNames = new ArrayList<String>();
-
- // FIXME chatellier : Ajout d'une entrée vide pour forcer la sélection
- // et que le changement lance un evenement sur la liste
- oldSimulNames.add(" ");
-
+
FilterModel<SimulationProperties, String> filterModel;
// keep in context list of old simulation names (for filter process)
oldSimulNames.addAll(SimulationStorage.getSimulationNames());
@@ -425,6 +423,13 @@
// to used directly model.getFilteredResult() in xml
// we must fill filterModel result with original items
filterModel.selectAll();
+
+ // chatellier : Ajout d'une entrée vide pour forcer la sélection
+ // et que le changement lance un evenement sur la liste
+ // Add empty item after, otherwise, un " " directory
+ // will be created
+ oldSimulNames.add(0, " ");
+
return oldSimulNames;
} catch (ParseException ex) {
Logger.getLogger(SimulAction.class.getName()).log(Level.SEVERE, null, ex);
1
0
r1661 - in isis-fish/trunk/src/main: java/fr/ifremer/isisfish/ui java/fr/ifremer/isisfish/ui/simulator resources/i18n
by chatellier@users.labs.libre-entreprise.org 12 Dec '08
by chatellier@users.labs.libre-entreprise.org 12 Dec '08
12 Dec '08
Author: chatellier
Date: 2008-12-12 14:19:06 +0000 (Fri, 12 Dec 2008)
New Revision: 1661
Modified:
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/Common.java
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/ParamsUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/SimulAction.java
isis-fish/trunk/src/main/resources/i18n/isis-fish-en_GB.properties
isis-fish/trunk/src/main/resources/i18n/isis-fish-fr_FR.properties
Log:
Correction de la selection des premier item vides des listes
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/Common.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/Common.java 2008-12-11 17:26:48 UTC (rev 1660)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/Common.java 2008-12-12 14:19:06 UTC (rev 1661)
@@ -44,31 +44,37 @@
public class Common {
- /*
+ /**
* Return regions
*
- * @param
* @return regions
*/
static public Object[] getRegionItem() {
List<String> regionNames = new ArrayList<String>();
+
+ // FIXME chatellier : Ajout d'une entrée vide pour forcer la sélection
+ // et que le changement lance un evenement sur la liste
regionNames.add(" ");
+
regionNames.addAll(RegionStorage.getRegionNames());
Object[] result = regionNames.toArray();
return result;
}
- /*
+ /**
* Return old simulations
*
- * @param
* @return old simulations
*/
static public Object[] getOldSimulationItem() {
-
+
try {
List<String> oldSimul = new ArrayList<String>();
+
+ // FIXME chatellier : Ajout d'une entrée vide pour forcer la sélection
+ // et que le changement lance un evenement sur la liste
oldSimul.add(" ");
+
FilterModel<SimulationProperties, String> filterModel;
// keep in context list of old simulation names (for filter process)
oldSimul.addAll(SimulationStorage.getSimulationNames());
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/ParamsUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/ParamsUI.jaxx 2008-12-11 17:26:48 UTC (rev 1660)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/ParamsUI.jaxx 2008-12-12 14:19:06 UTC (rev 1661)
@@ -84,25 +84,29 @@
// fieldSimulParamsName.setText(name);
// }
protected void regionChange(){
- WelcomePanelUI root = getParentContainer(WelcomePanelUI.class);
- root.setInfoText(_("isisfish.message.loading.region"));
- showMsgBox(getContextValue(SimulAction.class).regionChange(fieldSimulParamsRegion.getSelectedItem().toString()));
- refresh();
- root.setInfoText(_("isisfish.message.region.loaded"));
+ // le premier item est " " pour ne pas avoir de selection par defaut
+ String selected = fieldSimulParamsRegion.getSelectedItem().toString();
+ if(selected != null && !selected.trim().isEmpty()) {
+ WelcomePanelUI root = getParentContainer(WelcomePanelUI.class);
+ root.setInfoText(_("isisfish.message.loading.region"));
+ showMsgBox(getContextValue(SimulAction.class).regionChange(fieldSimulParamsRegion.getSelectedItem().toString()));
+ refresh();
+ root.setInfoText(_("isisfish.message.region.loaded"));
+ }
}
public void setSimulationParameter(SimulAction simulAction){
getContextValue(SimulAction.class).setSimulationParameter(simulAction.getSimulationParameter());
}
protected void loadOldSimulation(){
-
- WelcomePanelUI root = getParentContainer(WelcomePanelUI.class);
- root.setInfoText(_("isisfish.message.loading.old.simulation"));
String selected = fieldSimulParamsSelect.getSelectedItem().toString();
- if (selected.equals(" ")){
+ // le premier item est " " pour ne pas avoir de selection par defaut
+ if (selected != null && !selected.equals(" ")){
+ WelcomePanelUI root = getParentContainer(WelcomePanelUI.class);
+ root.setInfoText(_("isisfish.message.loading.old.simulation"));
showMsgBox(getContextValue(SimulAction.class).loadOldSimulation(selected));
refresh();
+ root.setInfoText(_("isisfish.message.old.simulation.loaded"));
}
- root.setInfoText(_("isisfish.message.old.simulation.loaded"));
}
protected void addRules(){
getContextValue(SimulAction.class).addRules(fieldSimulParamsMesuresSelect.getSelectedItem().toString());
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/SimulAction.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/SimulAction.java 2008-12-11 17:26:48 UTC (rev 1660)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/SimulAction.java 2008-12-12 14:19:06 UTC (rev 1661)
@@ -126,7 +126,7 @@
}
catch (Exception eee) {
log.error("Can't init SimulationParameter", eee);
- return ("Error.xml" + "error" + eee.getMessage());
+ return (_("isisfish.simulator.simulaction.init",eee.getMessage()));
}
return null;
}
@@ -412,7 +412,11 @@
try {
oldSimulNames = new ArrayList<String>();
+
+ // FIXME chatellier : Ajout d'une entrée vide pour forcer la sélection
+ // et que le changement lance un evenement sur la liste
oldSimulNames.add(" ");
+
FilterModel<SimulationProperties, String> filterModel;
// keep in context list of old simulation names (for filter process)
oldSimulNames.addAll(SimulationStorage.getSimulationNames());
Modified: isis-fish/trunk/src/main/resources/i18n/isis-fish-en_GB.properties
===================================================================
--- isis-fish/trunk/src/main/resources/i18n/isis-fish-en_GB.properties 2008-12-11 17:26:48 UTC (rev 1660)
+++ isis-fish/trunk/src/main/resources/i18n/isis-fish-en_GB.properties 2008-12-12 14:19:06 UTC (rev 1661)
@@ -850,6 +850,7 @@
isisfish.simulator.launcher.inprocess=in current process
isisfish.simulator.launcher.remote=on remote server
isisfish.simulator.launcher.subprocess=in subprocess
+isisfish.simulator.simulaction.init=Error during simulation init \: %s
isisfish.simulator.subprocess.readoutput.error=
isisfish.species.age=age
isisfish.species.cee=CEE
Modified: isis-fish/trunk/src/main/resources/i18n/isis-fish-fr_FR.properties
===================================================================
--- isis-fish/trunk/src/main/resources/i18n/isis-fish-fr_FR.properties 2008-12-11 17:26:48 UTC (rev 1660)
+++ isis-fish/trunk/src/main/resources/i18n/isis-fish-fr_FR.properties 2008-12-12 14:19:06 UTC (rev 1661)
@@ -298,7 +298,7 @@
isisfish.error.prepare.data=Can't prepare data
isisfish.error.prepare.information.simulation=Can't prepare information for simulation
isisfish.error.read.simulation=Can't read simulation information %1$s
-isisfish.error.read.simulation.parameters=Can't read simulation parameters from file %1$s
+isisfish.error.read.simulation.parameters=Impossible de lire les param\u00EAtres du fichier \: %1$s
isisfish.error.region.already.exists=Cette r\u00E9gion existe d\u00E9j\u00E0
isisfish.error.region.name.empty=Le nom de la R\u00E9gion est vide
isisfish.error.remove.directory=Can't remove directory %1$s
@@ -850,6 +850,7 @@
isisfish.simulator.launcher.inprocess=dans le m\u00EAme processus
isisfish.simulator.launcher.remote=sur un serveur distant
isisfish.simulator.launcher.subprocess=dans un sous processus
+isisfish.simulator.simulaction.init=Erreur d'initialisation de la simulation \: %s
isisfish.simulator.subprocess.readoutput.error=
isisfish.species.age=age
isisfish.species.cee=CEE
1
0
r1660 - in isis-fish/trunk: . src/main/java/fr/ifremer/isisfish src/main/java/fr/ifremer/isisfish/ui/result src/main/java/fr/ifremer/isisfish/vcs src/main/resources/i18n
by chatellier@users.labs.libre-entreprise.org 11 Dec '08
by chatellier@users.labs.libre-entreprise.org 11 Dec '08
11 Dec '08
Author: chatellier
Date: 2008-12-11 17:26:48 +0000 (Thu, 11 Dec 2008)
New Revision: 1660
Modified:
isis-fish/trunk/pom.xml
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/IsisConfig.java
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/IsisFish.java
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/result/ResultEdit.java
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/vcs/AbstractVCS.java
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/vcs/VCS.java
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/vcs/VCSActionEvent.java
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/vcs/VCSNone.java
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/vcs/VCSSVN.java
isis-fish/trunk/src/main/resources/i18n/isis-fish-en_GB.properties
isis-fish/trunk/src/main/resources/i18n/isis-fish-fr_FR.properties
Log:
Correct checkProtocol code (VCS)
Modified: isis-fish/trunk/pom.xml
===================================================================
--- isis-fish/trunk/pom.xml 2008-12-11 15:35:31 UTC (rev 1659)
+++ isis-fish/trunk/pom.xml 2008-12-11 17:26:48 UTC (rev 1660)
@@ -26,7 +26,7 @@
<dependency>
<groupId>org.codelutin</groupId>
<artifactId>lutinutil</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>1.0</version>
<scope>compile</scope>
</dependency>
@@ -40,7 +40,7 @@
<dependency>
<groupId>org.codelutin</groupId>
<artifactId>topia-service</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.0</version>
<scope>compile</scope>
</dependency>
@@ -306,16 +306,16 @@
<!--labs.project>isis-fish</labs.project-->
<!-- jaxx version -->
- <jaxx.version>0.7-SNAPSHOT</jaxx.version>
+ <jaxx.version>0.7</jaxx.version>
<!-- generator version -->
- <generator.version>0.62-SNAPSHOT</generator.version>
+ <generator.version>0.62</generator.version>
<!-- topia version -->
- <topia.version>2.1.0-SNAPSHOT</topia.version>
+ <topia.version>2.1.0</topia.version>
<!-- lutinwidget version -->
- <lutinwidget.version>0.11-SNAPSHOT</lutinwidget.version>
+ <lutinwidget.version>0.11</lutinwidget.version>
<!--Main class in JAR -->
<maven.jar.main.class>fr.ifremer.isisfish.IsisFish</maven.jar.main.class>
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/IsisConfig.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/IsisConfig.java 2008-12-11 15:35:31 UTC (rev 1659)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/IsisConfig.java 2008-12-11 17:26:48 UTC (rev 1660)
@@ -614,7 +614,7 @@
/** prevu pour l'architecture de lancement en plugin: local, isis-server, caparmor, ... */
SIMULATOR_LAUNCHER(SimulationService.SIMULATION_LAUNCHER + ".localDefault", _("isisfish.config.main.localSimulator.description"), InProcessSimulatorLauncher.class.getName()),
SIMULATOR_LAUNCHER_SUB(SimulationService.SIMULATION_LAUNCHER + ".subDefault", _("isisfish.config.main.subSimulator.description"), SubProcessSimulationLauncher.class.getName()),
- SIMULATOR_LAUNCHER_REMOTE(SimulationService.SIMULATION_LAUNCHER + ".remoteDefault", _("isisfish.config.main.remoteSimulator.description"), SshSimulatorLauncher.class.getName()),
+ // SIMULATOR_LAUNCHER_REMOTE(SimulationService.SIMULATION_LAUNCHER + ".remoteDefault", _("isisfish.config.main.remoteSimulator.description"), SshSimulatorLauncher.class.getName()),
SIMULATOR_SERVER("simulation.server", _("isisfish.config.main.simulationServer.description"), "http://simulateur.ifremer.fr:9090"),
/** le login a utiliser pour les launcher distant, le type du launcher est ajouter a la cle (car 1 login par launcher) */
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/IsisFish.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/IsisFish.java 2008-12-11 15:35:31 UTC (rev 1659)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/IsisFish.java 2008-12-11 17:26:48 UTC (rev 1660)
@@ -56,7 +56,6 @@
import fr.ifremer.isisfish.vcs.VetoableActionListener;
import java.io.File;
import java.text.SimpleDateFormat;
-import java.util.Arrays;
import org.apache.commons.beanutils.ConvertUtils;
import org.apache.commons.logging.LogFactory;
import static org.codelutin.i18n.I18n._;
@@ -76,12 +75,11 @@
import fr.ifremer.isisfish.ui.WelcomeUI;
/**
- * This is the main class of <code>IsisFish<code> application.
+ * This is the main class of <code>IsisFish</code> application.
*
* @author poussin
* @author chemit
*/
-
public class IsisFish { // IsisFish
/** to use log facility, just put in your code: log.info(\"...\"); */
@@ -155,9 +153,10 @@
}
/**
- * All main in other class must call this method, parse arguement,
+ * All main in other class must call this method, parse arguments,
* load configuration file, init language and load converter.
- *
+ *
+ * @param args main args
* @throws Exception if any exception while build configuration
*/
static public void init(String ... args) throws Exception {
@@ -248,9 +247,11 @@
config.saveForUser();
vcs = VCSFactory.createVCS(config);
}
+
/**
* Initialise le VCS et check s'il y a des mises a jour pour prevenir
* l'utilisateur
+ * @throws VCSException
*/
static public void initVCS() throws VCSException {
if (config.isLaunchUI()) {
@@ -353,7 +354,6 @@
}
}
-
// check file status
vcs.checkFileStatus();
}
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/result/ResultEdit.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/result/ResultEdit.java 2008-12-11 15:35:31 UTC (rev 1659)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/result/ResultEdit.java 2008-12-11 17:26:48 UTC (rev 1660)
@@ -157,7 +157,7 @@
// on affecte le nom
if (group.getDimensionName(i).equals("")){
- item.getLabel().setText(_("isisfish.result.dimension ")+i);
+ item.getLabel().setText(_("isisfish.result.dimension") + " " + i);
}else{
item.getLabel().setText(_(group.getDimensionName(i)));
}
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/vcs/AbstractVCS.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/vcs/AbstractVCS.java 2008-12-11 15:35:31 UTC (rev 1659)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/vcs/AbstractVCS.java 2008-12-11 17:26:48 UTC (rev 1660)
@@ -136,6 +136,10 @@
*/
public void setPath(String path) throws VCSException {
this.path = path;
+
+ // in case of set path, don't do checkProtocol
+ // don't work with svn
+ // FIXME won't work on SVN
checkProtocol();
}
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/vcs/VCS.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/vcs/VCS.java 2008-12-11 15:35:31 UTC (rev 1659)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/vcs/VCS.java 2008-12-11 17:26:48 UTC (rev 1660)
@@ -76,7 +76,7 @@
public static final String VCS_USER_NAME = "vcs.username";
/**
- * user passwd or passphrase (protocole dependent) to access vcs ex: xxxxxxxx
+ * user passwd or passphrase (protocol dependent) to access vcs ex: xxxxxxxx
*/
public static final String VCS_USER_PASSWORD = "vcs.password";
@@ -109,7 +109,7 @@
boolean isValidLocalRepository();
/**
- * Return true, if local repository is writeable.
+ * Return true, if local repository is writable.
* (use trunk and is not anonymous)
*
* @return writable
@@ -126,11 +126,11 @@
void setWriteable(boolean value);
/**
- * Commit specified files, if files is null, all files are commited.
+ * Commit specified files, if files is null, all files are committed.
*
* @param files files to commit
* @param msg message used to commit
- * @throws org.codelutin.gesi.vcs.VCSException
+ * @throws VCSException
*/
void commit(List<File> files, String msg) throws VCSException;
@@ -139,7 +139,7 @@
*
* @param files list of file to add
* @param msg message for commit
- * @throws org.codelutin.gesi.vcs.VCSException
+ * @throws VCSException
*/
void add(List<File> files, String msg) throws VCSException;
@@ -148,10 +148,9 @@
*
* @param tag tag to used, null = /trunk other is tags/[tag]
* @param recurse if file is directory checkout sub file
- * @throws org.codelutin.gesi.vcs.VCSException
+ * @throws VCSException
*/
- void checkout(VersionNumber tag, boolean recurse)
- throws VCSException;
+ void checkout(VersionNumber tag, boolean recurse) throws VCSException;
/**
* Delete and commit files in server repository.
@@ -209,7 +208,7 @@
/**
* Get connection state.
*
- * @return true if server is connectable
+ * @return true if server is connected
*/
boolean isConnected();
@@ -232,7 +231,7 @@
boolean isTag(VersionNumber version) throws VCSException;
/**
- * Check if file is uptodate.
+ * Check if file is up-to-date.
*
* @param file file to check
* @return true if file is in last version
@@ -259,7 +258,7 @@
* @param file files to update
* @param recurse
* @return true if there are some merging conflict, false otherwise
- * @throws org.codelutin.gesi.vcs.VCSException
+ * @throws VCSException
*/
List<File> update(File file, boolean recurse) throws VCSException;
@@ -284,47 +283,53 @@
void checkFileStatus() throws VCSException;
/**
- * TODO comment me
+ * Get host.
+ *
* @return host
*/
String getHost();
/**
- * TODO comment me
+ * Get login.
+ *
* @return login
*/
String getLogin();
/**
- * TODO comment me
+ * Get password.
+ *
* @return password
*/
String getPassword();
/**
- * TODO comment me
+ * Get repository path.
+ *
* @return path
*/
String getPath();
/**
- * TODO comment me
- * @return protocole
+ * Get protocol.
+ *
+ * @return protocol
*/
String getProtocol();
/**
- * TODO comment me
+ * Get ssh key file.
+ *
* @return ssh key file
*/
File getSshKeyFile();
/**
- * retourne le tag reellement utilise, par exemple si on a fait un
+ * Retourne le tag reellement utilise, par exemple si on a fait un
* setTag(3.2.0) cette methode retourne "/tags/3.2.0", pour setTag(null)
* on retourne "/trunk"
* @return tag
- * @throws org.codelutin.gesi.vcs.VCSException
+ * @throws VCSException
*/
String getTag() throws VCSException;
@@ -333,49 +338,62 @@
* trunk.
* @param version version to go, if null trunk is used, otherwize
* tags/version is used
- * @throws org.codelutin.gesi.vcs.VCSException
+ * @throws VCSException
*/
void setTag(VersionNumber version) throws VCSException;
/**
+ * Change host.
+ *
* checkProtocol is automaticaly done
*
- * @param host
+ * @param host new host.
+ *
* @throws VCSException
*/
void setHost(String host) throws VCSException;
/**
+ * Change login.
+ *
* checkProtocol is automaticaly done
*
- * @param login
+ * @param login new login
* @throws VCSException
*/
void setLogin(String login) throws VCSException;
/**
- * TODO comment me
+ * Change password.
+ *
* @param password password
*/
void setPassword(String password);
/**
- * checkProtocol is automaticaly done
- * @param path
+ * Change path.
+ *
+ * checkPath is automaticaly done
+ *
+ * @param path new path
* @throws VCSException
*/
void setPath(String path) throws VCSException;
/**
+ * Change protocol.
+ *
* checkProtocol is automaticaly done
+ *
* @param protocol
* @throws VCSException
*/
void setProtocol(String protocol) throws VCSException;
/**
- * TODO comment me
- * @param sshKeyFile
+ * Change ssk key file to use.
+ *
+ * @param sshKeyFile new ssh kay file
*/
void setSshKeyFile(File sshKeyFile);
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/vcs/VCSActionEvent.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/vcs/VCSActionEvent.java 2008-12-11 15:35:31 UTC (rev 1659)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/vcs/VCSActionEvent.java 2008-12-11 17:26:48 UTC (rev 1660)
@@ -1,26 +1,24 @@
-/* *##%
- * Copyright (C) 2002-2008 Code Lutin, Benjamin Poussin
- *
- * 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.
- *##%*/
+/* *##% GeSi
+ * Copyright (C) 2008 CodeLutin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 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 Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%*/
package fr.ifremer.isisfish.vcs;
/**
- * Represente une action VCS que l'on souhaite faire
+ * Représente une action VCS que l'on souhaite faire
*
* @author poussin
* @version $Revision$
@@ -36,7 +34,8 @@
UPDATE_REPOSITORY, // when checkFileStatus
SWITCH, // when setTag
SWITCH_PROTOCOL, // when checkProtocol
+ SWITCH_PATH, // when checkPath
DELETE, // when delete
ADD // when add
-
+
}
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/vcs/VCSNone.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/vcs/VCSNone.java 2008-12-11 15:35:31 UTC (rev 1659)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/vcs/VCSNone.java 2008-12-11 17:26:48 UTC (rev 1660)
@@ -1,21 +1,19 @@
-/* *##%
- * Copyright (C) 2002-2008 Code Lutin, Benjamin Poussin
- *
- * 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.
- *##%*/
+/* *##% GeSi
+ * Copyright (C) 2008 CodeLutin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 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 Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>. ##%*/
package fr.ifremer.isisfish.vcs;
@@ -25,8 +23,6 @@
import java.util.List;
import java.util.Map;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.codelutin.util.VersionNumber;
/**
@@ -40,21 +36,20 @@
* by : $Author$
*/
public class VCSNone extends AbstractVCS {
-
- /** to use log facility, just put in your code: log.info(\"...\"); */
- static private Log log = LogFactory.getLog(VCSNone.class);
-
- public VCSNone(File localRepository,
- String protocol, String host, String path,
- File sshKeyFile, String login, String password) {
- super(localRepository, protocol, host, path, sshKeyFile, login, password);
+
+ /* Class logger */
+ //private static Log log = LogFactory.getLog(VCSNone.class);
+
+ public VCSNone(File localRepository, String protocol, String host,
+ String path, File sshKeyFile, String login, String password) {
+ super(localRepository, protocol, host, path, sshKeyFile, login,
+ password);
}
public boolean isValidLocalRepository() {
return true;
}
-
/**
* look on server if version is tag repository
* @param version version number like 3.2
@@ -63,7 +58,7 @@
public boolean isTag(VersionNumber version) throws VCSException {
return false;
}
-
+
/**
* Ask if there are some new or modified files on server
* @return true if new file available
@@ -71,7 +66,7 @@
public boolean haveUpdate() throws VCSException {
return false;
}
-
+
/**
* get list of new or modified files on server
* @return list of modified or new files
@@ -79,7 +74,7 @@
public List<File> getUpdatedFile() throws VCSException {
return new ArrayList<File>();
}
-
+
/**
* Return all changelog between local file version and remote repository
* file version
@@ -93,23 +88,23 @@
public void commit(List<File> files, String msg) throws VCSException {
throw new VCSException("Can't commit file with dummy VCS");
}
-
+
/**
* Add and commit file in server repository
* @param files list of file to add
* @param msg message for commit
- * @throws fr.ifremer.isisfish.vcs.VCSException
+ * @throws VCSException
*/
public void add(List<File> files, String msg) throws VCSException {
throw new VCSException("Can't add file with dummy VCS");
}
/**
- * get repository module on server and put it in destDir
- * @param destDir destination directory
- * @param module module name
- * @param b // FIXME
- * @throws fr.ifremer.isisfish.vcs.VCSException
+ * Get repository module on server and put it in destDir.
+ *
+ * @param tag destination directory
+ * @param b
+ * @throws VCSException
*/
public void checkout(VersionNumber tag, boolean b) throws VCSException {
throw new VCSException("Can't checkout with dummy VCS");
@@ -119,26 +114,28 @@
* Delete and commit files in server repository
* @param files file to delete
* @param msg message for commit
- * @throws fr.ifremer.isisfish.vcs.VCSException
+ * @throws VCSException
*/
public void delete(List<File> files, String msg) throws VCSException {
- // do nothing
+ // do nothing
}
/**
- * show diff between local file and repository file
+ * Show diff between local file and repository file.
+ *
* @param file
- * @return
- * @throws fr.ifremer.isisfish.vcs.VCSException
+ * @return diff
+ * @throws VCSException
*/
public String getDiff(File file) throws VCSException {
throw new VCSException("Can't diff with dummy VCS");
}
/**
- * Return list of all file on directory on remote server
+ * Return list of all file on directory on remote server.
+ *
* @param directory
- * @return
+ * @return files list
*/
public List<String> getFileList(File directory) throws VCSException {
List<String> result = new ArrayList<String>();
@@ -147,17 +144,17 @@
/**
* Get connection state.
- * @return true if server is connectable
+ * @return true if server is connected
*/
public boolean isConnected() {
- return false;
+ return false;
}
-
+
/**
* Check if file is available on server
* @param file file to check
* @return true if file available
- * @throws fr.ifremer.isisfish.vcs.VCSException
+ * @throws VCSException
*/
public boolean isOnRemote(File file) throws VCSException {
return false;
@@ -167,7 +164,7 @@
* Check if file is uptodate
* @param file file to check
* @return true if file is in last version
- * @throws fr.ifremer.isisfish.vcs.VCSException
+ * @throws VCSException
*/
public boolean isUpToDate(File file) throws VCSException {
return true;
@@ -175,9 +172,9 @@
/**
* Update file
- * @param files file to update
- * @return true if there are some merging conflict, false otherwize
- * @throws fr.ifremer.isisfish.vcs.VCSException
+ * @param file file to update
+ * @return true if there are some merging conflict, false otherwise
+ * @throws VCSException
*/
public List<File> update(File file, boolean recurse) throws VCSException {
throw new VCSException("Can't update file with dummy VCS");
@@ -186,6 +183,10 @@
public void checkProtocol() throws VCSException {
// nothing to do
}
+
+ public void checkPath() throws VCSException {
+ // nothing to do
+ }
public void checkFileStatus() throws VCSException {
// nothing to do
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/vcs/VCSSVN.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/vcs/VCSSVN.java 2008-12-11 15:35:31 UTC (rev 1659)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/vcs/VCSSVN.java 2008-12-11 17:26:48 UTC (rev 1660)
@@ -1,4 +1,4 @@
-/* *##% GeSi
+/* *##% IsisFish
* Copyright (C) 2008 CodeLutin
*
* This program is free software: you can redistribute it and/or modify
@@ -81,6 +81,17 @@
protected SVNClientManager svnManager = null;
protected ConnectionState connectionState = ConnectionState.NOT_TESTED;
+ /**
+ * Constructor.
+ *
+ * @param localRepository
+ * @param protocol
+ * @param host
+ * @param path
+ * @param sshKeyFile
+ * @param login
+ * @param password
+ */
public VCSSVN(File localRepository, String protocol, String host,
String path, File sshKeyFile, String login, String password) {
super(localRepository, protocol, host, path, sshKeyFile, login,
@@ -95,6 +106,12 @@
}
}
+ /**
+ * Return svnkit SVNManager.
+ *
+ * @see SVNClientManager
+ * @return SVNManager instance
+ */
protected SVNClientManager getSVNManager() {
if (svnManager == null) {
String login = getLogin();
@@ -102,11 +119,11 @@
if (getProtocol().contains("ssh")) {
ISVNOptions options = SVNWCUtil.createDefaultOptions(true);
- // options.setPropertyValue("svnkit.ssh2.key", getSshKeyFile().getAbsolutePath());
- // options.setPropertyValue("svnkit.ssh2.username", login);
- // if (passwd != null && !"".equals(passwd)) {
- // options.setPropertyValue("svnkit.ssh2.passphrase", passwd);
- // }
+ // options.setPropertyValue("svnkit.ssh2.key", getSshKeyFile().getAbsolutePath());
+ // options.setPropertyValue("svnkit.ssh2.username", login);
+ // if (passwd != null && !"".equals(passwd)) {
+ // options.setPropertyValue("svnkit.ssh2.passphrase", passwd);
+ // }
ISVNAuthenticationManager auth = SVNWCUtil
.createDefaultAuthenticationManager(SVNWCUtil
.getDefaultConfigurationDirectory(), login,
@@ -122,8 +139,10 @@
return svnManager;
}
- /*
- * @see org.codelutin.gesi.vcs.VCS#isValidLocalRepository()
+ /**
+ * Return true, if local repository is valid repository for actual vcs.
+ *
+ * @return validity
*/
@Override
public boolean isValidLocalRepository() {
@@ -133,8 +152,10 @@
return result;
}
- /*
- * @see org.codelutin.gesi.vcs.VCS#isConnected()
+ /**
+ * Get connection state.
+ *
+ * @return true if server is connected
*/
@Override
public boolean isConnected() {
@@ -144,12 +165,16 @@
getSVNManager().getWCClient().doGetProperty(url, "",
SVNRevision.HEAD, SVNRevision.HEAD);
connectionState = ConnectionState.ON_LINE;
- log.info(_(
- "Connection to serveur available, switch on line: %s",
- getRemoteRepository()));
+
+ if (log.isInfoEnabled()) {
+ log.info(_("isisfish.vcs.vcssvn.isconnected.switchto",
+ getRemoteRepository()));
+ }
} catch (SVNException eee) {
- log.info(_("Can't connect to serveur, switch to off line: %s",
- getRemoteRepository()));
+ if (log.isWarnEnabled()) {
+ log.warn(_("isisfish.vcs.vcssvn.isconnected.switchoff",
+ getRemoteRepository()));
+ }
connectionState = ConnectionState.OFF_LINE;
}
}
@@ -157,71 +182,72 @@
return result;
}
- /*
- * @see org.codelutin.gesi.vcs.VCS#checkProtocol()
+ /**
+ * Verifie la connexion et si le protocole a change, switch le repository
+ * pour utiliser le nouveau protocole. Si on est en mode interface (mode
+ * graphique) et que le switch se passe mal, demande a l'utilisateur
+ * de nouvelle valeur pour le protocole (+ identifiant, ...)
+ * @throws VCSException
*/
@Override
public void checkProtocol() throws VCSException {
+
+ // on doit verifier ici que seul le protocole a change
+ // le doRelocate de svn, ne permet de ne change que
+ // le protocol ou host par exemple
+ // dans le cas d'un changement de path, le do relocate
+ // echoue (operation non permise)
+
try {
+ // test que les protocoles, userInfo, host, port sont egaux.
+
+ // copies locales
File localRoot = getLocalRepository();
SVNInfo info = getSVNManager().getWCClient().doInfo(localRoot,
SVNRevision.WORKING);
SVNURL url = info.getURL();
- // FIXME path seems to appear twice
- //SVNURL rootUrl = info.getRepositoryRootURL();
- //String path = url.toDecodedString().substring(
- // rootUrl.toDecodedString().length());
- String path = url.getPath().substring(
- getPath().length());
-
- // // si un des constituants de l'url a change on fait un switch relocate
- // boolean mustSwitch = false;
- // if (!url.getProtocol().equals(getProtocol())) {
- // log.info(_("repository protocol change from %s to %s",
- // url.getProtocol(), getProtocol()));
- // mustSwitch = true;
- // }
- // if (!url.getUserInfo() != null !url.getUserInfo().equals(getLogin())) {
- // log.info(_("repository user change from %s to %s",
- // url.getUserInfo(), getLogin()));
- // mustSwitch = true;
- // }
- // if (!url.getHost().equals(getHost())) {
- // log.info(_("repository host change from %s to %s",
- // url.getHost(), getHost()));
- // mustSwitch = true;
- // }
- //
- // if (mustSwitch) {
+ // url distante (suposée)
SVNURL newUrl = getRemoteURL();
- newUrl = newUrl.appendPath(path, false);
- if (!url.equals(newUrl)) {
+
+ // hack just for doRelocate to work
+ newUrl = newUrl.setPath(url.getPath(), false);
+
+ if (!url.getProtocol().equals(newUrl.getProtocol()) // http, svn ...
+ || (url.getUserInfo() == null && newUrl.getUserInfo() != url
+ .getUserInfo()) // username
+ || (url.getUserInfo() != null && !url.getUserInfo().equals(
+ newUrl.getUserInfo())) // username
+ || url.getPort() != newUrl.getPort() // 80
+ || !url.getHost().equals(newUrl.getHost())) {
if (fireAction(VCSActionEvent.SWITCH_PROTOCOL)) {
- // String path = url.getPath();
- // int port = url.getPort();
- // SVNURL newUrl = SVNURL.create(getProtocol(), getLogin(),
- // getHost(), port, path, true);
- log.info(_("Switch repository %s from %s to %s", localRoot,
- url, newUrl));
+ if (log.isInfoEnabled()) {
+ log.info(_("isisfish.vcs.vcssvn.checkProtocol.relocate",
+ localRoot, url, newUrl));
+ }
+
+ // le relocate de SVNKit
+ // ne supporte que le changement de protocole/host/port
+ // pas le path
getSVNManager().getUpdateClient().doRelocate(localRoot,
url, newUrl, true);
}
}
- } catch (SVNException eee) {
- throw new VCSException(
- _("Can't get address on serveur of local repository"), eee);
+ } catch (SVNException e) {
+ throw new VCSException(_("isisfish.vcs.vcssvn.checkProtocol.error"), e);
}
-
}
/**
- * Verifie si tous les fichiers du repository local sont les dernieres
+ * Vérifie si tous les fichiers du repository local sont les dernieres
* version par rapport au serveur. Si ce n'est pas le cas et que l'on est
* en mode interactif (mode graphique), on lui propose de mettre a jour
* les fichiers, avec la possibilite de voir les changements sur les
* fichiers
+ *
+ * @throws VCSException
*/
+ @Override
public void checkFileStatus() throws VCSException {
Map<File, SVNStatus> status = getRemoteStatus(null, true);
// si des fichiers ont ete mis a jour sur le serveur on se synchronise
@@ -313,15 +339,14 @@
}
/*
- * @see org.codelutin.gesi.vcs.VCS#commit(java.util.List, java.lang.String)
+ * @see org.codelutin.isisfish.vcs.VCS#commit(java.util.List, java.lang.String)
*/
@Override
public void commit(List<File> files, String msg) throws VCSException {
// if can't commit
if (!isWriteable()) {
- throw new VCSException(
- "You can't commit file, this repository is readonly");
+ throw new VCSException(_("isisfish.vcs.vcssvn.commit.errorreadonly"));
}
// list to array
@@ -364,18 +389,18 @@
false, // force
SVNDepth.INFINITY); // depth
- if (log.isDebugEnabled()) {
- log.debug(_("to revision %d", commitInfo.getNewRevision()));
+ if (log.isInfoEnabled()) {
+ log.info(_("isisfish.vcs.vcssvn.global.torevision", commitInfo
+ .getNewRevision()));
}
- } catch (SVNException eee) {
- throw new VCSException("Can't commit files", eee);
+ } catch (SVNException e) {
+ throw new VCSException(_("isisfish.vcs.vcssvn.commit.error"), e);
}
}
public void add(List<File> files, String msg) throws VCSException {
if (!isWriteable()) {
- throw new VCSException(
- "You can't add file, this repository is readonly");
+ throw new VCSException(_("isisfish.vcs.vcssvn.add.errorreadonly"));
}
try {
if (fireAction(VCSActionEvent.ADD, files.toArray(new File[files
@@ -402,12 +427,12 @@
commitWithoutCheck(files, msg);
}
} catch (SVNException eee) {
- throw new VCSException("Can't add file", eee);
+ throw new VCSException(_("isisfish.vcs.vcssvn.add.error"), eee);
}
}
/*
- * @see org.codelutin.gesi.vcs.VCS#checkout(org.codelutin.util.VersionNumber, boolean)
+ * @see org.codelutin.isisfish.vcs.VCS#checkout(org.codelutin.util.VersionNumber, boolean)
*/
@Override
public void checkout(VersionNumber tag, boolean recurse)
@@ -437,19 +462,20 @@
SVNDepth.INFINITY, // SVNDepth depth
true); // boolean allowUnversionedObstructions
- if (log.isDebugEnabled()) {
- log.debug(_("to revision %d", newRevision));
+ if (log.isInfoEnabled()) {
+ log
+ .info(_("isisfish.vcs.vcssvn.global.torevision",
+ newRevision));
}
}
} catch (SVNException eee) {
- throw new VCSException(_("Can't checkout"), eee);
+ throw new VCSException(_("isisfish.vcs.vcssvn.checkout.error"), eee);
}
}
public void delete(List<File> files, String msg) throws VCSException {
if (!isWriteable()) {
- throw new VCSException(
- "You can't delete file, this repository is readonly");
+ throw new VCSException(_("isisfish.vcs.vcssvn.delete.errorreadonly"));
}
try {
if (fireAction(VCSActionEvent.DELETE, files.toArray(new File[files
@@ -462,7 +488,7 @@
commitWithoutCheck(files, msg);
}
} catch (SVNException eee) {
- throw new VCSException("Can't add file", eee);
+ throw new VCSException(_("isisfish.vcs.vcssvn.delete.error"), eee);
}
}
@@ -532,7 +558,7 @@
return result;
} catch (SVNException eee) {
- throw new VCSException("Can't status file", eee);
+ throw new VCSException(_("isisfish.vcs.vcssvn.localstatus.error"), eee);
}
}
@@ -598,7 +624,7 @@
return result;
} catch (SVNException eee) {
- throw new VCSException("Can't status file", eee);
+ throw new VCSException(_("isisfish.vcs.vcssvn.remotestatus.error"), eee);
}
}
@@ -613,7 +639,7 @@
public Map<File, String> getChanglog(List<File> files) throws VCSException {
throw new UnsupportedOperationException("Not supported yet.");
-
+
/*final Map<File, String> changLog = new HashMap<File, String>();
try {
@@ -623,7 +649,7 @@
// Handler
ISVNLogEntryHandler handler = new ISVNLogEntryHandler() {
-
+
@Override
public void handleLogEntry(SVNLogEntry logEntry)
throws SVNException {
@@ -700,16 +726,16 @@
byte1.close();
} catch (SVNException e) {
- throw new VCSException(_("Can't get diff"), e);
+ throw new VCSException(_("isisfish.vcs.vcssvn.diff.error"), e);
} catch (IOException e) {
- throw new VCSException(_("Can't get diff"), e);
+ throw new VCSException(_("isisfish.vcs.vcssvn.diff.error"), e);
}
return diff;
}
/*
- * @see org.codelutin.gesi.vcs.VCS#getFileList(java.io.File)
+ * @see org.codelutin.isisfish.vcs.VCS#getFileList(java.io.File)
*/
@Override
public List<String> getFileList(File directory) throws VCSException {
@@ -746,7 +772,7 @@
SVNDirEntry.DIRENT_ALL, // int entryFields,
handler);
} catch (SVNException e) {
- throw new VCSException(_("Can't list files"), e);
+ throw new VCSException(_("isisfish.vcs.vcssvn.list.error"), e);
}
return files;
@@ -769,8 +795,8 @@
// log
if (log.isDebugEnabled()) {
- log.debug(_("status for %s is %s", status.getFile()
- .getAbsolutePath(), status
+ log.debug(_("isisfish.vcs.vcssvn.global.filestatus", status
+ .getFile().getAbsolutePath(), status
.getRemoteContentsStatus().toString()));
}
@@ -779,8 +805,9 @@
// log
if (log.isDebugEnabled()) {
- log.debug(_("add %s as updated file", status
- .getFile().getAbsolutePath()));
+ log.debug(_(
+ "isisfish.vcs.vcssvn.global.foundUpdatedFile",
+ status.getFile().getAbsolutePath()));
}
result.add(status.getFile());
@@ -801,7 +828,7 @@
return result;
} catch (SVNException eee) {
- throw new VCSException("Can't status file", eee);
+ throw new VCSException(_("isisfish.vcs.vcssvn.getupdate.error"), eee);
}
}
@@ -812,13 +839,13 @@
* @throws VCSException
*/
public boolean haveUpdate() throws VCSException {
-
+
// c'est juste si la liste renvoyé par getUpdatedFile() n'est pas vide ?
List<File> updatedFiles = getUpdatedFile();
-
+
boolean result = false;
-
- if(updatedFiles != null && !updatedFiles.isEmpty()) {
+
+ if (updatedFiles != null && !updatedFiles.isEmpty()) {
result = true;
}
return result;
@@ -832,29 +859,35 @@
* @throws VCSException
*/
public boolean isOnRemote(File file) throws VCSException {
-
+
File localFile = file;
if (localFile == null) {
localFile = getLocalRepository();
}
-
+
boolean result = false;
try {
SVNStatusClient statusClient = getSVNManager().getStatusClient();
- SVNStatus status = statusClient.doStatus(localFile, true /*remote*/);
-
+ SVNStatus status = statusClient
+ .doStatus(localFile, true /*remote*/);
+
SVNStatusType localStatus = status.getContentsStatus();
SVNStatusType remoteStatus = status.getRemoteContentsStatus();
-
- if(log.isDebugEnabled()) {
- log.debug(_("file %s status is (l:%s/r:%s)",localFile.getAbsolutePath(),localStatus, remoteStatus));
+
+ if (log.isDebugEnabled()) {
+ log
+ .debug(_(
+ "isisfish.vcs.vcssvn.global.filelocalandremotestatus",
+ localFile.getAbsolutePath(), localStatus,
+ remoteStatus));
}
-
+
// don't return true if:
// - file is locally added
// - file is remotely deleted
- if(!localStatus.equals(SVNStatusType.STATUS_ADDED) && !remoteStatus.equals(SVNStatusType.STATUS_DELETED)) {
+ if (!localStatus.equals(SVNStatusType.STATUS_ADDED)
+ && !remoteStatus.equals(SVNStatusType.STATUS_DELETED)) {
result = true;
}
@@ -862,11 +895,12 @@
// catch exception
// if exception, file doesn't exists on server
// result is still 'false'
- if(log.isDebugEnabled()) {
- log.debug(_("file %s is not on server",localFile.getAbsolutePath()),e);
+ if (log.isDebugEnabled()) {
+ log.debug(_("isisfish.vcs.vcssvn.isonremote.error", localFile
+ .getAbsolutePath()), e);
}
}
-
+
return result;
}
@@ -879,36 +913,38 @@
*/
@Override
public boolean isUpToDate(File file) throws VCSException {
-
+
File localFile = file;
if (localFile == null) {
localFile = getLocalRepository();
}
-
+
boolean result = false;
-
+
try {
SVNStatusClient statusClient = getSVNManager().getStatusClient();
- SVNStatus status = statusClient.doStatus(localFile, true /*remote*/);
+ SVNStatus status = statusClient
+ .doStatus(localFile, true /*remote*/);
SVNStatusType localStatus = status.getContentsStatus();
SVNStatusType remoteStatus = status.getRemoteContentsStatus();
-
+
// TODO peut on dire que le fichier est à jour
// si le status local est normal et le distant est none
- if (localStatus == SVNStatusType.STATUS_NORMAL && remoteStatus == SVNStatusType.STATUS_NONE) {
+ if (localStatus == SVNStatusType.STATUS_NORMAL
+ && remoteStatus == SVNStatusType.STATUS_NONE) {
result = true;
}
} catch (SVNException eee) {
- throw new VCSException(_("Can't get file status"), eee);
+ throw new VCSException(_("isisfish.vcs.vcssvn.isuptodate.error"), eee);
}
-
+
return result;
}
/*
- * @see org.codelutin.gesi.vcs.VCS#update(java.io.File, boolean)
+ * @see org.codelutin.isisfish.vcs.VCS#update(java.io.File, boolean)
*/
@Override
public List<File> update(File file, boolean recurse) throws VCSException {
@@ -920,8 +956,7 @@
localFile = getLocalRepository();
}
if (!accept(localFile)) {
- throw new VCSException(
- _("Can't update file that not in local repository"));
+ throw new VCSException(_("isisfish.vcs.vcssvn.update.notinlocal"));
}
if (fireAction(VCSActionEvent.UPDATE, localFile)) {
// si le repertoire pere, n'est pas encore dans le repo local
@@ -941,7 +976,8 @@
false); // boolean depthIsSticky
if (log.isInfoEnabled()) {
- log.info(_("to revision %d", newRevision));
+ log.info(_("isisfish.vcs.vcssvn.global.torevision",
+ newRevision));
}
// recherche de tous les fichiers locaux en conflit
@@ -961,14 +997,14 @@
}
}
- } catch (SVNException eee) {
- throw new VCSException("Can't update files", eee);
+ } catch (SVNException e) {
+ throw new VCSException(_("isisfish.vcs.vcssvn.update.error"), e);
}
return result;
}
/*
- * @see org.codelutin.gesi.vcs.VCS#isWriteable()
+ * @see org.codelutin.isisfish.vcs.VCS#isWriteable()
*/
@Override
public boolean isWriteable() throws VCSException {
@@ -993,7 +1029,7 @@
}
/*
- * @see org.codelutin.gesi.vcs.VCS#isTag(org.codelutin.util.VersionNumber)
+ * @see org.codelutin.isisfish.vcs.VCS#isTag(org.codelutin.util.VersionNumber)
*/
@Override
public boolean isTag(VersionNumber version) throws VCSException {
@@ -1008,14 +1044,14 @@
// est leve, et donc result reste a faux
result = info != null;
} catch (SVNException eee) {
- log.debug(_("Tag %s don't exist", version));
+ log.debug(_("isisfish.vcs.vcssvn.istag.notexist", version));
}
}
return result;
}
/*
- * @see org.codelutin.gesi.vcs.VCS#getTag()
+ * @see org.codelutin.isisfish.vcs.VCS#getTag()
*/
@Override
public String getTag() throws VCSException {
@@ -1034,13 +1070,12 @@
}
return result;
} catch (SVNException eee) {
- throw new VCSException(
- _("Can't get address on serveur of local repository"), eee);
+ throw new VCSException(_("isisfish.vcs.vcssvn.gettag.error"), eee);
}
}
/*
- * @see org.codelutin.gesi.vcs.VCS#setTag(org.codelutin.util.VersionNumber)
+ * @see org.codelutin.isisfish.vcs.VCS#setTag(org.codelutin.util.VersionNumber)
*/
@Override
public void setTag(VersionNumber version) throws VCSException {
@@ -1050,8 +1085,8 @@
tag = "/tags/" + version;
}
- String currantTag = getTag();
- if (!tag.equals(currantTag)) {
+ String currentTag = getTag();
+ if (!tag.equals(currentTag)) {
// on ne fait le switch que si le tag change rellement, sinon
// c equivalent a faire un update, ce que l'on ne souhaite pas
// forcement
@@ -1062,8 +1097,8 @@
newUrl = newUrl.appendPath(tag, true);
if (log.isInfoEnabled()) {
- log.info(_("Switch repository tag from %s to %s",
- currantTag, tag));
+ log.info(_("isisfish.vcs.vcssvn.settag.switchfromto",
+ currentTag, tag));
}
//getSVNManager().getUpdateClient().doSwitch(
// localRoot, newUrl, SVNRevision.HEAD, true);
@@ -1080,13 +1115,13 @@
true);// boolean depthIsSticky
if (log.isInfoEnabled()) {
- log.info(_("to revision %d", newRevision));
+ log.info(_("isisfish.vcs.vcssvn.global.torevision",
+ newRevision));
}
}
}
} catch (SVNException eee) {
- throw new VCSException(
- _("Can't get address on serveur of local repository"), eee);
+ throw new VCSException(_("isisfish.vcs.vcssvn.setTag.error"), eee);
}
}
Modified: isis-fish/trunk/src/main/resources/i18n/isis-fish-en_GB.properties
===================================================================
--- isis-fish/trunk/src/main/resources/i18n/isis-fish-en_GB.properties 2008-12-11 15:35:31 UTC (rev 1659)
+++ isis-fish/trunk/src/main/resources/i18n/isis-fish-en_GB.properties 2008-12-11 17:26:48 UTC (rev 1660)
@@ -4,30 +4,22 @@
Can''t\ evaluate\ simulation\ prescript=
Can't\ add\ result\ '%1$s'\ at\ date\ %2$s=Can't add result '%1$s' at date %2$s
Can't\ add\ simulation\:\ =
-Can't\ checkout=
-Can't\ connect\ to\ serveur,\ switch\ to\ off\ line\:\ %s=
Can't\ create\ simulation\ logger=Can't create simulation logger
Can't\ delete\ simulation\ %s\ =
Can't\ do\ post\ action\ %s=
Can't\ do\ simulation\ %s=
Can't\ export\ simulation\ %s=
-Can't\ get\ address\ on\ serveur\ of\ local\ repository=
Can't\ get\ changlog=
-Can't\ get\ diff=
-Can't\ get\ file\ status=
Can't\ get\ result\:\ %1$s=Can't get result\: %1$s
Can't\ instanciate\ export\ %1$s=Can't instanciate export %1$s
Can't\ instanciate\ wanted\ VCS\ (%s),\ use\ default=
Can't\ instantiate\ %s=
-Can't\ list\ files=
Can't\ open\ log\ for\ %s=
Can't\ simulate\ %s=
Can't\ start\ simulation,\ bad\ id\:\ %s=
-Can't\ update\ file\ that\ not\ in\ local\ repository=
Check\ state\ of\ local\ repository\:\ %s=
Checkout\ pom.xml\ to\ %s=
Clear\ done\ jobs=
-Connection\ to\ serveur\ available,\ switch\ on\ line\:\ %s=
Could\ not\ found\ formule\ type\ %s\ autorised\ type\ are\ %s=
Error\ during\ vcs\ initialisation=
Generate\ next\ simulation=
@@ -54,15 +46,11 @@
Stop\ simulation\ plan,\ because\ can't\ call\ afterSimulation\ correctly\ on\ plan\ %s=
Stop\ the\ process=
SubProcess\ start\:\ %s\ %s=
-Switch\ repository\ %s\ from\ %s\ to\ %s=
-Switch\ repository\ tag\ from\ %s\ to\ %s=
Switch\ repository\ type\ to\ none=
-Tag\ %s\ don't\ exist=
The\ equation\ used\ is\ the\ population's\ growth\ curve,\ it\ needs\ to\ be\ defined\ first.=
Use\ branches,\ switch\ not\ needed=
User\ stop\ simulation\ %s=
Your\ database\ repository\:\ %s\\n\ don't\ use\ correct=
-add\ %s\ as\ updated\ file=
could\ not\ close\ reader\ %1$s=could not close reader %1$s
could\ not\ create\ simulation\ filter\ model\ for\ reason\ %1$s=could not create simulation filter model for reason %1$s
could\ not\ filter\ on\ simulations=could not filter on simulations
@@ -74,8 +62,6 @@
destination\ already\ exists\ %s\ use\ 'force'\ argument\ to\ force\ overwrite=
destination\ already\ exists\ %s\ use\ \\'force\\'\ argument\ to\ force\ overwrite=
directory\ %s\ must\ be\ a\ directory=
-file\ %s\ is\ not\ on\ server=
-file\ %s\ status\ is\ (l\:%s/r\:%s)=
filter\ loaded\ in\ %1$s\ ms\ \:\ found\ %2$s\ lines.=filter loaded in %1$s ms \: found %2$s lines.
isisfish.about.site=http\://isisfish.labs.libre-entreprise.org - by B.Poussin
isisfish.about.text=Isis-Fish Simulator
@@ -259,7 +245,6 @@
isisfish.error.init.remove.button=could not init remove button (button or list is null) button \: %1$s, list \: %2$s
isisfish.error.instanciate=Can't instanciate %1$s
isisfish.error.instanciate.export=Can't instanciate export %1$s
-isisfish.error.integer.positif=Your input must be a positif integer (>1)
isisfish.error.invalid.costs.fix=les co\u00FBts fixes sont invalides
isisfish.error.invalid.distribution.recruitment=distribution de recrutement invalide
isisfish.error.invalid.equation=Equation invalid
@@ -281,13 +266,12 @@
isisfish.error.log.console.dispose=Une erreur est survenue pendant la fermeture de la console %1$s de log, raison %2$s
isisfish.error.log.createAppender=could not create appender [%1$s] \: %2$s for reason %3$s
isisfish.error.log.foundAppender=\=could not found log appender %1$s for category %2$s
-isisfish.error.matrix.more.2d=Matrice de plus de 2 dimensions\!\!\\nSelectionnez moins d'\u00E9l\u00E9ments ou utilisez l'op\u00E9rateur somme.
+isisfish.error.matrix.more.2d=Matrice de plus de 2 dimensions\!\!\nS\u00E9lectionnez moins d'\u00E9l\u00E9ments ou utilisez l'op\u00E9rateur somme.
isisfish.error.migration.negative=Migration negative
isisfish.error.no.matrix=No matrix for\:
isisfish.error.no.null.time.step=Error, the time step should not be null
isisfish.error.no.sector=No sector defined
isisfish.error.no.select.simulation=could not select simulation
-isisfish.error.no.selected.simulation=No Simulation selected
isisfish.error.no.target.species=no target species in %1$s for %2$s
isisfish.error.not.found.class=this class does not
isisfish.error.not.found.code=could not found codeclass for %1$s
@@ -325,7 +309,6 @@
isisfish.error.save.simulation.parameters=Can't save simulation parameters in file %1$s
isisfish.error.script.create=isisfish.error.script.create
isisfish.error.script.delete=Can't delete file %1$s for reason %2$s
-isisfish.error.script.diff=Can't diff file %1$s for reason %2$s
isisfish.error.script.import=Can't import file for reason %1$s
isisfish.error.script.load=Can't load file %1$s for reason %2$s
isisfish.error.script.save=Can't save file %1$s for reason %2$s
@@ -533,7 +516,6 @@
isisfish.message.confirm.remove.script=Do you want to remove script ? '%1$s'
isisfish.message.copy.finished=Copy finished
isisfish.message.copy.region=Copy region to %1$s
-isisfish.message.create.region.canceled=Create region canceled
isisfish.message.creating.region=Creating region %1$s
isisfish.message.creation.done=creation done %1$s
isisfish.message.creation.finished=Creation finished
@@ -541,8 +523,7 @@
isisfish.message.delete.entities=Delete entities
isisfish.message.delete.entity=Delete entity
isisfish.message.delete.finished=delete finished
-isisfish.message.delete.object=To delete object %1$s, all next object will be deleted\\n\\n
-isisfish.message.diff.finished=file in state %1$s
+isisfish.message.delete.object=To delete object %1$s, all next object will be deleted\n\n
isisfish.message.evaluation.finished=evaluation finished
isisfish.message.export.done=export done
isisfish.message.export.zip=Export to zip file %1$s
@@ -555,17 +536,14 @@
isisfish.message.import.region.zipped=Zipped Region
isisfish.message.import.scripts.file.cancelled=Import scripts cancelled
isisfish.message.import.xml.v2.file=Import xml v2 file
-isisfish.message.import.xml.v2.file\ =
isisfish.message.import.zip=Import zip file
isisfish.message.load.finished=load finished
isisfish.message.load.map=Try to load map file\: %1$s (%2$s, %3$s)
-isisfish.message.load.region.canceled=load region canceled
isisfish.message.loading.old.simulation=Loading old simulation ...
isisfish.message.loading.region=Loading region ...
isisfish.message.name.imported.region=Enter name for imported region
isisfish.message.new.filename=Enter the name of the new file. (use only chars and _ and start with uppercase)
isisfish.message.new.region.name=Enter new region name
-isisfish.message.no.diff=No diff found for file %1$s, since it is a %2$s
isisfish.message.old.simulation.loaded=Old simulation loaded
isisfish.message.page.modified=This page has been modified, do you want to save it ?
isisfish.message.presimulation.script.execution=Presimulation Script execution
@@ -616,7 +594,6 @@
isisfish.month.november=november
isisfish.month.october=october
isisfish.month.september=september
-isisfish.notitle=/
isisfish.params.changeLogLev=Change from level '%1$s' to level '%2$s'
isisfish.params.clearFilter=Clear filter
isisfish.params.description=Description
@@ -629,11 +606,11 @@
isisfish.params.ruleParameters=Rule's parameters
isisfish.params.simulationName=Simulation name
isisfish.params.title=Parameters
-isisfish.params.toString.fishery=P\u00EAcherie\: %1$s\\n\\n
+isisfish.params.toString.fishery=P\u00EAcherie\: %1$s\n\n
isisfish.params.toString.lib.logger.level=Level of libraries' logger %1$s
-isisfish.params.toString.number.years=Number of years\: %1$s\\n\\n
+isisfish.params.toString.number.years=Number of years\: %1$s\n\n
isisfish.params.toString.plan=Plan\: %1$s
-isisfish.params.toString.plan.number=Analyse plan sequence number\: %1$s\\n\\n
+isisfish.params.toString.plan.number=Analyse plan sequence number\: %1$s\n\n
isisfish.params.toString.populations=Populations\:
isisfish.params.toString.rule=Rule\: %1$s
isisfish.params.toString.script.logger.level=Level of scripts' logger %1$s
@@ -736,7 +713,7 @@
isisfish.result.datas=Datas
isisfish.result.datasRadioButton=defaultToolTip-fr.ifremer.resultat.ResultatEdit.donneeRadioButton
isisfish.result.desktopPane=defaultToolTip-fr.ifremer.resultat.ResultatView.desktopPane
-isisfish.result.dimension\ =Dimension
+isisfish.result.dimension=Dimension
isisfish.result.end.simulation=En fin de Simulation\:
isisfish.result.export=Export
isisfish.result.export.file=Export text file
@@ -937,6 +914,34 @@
isisfish.vcs.updateconfirm.ok=ok
isisfish.vcs.updateconfirm.tooltip.checkAll=
isisfish.vcs.updaterepository.confirm=Your repository is not up to date.\nDo you want to update your repository ?\n\nRemote modified file is \:\n%s
+isisfish.vcs.vcssvn.add.error=Can't add file
+isisfish.vcs.vcssvn.add.errorreadonly=You can't add file, this repository is readonly
+isisfish.vcs.vcssvn.checkProtocol.error=Can't get address on serveur of local repository
+isisfish.vcs.vcssvn.checkProtocol.relocate=Relocate repository %s from %s to %s
+isisfish.vcs.vcssvn.checkout.error=Can't checkout
+isisfish.vcs.vcssvn.commit.error=Can't commit files
+isisfish.vcs.vcssvn.commit.errorreadonly=You can't commit file, this repository is readonly
+isisfish.vcs.vcssvn.delete.error=Can't delete file
+isisfish.vcs.vcssvn.delete.errorreadonly=You can't delete file, this repository is readonly
+isisfish.vcs.vcssvn.diff.error=Can't get diff
+isisfish.vcs.vcssvn.gettag.error=Can't get address on serveur of local repository
+isisfish.vcs.vcssvn.getupdate.error=Can't status file
+isisfish.vcs.vcssvn.global.filelocalandremotestatus=file %s status is (l\:%s/r\:%s)
+isisfish.vcs.vcssvn.global.filestatus=status for %s is %s
+isisfish.vcs.vcssvn.global.foundUpdatedFile=add %s as updated file
+isisfish.vcs.vcssvn.global.torevision=At revision \: %d
+isisfish.vcs.vcssvn.isconnected.switchoff=Can't connect to serveur, switch to off line\: %s
+isisfish.vcs.vcssvn.isconnected.switchto=Connection to serveur available, switch on line\: %s
+isisfish.vcs.vcssvn.isonremote.error=file %s is not on server
+isisfish.vcs.vcssvn.istag.notexist=Tag %s don't exist
+isisfish.vcs.vcssvn.isuptodate.error=Can't get file status
+isisfish.vcs.vcssvn.list.error=Can't list files
+isisfish.vcs.vcssvn.localstatus.error=Can't status file
+isisfish.vcs.vcssvn.remotestatus.error=Can't status file
+isisfish.vcs.vcssvn.setTag.error=Can't get address on server of local repository
+isisfish.vcs.vcssvn.settag.switchfromto=Switch repository tag from %s to %s
+isisfish.vcs.vcssvn.update.error=Can't update files
+isisfish.vcs.vcssvn.update.notinlocal=Can't update file that not in local repository
isisfish.versionStorage.removed=Removed
isisfish.vesselType.activityRange=Activity range
isisfish.vesselType.comments=Comments
@@ -987,12 +992,5 @@
isisfish.zone.comments=Comments
isisfish.zone.name=Name
not\ started=
-observe.message.quit.edit=
-observe.message.title=
region\ already\ exists\ %s\ use\ 'force'\ argument\ to\ force\ overwrite=
-repository\ host\ change\ from\ %s\ to\ %s=
-repository\ protocol\ change\ from\ %s\ to\ %s=
-repository\ user\ change\ from\ %s\ to\ %s=
simulate\ %s\ with\ file\ %s=
-status\ for\ %s\ is\ %s=
-to\ revision\ %d=
Modified: isis-fish/trunk/src/main/resources/i18n/isis-fish-fr_FR.properties
===================================================================
--- isis-fish/trunk/src/main/resources/i18n/isis-fish-fr_FR.properties 2008-12-11 15:35:31 UTC (rev 1659)
+++ isis-fish/trunk/src/main/resources/i18n/isis-fish-fr_FR.properties 2008-12-11 17:26:48 UTC (rev 1660)
@@ -4,30 +4,22 @@
Can''t\ evaluate\ simulation\ prescript=
Can't\ add\ result\ '%1$s'\ at\ date\ %2$s=Can't add result '%1$s' at date %2$s
Can't\ add\ simulation\:\ =
-Can't\ checkout=
-Can't\ connect\ to\ serveur,\ switch\ to\ off\ line\:\ %s=
Can't\ create\ simulation\ logger=Can't create simulation logger
Can't\ delete\ simulation\ %s\ =
Can't\ do\ post\ action\ %s=
Can't\ do\ simulation\ %s=
Can't\ export\ simulation\ %s=
-Can't\ get\ address\ on\ serveur\ of\ local\ repository=
Can't\ get\ changlog=Impossible d'obtenir de changelog
-Can't\ get\ diff=Impossible d'obtenir de diff de fichiers
-Can't\ get\ file\ status=Impossible d'obtenir le statut
Can't\ get\ result\:\ %1$s=Can't get result\: %1$s
Can't\ instanciate\ export\ %1$s=Can't instanciate export %1$s
Can't\ instanciate\ wanted\ VCS\ (%s),\ use\ default=
Can't\ instantiate\ %s=
-Can't\ list\ files=Impossible de lister les fichiers
Can't\ open\ log\ for\ %s=
Can't\ simulate\ %s=
Can't\ start\ simulation,\ bad\ id\:\ %s=
-Can't\ update\ file\ that\ not\ in\ local\ repository=Impossible de mettre \u00E0 jour un fichier hors du d\u00E9p\u00F4t
Check\ state\ of\ local\ repository\:\ %s=
Checkout\ pom.xml\ to\ %s=
Clear\ done\ jobs=
-Connection\ to\ serveur\ available,\ switch\ on\ line\:\ %s=
Could\ not\ found\ formule\ type\ %s\ autorised\ type\ are\ %s=
Error\ during\ vcs\ initialisation=
Generate\ next\ simulation=
@@ -54,15 +46,11 @@
Stop\ simulation\ plan,\ because\ can't\ call\ afterSimulation\ correctly\ on\ plan\ %s=
Stop\ the\ process=
SubProcess\ start\:\ %s\ %s=
-Switch\ repository\ %s\ from\ %s\ to\ %s=
-Switch\ repository\ tag\ from\ %s\ to\ %s=
Switch\ repository\ type\ to\ none=
-Tag\ %s\ don't\ exist=
The\ equation\ used\ is\ the\ population's\ growth\ curve,\ it\ needs\ to\ be\ defined\ first.=
Use\ branches,\ switch\ not\ needed=
User\ stop\ simulation\ %s=
Your\ database\ repository\:\ %s\\n\ don't\ use\ correct=
-add\ %s\ as\ updated\ file=Ajout du fichier %s
could\ not\ close\ reader\ %1$s=could not close reader %1$s
could\ not\ create\ simulation\ filter\ model\ for\ reason\ %1$s=could not create simulation filter model for reason %1$s
could\ not\ filter\ on\ simulations=could not filter on simulations
@@ -74,8 +62,6 @@
destination\ already\ exists\ %s\ use\ 'force'\ argument\ to\ force\ overwrite=
destination\ already\ exists\ %s\ use\ \\'force\\'\ argument\ to\ force\ overwrite=
directory\ %s\ must\ be\ a\ directory=
-file\ %s\ is\ not\ on\ server=Le fichier %s n'est pas pr\u00E9sent sur le serveur
-file\ %s\ status\ is\ (l\:%s/r\:%s)=Le fichier %s a pour statut (l\:%s/d\:%s)
filter\ loaded\ in\ %1$s\ ms\ \:\ found\ %2$s\ lines.=filter loaded in %1$s ms \: found %2$s lines.
isisfish.about.site=http\://isisfish.labs.libre-entreprise.org - par B.Poussin
isisfish.about.text=Simulateur Isis-Fish
@@ -259,7 +245,6 @@
isisfish.error.init.remove.button=could not init remove button (button or list is null) button \: %1$s, list \: %2$s
isisfish.error.instanciate=Can't instanciate %1$s
isisfish.error.instanciate.export=Can't instanciate export %1$s
-isisfish.error.integer.positif=Your input must be a positif integer (>1)
isisfish.error.invalid.costs.fix=les co\u00FBts fixes sont invalides
isisfish.error.invalid.distribution.recruitment=distribution de recrutement invalide
isisfish.error.invalid.equation=Equation invalide
@@ -281,13 +266,12 @@
isisfish.error.log.console.dispose=Une erreur est survenue pendant la fermeture de la console %1$s de log, raison %2$s
isisfish.error.log.createAppender=n'a pas pu creer l'appender [%1$s] \: %2$s pour la raison %3$s
isisfish.error.log.foundAppender=n'a pas trouve l'appender %1$s pour la categorie %2$s
-isisfish.error.matrix.more.2d=Matrice de plus de 2 dimensions\!\!\\nSelectionnez moins d'\u00E9l\u00E9ments ou utilisez l'op\u00E9rateur somme.
+isisfish.error.matrix.more.2d=Matrice de plus de 2 dimensions\!\!\nS\u00E9lectionnez moins d'\u00E9l\u00E9ments ou utilisez l'op\u00E9rateur somme.
isisfish.error.migration.negative=Migration negative
isisfish.error.no.matrix=No matrix for\:
isisfish.error.no.null.time.step=Error, the time step should not be null
isisfish.error.no.sector=il n'y a pas de secteur de d\u00E9finit
isisfish.error.no.select.simulation=could not select simulation
-isisfish.error.no.selected.simulation=No Simulation selected
isisfish.error.no.target.species=no target species in %1$s for %2$s
isisfish.error.not.found.class=this class does not
isisfish.error.not.found.code=could not found codeclass for %1$s
@@ -325,7 +309,6 @@
isisfish.error.save.simulation.parameters=Can't save simulation parameters in file %1$s
isisfish.error.script.create=isisfish.error.script.create
isisfish.error.script.delete=N'a pas pu supprimer le fichier %1$s pour la raison suivante %2$s
-isisfish.error.script.diff=N'a pas pu calculer le diff du fichier %1$s pour la raison suivante %2$s
isisfish.error.script.import=N'a pas pu importer pour la raison suivante %1$s
isisfish.error.script.load=N'a pas pu charger le fichier %1$s pour la raison suivante %2$s
isisfish.error.script.save=N'a pas pu sauver le fichier %1$s pour la raison suivante %2$s
@@ -494,14 +477,14 @@
isisfish.launch.server.ssh.privateKeyFile=clef priv\u00E9e ssh
isisfish.launch.server.ssh.publicKeyFile=clef publique ssh
isisfish.launch.ssh=lecture-\u00E9criture (ssh)
-isisfish.launch.start=Lancement Isis-fish ... %1$s
+isisfish.launch.start=Lancement Isis-fish... %1$s
isisfish.launch.stop=Stopping simulation...
isisfish.launching=after init done in %1$s.
isisfish.log.addAppender=ajoute un appender [%1$s]
isisfish.log.body=Message \u00E0 joindre
isisfish.log.closeAppender=ferme l'appender [%1$s] pour la categorie %2$s
isisfish.log.mail.failed=Impossible d'envoyer le rapport par courriel. Le serveur smtp fonctionne ? (J'essaye de contacter < %1$s > smtp server)
-isisfish.log.mail.send=A report has been sent to %1$s
+isisfish.log.mail.send=Un rapport a \u00E9t\u00E9 envoy\u00E9 \u00E0 %1$s
isisfish.log.mail.send.title=Send simulation %1$s by email
isisfish.log.mailTo=Adresse du destinataire
isisfish.log.removeAppender=supprime l'appender [%1$s]
@@ -533,7 +516,6 @@
isisfish.message.confirm.remove.script=Voulez-vous vraiment supprimer le script ? '%1$s'
isisfish.message.copy.finished=Copie termin\u00E9e
isisfish.message.copy.region=Copier la r\u00E9gion vers %1$s
-isisfish.message.create.region.canceled=Creation de r\u00E9gion annul\u00E9e
isisfish.message.creating.region=En train de cr\u00E9er la r\u00E9gion %1$s
isisfish.message.creation.done=cr\u00E9ation termin\u00E9e %1$s
isisfish.message.creation.finished=Cr\u00E9ation termin\u00E9e
@@ -542,7 +524,6 @@
isisfish.message.delete.entity=Supprimer l'entit\u00E9
isisfish.message.delete.finished=Suppression termin\u00E9e
isisfish.message.delete.object=Pour supprimer l'objet %1$s, tous les objets suivants seront aussi supprim\u00E9s \n\n
-isisfish.message.diff.finished=fichier dans l'\u00E9tat %1$s
isisfish.message.evaluation.finished=\u00E9valuation termin\u00E9e
isisfish.message.export.done=Export termin\u00E9
isisfish.message.export.zip=Exporter dans le fichier zip %1$s
@@ -555,17 +536,14 @@
isisfish.message.import.region.zipped=Zipped Region
isisfish.message.import.scripts.file.cancelled=Importation des scripts annul\u00E9
isisfish.message.import.xml.v2.file=Import xml v2 file
-isisfish.message.import.xml.v2.file\ =
isisfish.message.import.zip=Import zip file
isisfish.message.load.finished=Chargement termin\u00E9
isisfish.message.load.map=Chargement de la carte \: %1$s (%2$s, %3$s)
-isisfish.message.load.region.canceled=chargement de r\u00E9gion annul\u00E9
isisfish.message.loading.old.simulation=Chargement d'une ancienne simulation ...
isisfish.message.loading.region=Chargement de la r\u00E9gion
isisfish.message.name.imported.region=Entrez le nom de la r\u00E9gion \u00E0 importer
isisfish.message.new.filename=Entrer le nom du nouveau du fichier.\n\t (utiliser uniquemment des caract\u00E8res et _ en commencant avec une majuscule)
isisfish.message.new.region.name=Entrer le nom de la nouvell r\u00E9gion
-isisfish.message.no.diff=Pas de diff\u00E9rences trouv\u00E9s pour le fichier %1$s, \u00E9tant un '%2$s'
isisfish.message.old.simulation.loaded=Ancienne simulation charg\u00E9e
isisfish.message.page.modified=Cette page a \u00E9t\u00E9 modifi\u00E9, voulez-vous la sauvegarder ?
isisfish.message.presimulation.script.execution=Ex\u00E9cution des scripts de Presimulation
@@ -586,7 +564,7 @@
isisfish.message.simulation.ended=Simulation termin\u00E9e
isisfish.message.simulation.execution=Simulation execution
isisfish.message.tray.disabled=Icone de notification d\u00E9sactiv\u00E9e
-isisfish.message.update.finished=update finished
+isisfish.message.update.finished=Mise \u00E0 jour termin\u00E9e
isisfish.metier.comments=Commentaires
isisfish.metier.name=Nom
isisfish.metier.rangeValues=Range of values
@@ -602,7 +580,7 @@
isisfish.metierSeasonInfoZone.comments=Commentaires
isisfish.metierSeasonInfoZone.season=Saison
isisfish.metierSeasonInfoZone.selectSeason=S\u00E9lectionnez une saison
-isisfish.metierSeasonInfoZone.title=Seasons / Zones
+isisfish.metierSeasonInfoZone.title=Saison / Zones
isisfish.monitor.title=Application Monitor
isisfish.month.april=avril
isisfish.month.august=ao\u00FBt
@@ -616,7 +594,6 @@
isisfish.month.november=novembre
isisfish.month.october=octobre
isisfish.month.september=september
-isisfish.notitle=/
isisfish.params.changeLogLev=Passe du niveau '%1$s' au niveau '%2$s'
isisfish.params.clearFilter=Reset filtre
isisfish.params.description=Description
@@ -736,7 +713,7 @@
isisfish.result.datas=Donn\u00E9es
isisfish.result.datasRadioButton=defaultToolTip-fr.ifremer.resultat.ResultatEdit.donneeRadioButton
isisfish.result.desktopPane=defaultToolTip-fr.ifremer.resultat.ResultatView.desktopPane
-isisfish.result.dimension\ =Dimension
+isisfish.result.dimension=Dimension
isisfish.result.end.simulation=En fin de Simulation\:
isisfish.result.export=Export
isisfish.result.export.file=Exporter text file
@@ -894,8 +871,8 @@
isisfish.strategyMonthInfo.proportion=Proportion
isisfish.strategyMonthInfo.title=StrategyMonthInfo
isisfish.strategyMonthInfo.toString=%1$s %2$s
-isisfish.timeUnit.day=Day
-isisfish.timeUnit.hours=Hours
+isisfish.timeUnit.day=Jour
+isisfish.timeUnit.hours=Heures
isisfish.tray.simulation=Isis-fish - %1$s \: %2$s/%3$s
isisfish.tray.simulation.no=Isis-fish - Pas de simulation
isisfish.tripType.comments=Commentaires
@@ -937,7 +914,35 @@
isisfish.vcs.updateconfirm.ok=confirmer
isisfish.vcs.updateconfirm.tooltip.checkAll=(D\u00E9-)S\u00E9lectionner tous les scripts que vous voulez traiter
isisfish.vcs.updaterepository.confirm=Votre d\u00E9p\u00F4t des scripts n'est pas \u00E0 jour.\nVoulez-vous mettre \u00E0 jour votre d\u00E9p\u00F4t ?\n\nLes fichiers modifi\u00E9s sont \:\n%s
-isisfish.versionStorage.removed=Surim\u00E9
+isisfish.vcs.vcssvn.add.error=Can't add file
+isisfish.vcs.vcssvn.add.errorreadonly=You can't add file, this repository is readonly
+isisfish.vcs.vcssvn.checkProtocol.error=Can't get address on serveur of local repository
+isisfish.vcs.vcssvn.checkProtocol.relocate=Relocate repository %s from %s to %s
+isisfish.vcs.vcssvn.checkout.error=Checkout impossible
+isisfish.vcs.vcssvn.commit.error=Impossible de commiter
+isisfish.vcs.vcssvn.commit.errorreadonly=Vous ne pouvez pas commiter, le d\u00E9p\u00F4t est en lecture seule
+isisfish.vcs.vcssvn.delete.error=Impossible de supprimer des fichiers
+isisfish.vcs.vcssvn.delete.errorreadonly=Vous ne pouvez pas supprimer ce fichier, le d\u00E9p\u00F4t est en lecture seule
+isisfish.vcs.vcssvn.diff.error=Impossible d'obtenir le diff
+isisfish.vcs.vcssvn.gettag.error=Erreur lors de la r\u00E9cup\u00E9ration de l'adresse du d\u00E9p\u00F4t local
+isisfish.vcs.vcssvn.getupdate.error=Impossible d'obtenir le statut des fichiers
+isisfish.vcs.vcssvn.global.filelocalandremotestatus=Le statut du fichier %s est (l\:%s/d\:%s)
+isisfish.vcs.vcssvn.global.filestatus=Le statut de %s est %s
+isisfish.vcs.vcssvn.global.foundUpdatedFile=Ajout de %s comme fichier mis \u00E0 jour
+isisfish.vcs.vcssvn.global.torevision=\u00C0 la r\u00E9vision \: %d
+isisfish.vcs.vcssvn.isconnected.switchoff=Impossible de se connecter au serveur, passage en mode d\u00E9connect\u00E9 \: %s
+isisfish.vcs.vcssvn.isconnected.switchto=Connexion au serveur disponible, passage en mode connect\u00E9 \: %s
+isisfish.vcs.vcssvn.isonremote.error=Le fichier %s n'est pas sur le serveur
+isisfish.vcs.vcssvn.istag.notexist=Le tag %s n'existe pas
+isisfish.vcs.vcssvn.isuptodate.error=Impossible d'obtenir le statut de fichier
+isisfish.vcs.vcssvn.list.error=Impossible de lister
+isisfish.vcs.vcssvn.localstatus.error=Impossible d'obtenir le statut local de fichier
+isisfish.vcs.vcssvn.remotestatus.error=Impossible d'obtenir le statut distant de fichier
+isisfish.vcs.vcssvn.setTag.error=Erreur lors de la r\u00E9cup\u00E9ration de l'adresse du d\u00E9p\u00F4t local
+isisfish.vcs.vcssvn.settag.switchfromto=Switch du tag du d\u00E9p\u00F4t de %s \u00E0 %s
+isisfish.vcs.vcssvn.update.error=Impossible de mettre \u00E0 jour
+isisfish.vcs.vcssvn.update.notinlocal=Impossible de mettre \u00E0 jour des fichiers qui ne sont pas pas dans le d\u00E9p\u00F4t
+isisfish.versionStorage.removed=Supprim\u00E9
isisfish.vesselType.activityRange=Intervalle d'activit\u00E9
isisfish.vesselType.comments=Commentaires
isisfish.vesselType.fuelCost=Co\u00FBt d'un trajet en fuel
@@ -946,7 +951,7 @@
isisfish.vesselType.miniCrew=Taille minimale d'\u00E9quipage
isisfish.vesselType.name=Nom
isisfish.vesselType.speed=Vitesse
-isisfish.welcome.menu.about=A propos
+isisfish.welcome.menu.about=\u00C0 propos
isisfish.welcome.menu.close=Fermer
isisfish.welcome.menu.configuration=Configuration
isisfish.welcome.menu.file=Fichier
@@ -961,7 +966,7 @@
isisfish.welcome.menu.synchro=Synchronisation Serveur
isisfish.welcome.menu.vcs.configuration=Configuration vcs
isisfish.welcome.title=Simulation Ifremer
-isisfish.wizardGroupCreation.allGroupsSameSize=Tous les groupes ont la meme taille
+isisfish.wizardGroupCreation.allGroupsSameSize=Tous les groupes ont la m\u00EAme taille
isisfish.wizardGroupCreation.allValues=Input all the values
isisfish.wizardGroupCreation.computedGrowthCurve=Calcul\u00E9 par une courbe de croissance
isisfish.wizardGroupCreation.firstAge=Premier age
@@ -987,12 +992,5 @@
isisfish.zone.comments=Commentaires
isisfish.zone.name=Nom
not\ started=
-observe.message.quit.edit=
-observe.message.title=
region\ already\ exists\ %s\ use\ 'force'\ argument\ to\ force\ overwrite=
-repository\ host\ change\ from\ %s\ to\ %s=
-repository\ protocol\ change\ from\ %s\ to\ %s=
-repository\ user\ change\ from\ %s\ to\ %s=
simulate\ %s\ with\ file\ %s=
-status\ for\ %s\ is\ %s=Le statut du fichier %s est %s
-to\ revision\ %d=\u00C0 la r\u00E9vision %d
1
0
r1659 - isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/widget/editor
by sletellier@users.labs.libre-entreprise.org 11 Dec '08
by sletellier@users.labs.libre-entreprise.org 11 Dec '08
11 Dec '08
Author: sletellier
Date: 2008-12-11 15:35:31 +0000 (Thu, 11 Dec 2008)
New Revision: 1659
Modified:
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/widget/editor/ParameterColumnEditor.java
Log:
StopEditing work
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/widget/editor/ParameterColumnEditor.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/widget/editor/ParameterColumnEditor.java 2008-12-10 16:49:59 UTC (rev 1658)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/widget/editor/ParameterColumnEditor.java 2008-12-11 15:35:31 UTC (rev 1659)
@@ -33,6 +33,8 @@
import java.awt.Component;
import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.FocusEvent;
import java.util.ArrayList;
import java.util.EventObject;
import java.util.HashSet;
@@ -60,6 +62,8 @@
import fr.ifremer.isisfish.types.Date;
import fr.ifremer.isisfish.types.Month;
import fr.ifremer.isisfish.util.ConverterUtil;
+import java.awt.event.ActionListener;
+import java.awt.event.FocusListener;
/**
* @author poussin
@@ -156,7 +160,9 @@
type = (Class)p.getValue();
JComboBox c;
//if (!table.hasFocus()) return null;
-
+
+
+
TypeClassMapping mapping = TypeClassMapping.getMapping(type);
switch (mapping) {
case Topia:
@@ -201,11 +207,48 @@
default:
editor = new JTextField(value.toString());
}
+ if (editor != null){
+ if(JComboBox.class.isInstance(editor)){
+ ((JComboBox)editor).addActionListener(getComboListener());
+ }
+ else if (JTextField.class.isInstance(editor)){
+ ((JTextField)editor).addFocusListener(new FocusListener() {
+
+ @Override
+ public void focusGained(FocusEvent e) {
+
+ }
+
+ @Override
+ public void focusLost(FocusEvent e) {
+ stopCellEditing();
+ }
+ });
+ }
+ else if (DateComponent.class.isInstance(editor)){
+ DateComponent date = ((DateComponent)editor);
+ if (date.getMounthCombo() != null){
+ date.getMounthCombo().addActionListener(getComboListener());
+ }
+ if (date.getYearCombo() != null){
+ date.getYearCombo().addActionListener(getComboListener());
+ }
+ }
+ }
log.info("getCellEditorValue [" + type + "] [mapping:" + mapping + "="+editor);
//+ editor==null?null:editor.getClass().getSimpleName());
return editor;
}
+ protected ActionListener getComboListener(){
+ return new ActionListener() {
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ stopCellEditing();
+ }
+ };
+ }
+
public Object getCellEditorValue() {
Object result = null;
@@ -297,6 +340,7 @@
* @see javax.swing.CellEditor#cancelCellEditing()
*/
public void cancelCellEditing() {
+ log.debug("cancelCellEditing");
ChangeEvent e = new ChangeEvent(this);
for (CellEditorListener listener : listeners) {
listener.editingCanceled(e);
@@ -337,6 +381,7 @@
*/
public boolean stopCellEditing() {
// to prevent concurent modification exception
+ log.debug("stopCellEditing");
CellEditorListener[] list = listeners
.toArray(new CellEditorListener[listeners.size()]);
@@ -365,6 +410,13 @@
this.add(this.year);
}
+ public JComboBox getYearCombo(){
+ return year;
+ }
+ public JComboBox getMounthCombo(){
+ return mounth;
+ }
+
public int getSelectedMounth() {
return mounth.getSelectedIndex();
}
1
0
r1658 - isis-fish/trunk/src/main/resources/i18n
by sletellier@users.labs.libre-entreprise.org 10 Dec '08
by sletellier@users.labs.libre-entreprise.org 10 Dec '08
10 Dec '08
Author: sletellier
Date: 2008-12-10 16:49:59 +0000 (Wed, 10 Dec 2008)
New Revision: 1658
Modified:
isis-fish/trunk/src/main/resources/i18n/isis-fish-en_GB.properties
isis-fish/trunk/src/main/resources/i18n/isis-fish-fr_FR.properties
Log:
Debug vol3
Modified: isis-fish/trunk/src/main/resources/i18n/isis-fish-en_GB.properties
===================================================================
--- isis-fish/trunk/src/main/resources/i18n/isis-fish-en_GB.properties 2008-12-10 16:49:33 UTC (rev 1657)
+++ isis-fish/trunk/src/main/resources/i18n/isis-fish-en_GB.properties 2008-12-10 16:49:59 UTC (rev 1658)
@@ -987,6 +987,8 @@
isisfish.zone.comments=Comments
isisfish.zone.name=Name
not\ started=
+observe.message.quit.edit=
+observe.message.title=
region\ already\ exists\ %s\ use\ 'force'\ argument\ to\ force\ overwrite=
repository\ host\ change\ from\ %s\ to\ %s=
repository\ protocol\ change\ from\ %s\ to\ %s=
Modified: isis-fish/trunk/src/main/resources/i18n/isis-fish-fr_FR.properties
===================================================================
--- isis-fish/trunk/src/main/resources/i18n/isis-fish-fr_FR.properties 2008-12-10 16:49:33 UTC (rev 1657)
+++ isis-fish/trunk/src/main/resources/i18n/isis-fish-fr_FR.properties 2008-12-10 16:49:59 UTC (rev 1658)
@@ -987,6 +987,8 @@
isisfish.zone.comments=Commentaires
isisfish.zone.name=Nom
not\ started=
+observe.message.quit.edit=
+observe.message.title=
region\ already\ exists\ %s\ use\ 'force'\ argument\ to\ force\ overwrite=
repository\ host\ change\ from\ %s\ to\ %s=
repository\ protocol\ change\ from\ %s\ to\ %s=
1
0
r1657 - isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input
by sletellier@users.labs.libre-entreprise.org 10 Dec '08
by sletellier@users.labs.libre-entreprise.org 10 Dec '08
10 Dec '08
Author: sletellier
Date: 2008-12-10 16:49:33 +0000 (Wed, 10 Dec 2008)
New Revision: 1657
Added:
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/InputContent.java
Modified:
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/CellUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/EffortDescriptionUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/FisheryRegionUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/GearTabUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/GearUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/InputAction.java
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/InputNavigationTreeSelectionAdapter.java
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/MetierSeasonInfoSpeciesUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/MetierSeasonInfoZoneUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/MetierTabUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/MetierUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationBasicsUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationCapturabilityUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationEquationUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationGroupUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationMigrationEmigrationUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationMigrationEquationUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationMigrationImmigrationUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationMigrationMigrationUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationMigrationUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationOneEquationUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationRecruitmentUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationSeasonsUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationZonesUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PortUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/SelectivityUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/SetOfVesselsTabsUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/SetOfVesselsUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/SpeciesUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/StrategyMonthInfoUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/StrategyOneMonthInfoUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/StrategyTabUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/StrategyUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/TripTypeUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/VesselTypeUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/ZoneUI.jaxx
Log:
Debug vol3
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/CellUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/CellUI.jaxx 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/CellUI.jaxx 2008-12-10 16:49:33 UTC (rev 1657)
@@ -34,7 +34,13 @@
<!--
+ Cell
+-->
-<Table>
+<Table implements='InputContent'>
+
+ <!-- ui state when the activite is active -->
+ <Boolean id='actif' javaBean='false'/>
+
+ <Boolean id='changed' javaBean='false'/>
+
<script><![CDATA[
import fr.ifremer.isisfish.entities.Cell;
import com.bbn.openmap.gui.OMToolSet;
@@ -47,13 +53,12 @@
protected IsisMapBean cellMap = new IsisMapBean();
protected OpenMapToolPanel toolMap = new OpenMapToolPanel();
protected OMToolSet toolSet = new OMToolSet();
- protected boolean changed = false;
public CellUI (InputAction action){
setContextValue(action);
}
- protected void refresh() {
+ public void refresh() {
Cell cell = getContextValue(InputAction.class).getCell();
DefaultComboBoxModel fieldCellModel = new DefaultComboBoxModel();
java.util.List<Cell> cells = getContextValue(InputAction.class).getFisheryRegion().getCell();
@@ -92,15 +97,17 @@
}
}
protected void save(){
- TopiaEntity topia = getContextValue(InputAction.class).save("Cell");
+ TopiaEntity topia = getContextValue(InputAction.class).save();
getParentContainer(InputUI.class).setTreeSelection("$root/$cells/"+topia.getTopiaId());
setInfoText(_("isisfish.message.save.finished"));
refresh();
}
protected void cancel(){
- getContextValue(InputAction.class).cancel("Cell");
+ TopiaEntity topia = getContextValue(InputAction.class).cancel("Cell");
+ valueChanged(false);
+ refresh();
+ getParentContainer(InputUI.class).setTreeSelection("$root/$cells/"+topia.getTopiaId());
setInfoText(_("isisfish.message.cancel.finished"));
- refresh();
}
protected void goToZone(){
getParentContainer(InputUI.class).setTreeSelection("$root/$zones");
@@ -145,59 +152,59 @@
<Table>
<row>
<cell fill='horizontal' columns='2' weightx='1.0'>
- <JComboBox id="fieldCell" onActionPerformed='fieldCellChanged()'/>
+ <JComboBox id="fieldCell" onActionPerformed='fieldCellChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell>
- <JLabel text="isisfish.cell.name"/>
+ <JLabel text="isisfish.cell.name" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JTextField id="fieldCellName" onKeyTyped='valueChanged(true)' onFocusLost='nameChanged()'/>
+ <JTextField id="fieldCellName" onKeyTyped='valueChanged(true)' onFocusLost='nameChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell>
- <JLabel text="isisfish.cell.latitude"/>
+ <JLabel text="isisfish.cell.latitude" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JTextField id="fieldCellLatitude" editable="false"/>
+ <JTextField id="fieldCellLatitude" editable="false" enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell>
- <JLabel text="isisfish.cell.longitude"/>
+ <JLabel text="isisfish.cell.longitude" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JTextField id="fieldCellLongitude" editable="false"/>
+ <JTextField id="fieldCellLongitude" editable="false" enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell>
- <JLabel text="isisfish.cell.land"/>
+ <JLabel text="isisfish.cell.land" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JCheckBox id="fieldCellLand" onActionPerformed='cellLandChanged()'/>
+ <JCheckBox id="fieldCellLand" onActionPerformed='cellLandChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell columns='2' fill='horizontal'>
- <JLabel text="isisfish.cell.comments"/>
+ <JLabel text="isisfish.cell.comments" enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell columns='2' fill='both' weighty='1.0' weightx='1.0'>
<JScrollPane>
- <JTextArea id="fieldCellComment" onKeyTyped='valueChanged(true)' onFocusLost='commentChanged()'/>
+ <JTextArea id="fieldCellComment" onKeyTyped='valueChanged(true)' onFocusLost='commentChanged()' enabled='{isActif()}'/>
</JScrollPane>
</cell>
</row>
<row>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='save' text="isisfish.common.save" enabled='false' onActionPerformed='save()'/>
+ <JButton id='save' text="isisfish.common.save" onActionPerformed='save()' enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='cancel' text="isisfish.common.cancel" enabled='false' onActionPerformed='cancel()'/>
+ <JButton id='cancel' text="isisfish.common.cancel" onActionPerformed='cancel()' enabled='{isActif()}'/>
</cell>
</row>
</Table>
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/EffortDescriptionUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/EffortDescriptionUI.jaxx 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/EffortDescriptionUI.jaxx 2008-12-10 16:49:33 UTC (rev 1657)
@@ -30,7 +30,13 @@
* by : $Author: sletellier $
*/
-->
-<Table>
+<Table implements='InputContent'>
+
+ <!-- ui state when the activite is active -->
+ <Boolean id='actif' javaBean='false'/>
+
+ <Boolean id='changed' javaBean='false'/>
+
<script><![CDATA[
import fr.ifremer.isisfish.entities.EffortDescription;
@@ -40,7 +46,6 @@
import org.codelutin.topia.persistence.TopiaEntity;
import fr.ifremer.isisfish.types.TimeUnit;
- boolean changed = false;
public EffortDescriptionUI (InputAction action){
setContextValue(action);
@@ -107,17 +112,18 @@
fieldEffortDescriptionEffortDescriptionList.setModel(model);
}
protected void save(){
- TopiaEntity topia = getContextValue(InputAction.class).save("SetOfVessles");
+ TopiaEntity topia = getContextValue(InputAction.class).save();
getParentContainer(InputUI.class).setTreeSelection("$root/$setOfVessels/"+topia.getTopiaId());
setInfoText(_("isisfish.message.save.finished"));
refresh();
valueChanged(false);
}
protected void cancel(){
- getContextValue(InputAction.class).cancel("SetOfVessles");
- setInfoText(_("isisfish.message.cancel.finished"));
+ TopiaEntity topia = getContextValue(InputAction.class).cancel("SetOfVessels");
valueChanged(false);
refresh();
+ getParentContainer(InputUI.class).setTreeSelection("$root/$setOfVessels/"+topia.getTopiaId());
+ setInfoText(_("isisfish.message.cancel.finished"));
}
protected void setInfoText(String txt){
WelcomePanelUI root = getParentContainer(WelcomePanelUI.class);
@@ -168,7 +174,6 @@
if (possibleMetier != null){
possibleMetier.setFishingOperation(Integer.parseInt(fieldEffortDescriptionFishingOperation.getText()));
valueChanged(true);
- refresh();
}
}
protected void fishingOperationDurationChanged(){
@@ -176,7 +181,6 @@
if (possibleMetier != null){
possibleMetier.setFishingOperationDuration(new TimeUnit(Double.parseDouble(fieldEffortDescriptionFishingOperationDuration.getText())));
valueChanged(true);
- refresh();
}
}
protected void gearsNumberPerOperationChanged(){
@@ -184,7 +188,6 @@
if (possibleMetier != null){
possibleMetier.setGearsNumberPerOperation(Integer.parseInt(fieldEffortDescriptionGearsNumberPerOperation.getText()));
valueChanged(true);
- refresh();
}
}
protected void descriptionCrewSizeChanged(){
@@ -192,7 +195,6 @@
if (possibleMetier != null){
possibleMetier.setCrewSize(Integer.parseInt(fieldEffortDescriptionCrewSize.getText()));
valueChanged(true);
- refresh();
}
}
protected void costOfFishingChanged(){
@@ -200,7 +202,6 @@
if (possibleMetier != null){
possibleMetier.setUnitCostOfFishing(Double.parseDouble(fieldEffortDescriptionUnitCostOfFishing.getText()));
valueChanged(true);
- refresh();
}
}
protected void fixedCrewSalaryChanged(){
@@ -208,7 +209,6 @@
if (possibleMetier != null){
possibleMetier.setFixedCrewSalary(Double.parseDouble(fieldEffortDescriptionFixedCrewSalary.getText()));
valueChanged(true);
- refresh();
}
}
protected void crewFoodCostChanged(){
@@ -216,7 +216,6 @@
if (possibleMetier != null){
possibleMetier.setCrewFoodCost(Double.parseDouble(fieldEffortDescriptionCrewFoodCost.getText()));
valueChanged(true);
- refresh();
}
}
protected void crewShareRateChanged(){
@@ -224,7 +223,6 @@
if (possibleMetier != null){
possibleMetier.setCrewShareRate(Double.parseDouble(fieldEffortDescriptionCrewShareRate.getText()));
valueChanged(true);
- refresh();
}
}
protected void repairAndMaintenanceGearCostChanged(){
@@ -232,14 +230,12 @@
if (possibleMetier != null){
possibleMetier.setRepairAndMaintenanceGearCost(Double.parseDouble(fieldEffortDescriptionRepairAndMaintenanceGearCost.getText()));
valueChanged(true);
- refresh();
}
}
protected void langdingCostsChanged(){
EffortDescription possibleMetier = getEffortDescription();
if (possibleMetier != null){
possibleMetier.setLandingCosts(Double.parseDouble(fieldEffortDescriptionLandingCosts.getText()));
- refresh();
}
}
protected void otherRunningCostChanged(){
@@ -247,7 +243,6 @@
if (possibleMetier != null){
possibleMetier.setOtherRunningCost(Double.parseDouble(fieldEffortDescriptionOtherRunningCost.getText()));
valueChanged(true);
- refresh();
}
}
]]>
@@ -255,7 +250,7 @@
<row>
<cell columns='2' fill='both' weightx='1.0' weighty='1.0'>
<JScrollPane>
- <JList id="fieldEffortDescriptionMetierList" selectionMode="0"/>
+ <JList id="fieldEffortDescriptionMetierList" selectionMode="0" enabled='{isActif()}'/>
</JScrollPane>
</cell>
</row>
@@ -264,13 +259,13 @@
<Table>
<row>
<cell fill='horizontal' weightx='1.0'>
- <JButton id="buttonEffortDescriptionAdd" text="isisfish.common.add" onActionPerformed='add()'/>
+ <JButton id="buttonEffortDescriptionAdd" text="isisfish.common.add" onActionPerformed='add()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell fill='both' weightx='1.0' weighty='1.0'>
<JScrollPane>
- <JList id="fieldEffortDescriptionEffortDescriptionList" selectionMode="0" onValueChanged='refresh()'/>
+ <JList id="fieldEffortDescriptionEffortDescriptionList" selectionMode="0" onValueChanged='refresh()' enabled='{isActif()}'/>
</JScrollPane>
</cell>
</row>
@@ -280,90 +275,90 @@
<Table>
<row>
<cell anchor='east'>
- <JLabel text="isisfish.effortDescription.fishingOperation"/>
+ <JLabel text="isisfish.effortDescription.fishingOperation" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JTextField id="fieldEffortDescriptionFishingOperation" onKeyTyped='valueChanged(true)' onFocusLost='fishingOperationChanged()'/>
+ <JTextField id="fieldEffortDescriptionFishingOperation" onKeyTyped='valueChanged(true)' onFocusLost='fishingOperationChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell anchor='east'>
- <JLabel text="isisfish.effortDescription.fishingOperationDuration"/>
+ <JLabel text="isisfish.effortDescription.fishingOperationDuration" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JTextField id="fieldEffortDescriptionFishingOperationDuration" onKeyTyped='valueChanged(true)' onFocusLost='fishingOperationDurationChanged()'/>
+ <JTextField id="fieldEffortDescriptionFishingOperationDuration" onKeyTyped='valueChanged(true)' onFocusLost='fishingOperationDurationChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell anchor='east'>
- <JLabel text="isisfish.effortDescription.gearsNumberPerOperation"/>
+ <JLabel text="isisfish.effortDescription.gearsNumberPerOperation" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JTextField id="fieldEffortDescriptionGearsNumberPerOperation" onKeyTyped='valueChanged(true)' onFocusLost='gearsNumberPerOperationChanged()'/>
+ <JTextField id="fieldEffortDescriptionGearsNumberPerOperation" onKeyTyped='valueChanged(true)' onFocusLost='gearsNumberPerOperationChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell anchor='east'>
- <JLabel text="isisfish.effortDescription.crewSize"/>
+ <JLabel text="isisfish.effortDescription.crewSize" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JTextField id="fieldEffortDescriptionCrewSize" onKeyTyped='valueChanged(true)' onFocusLost='descriptionCrewSizeChanged()'/>
+ <JTextField id="fieldEffortDescriptionCrewSize" onKeyTyped='valueChanged(true)' onFocusLost='descriptionCrewSizeChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell anchor='east'>
- <JLabel text="isisfish.effortDescription.unitCostOfFishing"/>
+ <JLabel text="isisfish.effortDescription.unitCostOfFishing" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JTextField id="fieldEffortDescriptionUnitCostOfFishing" onKeyTyped='valueChanged(true)' onFocusLost='costOfFishingChanged()'/>
+ <JTextField id="fieldEffortDescriptionUnitCostOfFishing" onKeyTyped='valueChanged(true)' onFocusLost='costOfFishingChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell anchor='east'>
- <JLabel text="isisfish.effortDescription.fixedCrewSalary"/>
+ <JLabel text="isisfish.effortDescription.fixedCrewSalary" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JTextField id="fieldEffortDescriptionFixedCrewSalary" onKeyTyped='valueChanged(true)' onFocusLost='fixedCrewSalaryChanged()'/>
+ <JTextField id="fieldEffortDescriptionFixedCrewSalary" onKeyTyped='valueChanged(true)' onFocusLost='fixedCrewSalaryChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell anchor='east'>
- <JLabel text="isisfish.effortDescription.crewFoodCost"/>
+ <JLabel text="isisfish.effortDescription.crewFoodCost" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JTextField id="fieldEffortDescriptionCrewFoodCost" onKeyTyped='valueChanged(true)' onFocusLost='crewFoodCostChanged()'/>
+ <JTextField id="fieldEffortDescriptionCrewFoodCost" onKeyTyped='valueChanged(true)' onFocusLost='crewFoodCostChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell anchor='east'>
- <JLabel text="isisfish.effortDescription.crewShareRate"/>
+ <JLabel text="isisfish.effortDescription.crewShareRate" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JTextField id="fieldEffortDescriptionCrewShareRate" onKeyTyped='valueChanged(true)' onFocusLost='crewShareRateChanged()'/>
+ <JTextField id="fieldEffortDescriptionCrewShareRate" onKeyTyped='valueChanged(true)' onFocusLost='crewShareRateChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell anchor='east'>
- <JLabel text="isisfish.effortDescription.repairAndMaintenanceGearCost"/>
+ <JLabel text="isisfish.effortDescription.repairAndMaintenanceGearCost" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JTextField id="fieldEffortDescriptionRepairAndMaintenanceGearCost" onKeyTyped='valueChanged(true)' onFocusLost='repairAndMaintenanceGearCostChanged()'/>
+ <JTextField id="fieldEffortDescriptionRepairAndMaintenanceGearCost" onKeyTyped='valueChanged(true)' onFocusLost='repairAndMaintenanceGearCostChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell anchor='east'>
- <JLabel text="isisfish.effortDescription.landingCosts"/>
+ <JLabel text="isisfish.effortDescription.landingCosts" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JTextField id="fieldEffortDescriptionLandingCosts" onKeyTyped='valueChanged(true)' onFocusLost='langdingCostsChanged()'/>
+ <JTextField id="fieldEffortDescriptionLandingCosts" onKeyTyped='valueChanged(true)' onFocusLost='langdingCostsChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell anchor='east'>
- <JLabel text="isisfish.effortDescription.otherRunningCost"/>
+ <JLabel text="isisfish.effortDescription.otherRunningCost" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JTextField id="fieldEffortDescriptionOtherRunningCost" onKeyTyped='valueChanged(true)' onFocusLost='otherRunningCostChanged()'/>
+ <JTextField id="fieldEffortDescriptionOtherRunningCost" onKeyTyped='valueChanged(true)' onFocusLost='otherRunningCostChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
@@ -371,13 +366,13 @@
<Table>
<row>
<cell fill='horizontal' weightx='0.3'>
- <JButton id='save' enabled='false' text="isisfish.common.save" onActionPerformed='save()'/>
+ <JButton id='save' text="isisfish.common.save" onActionPerformed='save()' enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.3'>
- <JButton id='cancel' enabled='false' text="isisfish.common.cancel" onActionPerformed='cancel()'/>
+ <JButton id='cancel' text="isisfish.common.cancel" onActionPerformed='cancel()' enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.3'>
- <JButton id='remove' text="isisfish.common.remove" onActionPerformed='remove()'/>
+ <JButton id='remove' text="isisfish.common.remove" onActionPerformed='remove()' enabled='{isActif()}'/>
</cell>
</row>
</Table>
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/FisheryRegionUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/FisheryRegionUI.jaxx 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/FisheryRegionUI.jaxx 2008-12-10 16:49:33 UTC (rev 1657)
@@ -33,7 +33,13 @@
<!--
+ FisheryRegion
+-->
-<JPanel id="inputFisheryRegion" layout='{new BorderLayout()}'>
+<Table id="inputFisheryRegion" implements='InputContent'>
+
+ <!-- ui state when the activite is active -->
+ <Boolean id='actif' javaBean='false'/>
+
+ <Boolean id='changed' javaBean='false'/>
+
<script>
<![CDATA[
import fr.ifremer.isisfish.entities.FisheryRegion;
@@ -42,7 +48,6 @@
import fr.ifremer.isisfish.map.OpenMapToolPanel;
import fr.ifremer.isisfish.ui.WelcomePanelUI;
- protected boolean changed = false;
protected FisheryRegion region = null;
protected IsisMapBean cellMap = null;
protected OpenMapToolPanel toolMap = new OpenMapToolPanel();
@@ -88,7 +93,6 @@
fieldMapfiles.setModel(model);
}
protected void valueChanged(boolean b){
- jaxx.runtime.Util.assignment(changed = b, "changed", fr.ifremer.isisfish.ui.input.FisheryRegionUI.this);
save.setEnabled(b);
cancel.setEnabled(b);
}
@@ -141,7 +145,6 @@
}
protected void commentChanged(){
region.setComment(fieldComment.getText());
- refreshMap();
}
protected void cellFillChanged(){
}
@@ -159,7 +162,9 @@
}
protected void cancel(){
getContextValue(InputAction.class).cancel("FisheryRegion");
- valueChanged(false);
+ valueChanged(false);
+ refresh();
+ getParentContainer(InputUI.class).setTreeSelection("$root");
}
protected void check(){
getContextValue(InputAction.class).checkFisheryRegion();
@@ -173,216 +178,157 @@
}
]]>
</script>
- <JSplitPane id="FisheryRegionTab" name="FisheryRegion"
- oneTouchExpandable="true" dividerLocation="200" orientation="HORIZONTAL" constraints='BorderLayout.CENTER'>
- <Table>
- <!-- Widget -->
- <row>
- <cell columns='3'>
- <JLabel text="isisfish.fisheryRegion.name"/>
- </cell>
- </row>
- <row>
- <cell columns='3' fill='horizontal' weightx='1.0'>
- <JTextField id="fieldRegion" onKeyTyped='valueChanged(true)' onFocusLost='regionChanged()'/>
-<!-- Fixme : DocumentEvents
-origin="$RegionStorage/name"
-<DocumentEvents id="updateRegion" onChangedUpdate="Update($fieldRegion/text)"/>
--->
- </cell>
- </row>
- <row>
- <cell columns='3'>
- <JLabel text="isisfish.fisheryRegion.area"/>
- </cell>
- </row>
- <row>
- <cell>
- <JLabel text="isisfish.fisheryRegion.latitude.min"/>
- </cell>
- <cell columns='2' fill='horizontal' weightx='1.0'>
- <JTextField id="fieldLatMin" onKeyTyped='valueChanged(true)' onFocusLost='latMinChanged()'/>
-<!-- Fixme : DocumentEvents
-origin="$FisheryRegion/minLatitude"
-<DocumentEvents onModified="Update($fieldLatMin/text)"/>
--->
- </cell>
- </row>
- <row>
- <cell>
- <JLabel text="isisfish.fisheryRegion.latitude.max"/>
- </cell>
- <cell columns='2' fill='horizontal' weightx='1.0'>
- <JTextField id="fieldLatMax" onKeyTyped='valueChanged(true)' onFocusLost='latMaxChanged()'/>
-<!-- Fixme : DocumentEvents
-origin="$FisheryRegion/maxLatitude"
-<DocumentEvents onModified="Update($fieldLatMax/text)"/>
--->
- </cell>
- </row>
- <row>
- <cell>
- <JLabel text="isisfish.fisheryRegion.longitude.min"/>
- </cell>
- <cell columns='2' fill='horizontal' weightx='1.0'>
- <JTextField id="fieldLongMin" onKeyTyped='valueChanged(true)' onFocusLost='longMinChanged()'/>
-<!-- Fixme : DocumentEvents
-origin="$FisheryRegion/minLongitude"
-<DocumentEvents onModified="Update($fieldLongMin/text)"/>
--->
- </cell>
- </row>
- <row>
- <cell>
- <JLabel text="isisfish.fisheryRegion.longitude.max"/>
- </cell>
- <cell columns='2' fill='horizontal' weightx='1.0'>
- <JTextField id="fieldLongMax" onKeyTyped='valueChanged(true)' onFocusLost='longMaxChanged()'/>
-<!-- Fixme : DocumentEvents
-origin="$FisheryRegion/maxLongitude"
-<DocumentEvents onModified="Update($fieldLongMax/text)"/>
--->
- </cell>
- </row>
- <row>
- <cell columns='3'>
- <JLabel text="isisfish.fisheryRegion.spatial"/>
- </cell>
- </row>
- <row>
- <cell>
- <JLabel text="isisfish.fisheryRegion.latitude"/>
- </cell>
- <cell columns='2' fill='horizontal' weightx='1.0'>
- <JTextField id="fieldCellLengthLatitude" onKeyTyped='valueChanged(true)' onFocusLost='cellLenghtLatChanged()'/>
-<!-- Fixme : DocumentEvents
-origin="$FisheryRegion/cellLengthLatitude"
-<DocumentEvents onModified="Update($fieldCellLengthLatitude/text)"/>
--->
- </cell>
- </row>
- <row>
- <cell>
- <JLabel text="isisfish.fisheryRegion.longitude"/>
- </cell>
- <cell columns='2' fill='horizontal' weightx='1.0'>
- <JTextField id="fieldCellLengthLongitude" onKeyTyped='valueChanged(true)' onFocusLost='cellLenghtLongChanged()'/>
-<!-- Fixme : DocumentEvents
-origin="$FisheryRegion/cellLengthLongitude"
-<DocumentEvents onModified="Update($fieldCellLengthLongitude/text)"/>
--->
- </cell>
- </row>
- <row>
- <cell columns='3' fill='both' weightx='1.0' weighty='0.6'>
- <JScrollPane>
- <JList id="fieldMapfiles" onMouseClicked='mapFieldChanged()'/>
- <!-- Fixme : ListModel
- <ListModel origin="$FisheryRegion/mapFileList"/>
- -->
- </JScrollPane>
- </cell>
- </row>
- <row>
- <cell columns='3' fill='horizontal' weightx='1.0'>
- <Table>
- <row>
- <cell fill='horizontal' weightx='0.5'>
- <JButton id="buttonAddMap" text="isisfish.fisheryRegion.addMap" onActionPerformed='addMap()'/>
-<!--
-actionCommand="input.InputFisheryRegion.addMap($FisheryRegion, $fieldMapfiles)"
--->
- </cell>
- <cell fill='horizontal' weightx='0.5'>
- <JButton id="buttonRemoveMap" text="isisfish.fisheryRegion.delMap" onActionPerformed='delMap()'/>
-<!--
-actionCommand="input.InputFisheryRegion.removeMap($FisheryRegion, $fieldMapfiles)"
--->
- </cell>
- </row>
- </Table>
- </cell>
- </row>
- <row>
- <cell columns='3'>
- <JLabel text="isisfish.fisheryRegion.comments"/>
- </cell>
- </row>
- <row>
- <cell columns='3' fill='both' weightx='1.0' weighty='0.4'>
- <JScrollPane>
- <JTextArea id="fieldComment" onKeyTyped='valueChanged(true)' onFocusLost='commentChanged()'/>
-<!-- Fixme : DocumentEvents
-origin="$FisheryRegion/comment"
-<DocumentEvents onModified="Update($fieldComment/text)"/>
--->
- </JScrollPane>
- </cell>
- </row>
- <row>
- <cell columns='3'>
- <JLabel text="isisfish.fisheryRegion.selectFile"/>
- </cell>
- </row>
- <row>
- <cell columns='3'>
- <JLabel text="isisfish.fisheryRegion.ofCells"/>
- </cell>
- </row>
- <row>
- <cell columns='3' fill='horizontal' weightx='1.0'>
- <Table>
- <row>
- <cell columns='4' fill='horizontal' weightx='1.0'>
- <JTextField id="fieldCellFile" onKeyTyped='valueChanged(true)' onFocusLost='cellFillChanged()'/>
- </cell>
- <cell>
- <JButton id="buttonCellFile" text="isisfish.common.ellipsis" onActionPerformed='cellFile()'/>
-<!--
-actionCommand="input.InputFisheryRegion.loadCellFile($fieldCellFile)"
--->
- </cell>
- </row>
- </Table>
- </cell>
- </row>
- <row>
- <cell fill='horizontal' weightx='0.3'>
- <JButton id='save' enabled='false' text="isisfish.common.save" onActionPerformed='save()'/>
-<!--
-origin="$EntityModified"
-actionCommand='thread:input.InputFisheryRegion.save("FisheryRegion", $FisheryRegion);refreshView($inputFisheryRegion)'
--->
- </cell>
- <cell fill='horizontal' weightx='0.3'>
- <JButton id='cancel' enabled='false' text="isisfish.common.cancel" onActionPerformed='cancel()'/>
-<!--
-origin="$EntityModified"
-actionCommand='input.Input.cancel("FisheryRegion", $FisheryRegion);refreshView($inputFisheryRegion)'
--->
- </cell>
- <cell fill='horizontal' weightx='0.3'>
- <JButton id='check' text="isisfish.common.check" onActionPerformed='check()'/>
-<!--
-actionCommand='thread:input.InputFisheryRegion.check($FisheryRegion)'
--->
- </cell>
- </row>
- </Table>
- <JPanel id="fisheryRegionMapPanel" layout='{new BorderLayout()}'>
-<!--
- <OpenMapToolPanel constraints='"BorderLayout.NORTH"' id="fisheryRegionMapTool">
- <OpenMapToolSet id="fisheryRegionMapToolSet" origin="$fisheryRegionMap"/>
- </OpenMapToolPanel>
- <OpenMap id="fisheryRegionMap" origin="$FisheryRegion"
- selectionMode="0">
- <OpenMapEvents id="fisheryRegionMapEvents" mouseMode="Nav"/>
- </OpenMap>
--->
- </JPanel>
- </JSplitPane>
- <JButton text="isisfish.input.continueCells" constraints='BorderLayout.SOUTH' onActionPerformed='goToCell()'/>
-<!--
- actionCommand="UIHelper.setTreeSelection('Cells')"
--->
-</JPanel>
+
+ <row>
+ <cell fill='both' weightx='1.0' weighty='1.0'>
+ <JSplitPane id="FisheryRegionTab" name="FisheryRegion"
+ oneTouchExpandable="true" dividerLocation="200" orientation="HORIZONTAL">
+ <Table>
+ <!-- Widget -->
+ <row>
+ <cell columns='3'>
+ <JLabel text="isisfish.fisheryRegion.name"/>
+ </cell>
+ </row>
+ <row>
+ <cell columns='3' fill='horizontal' weightx='1.0'>
+ <JTextField id="fieldRegion" onKeyTyped='valueChanged(true)' onFocusLost='regionChanged()'/>
+ </cell>
+ </row>
+ <row>
+ <cell columns='3'>
+ <JLabel text="isisfish.fisheryRegion.area"/>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JLabel text="isisfish.fisheryRegion.latitude.min"/>
+ </cell>
+ <cell columns='2' fill='horizontal' weightx='1.0'>
+ <JTextField id="fieldLatMin" onKeyTyped='valueChanged(true)' onFocusLost='latMinChanged()'/>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JLabel text="isisfish.fisheryRegion.latitude.max"/>
+ </cell>
+ <cell columns='2' fill='horizontal' weightx='1.0'>
+ <JTextField id="fieldLatMax" onKeyTyped='valueChanged(true)' onFocusLost='latMaxChanged()'/>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JLabel text="isisfish.fisheryRegion.longitude.min"/>
+ </cell>
+ <cell columns='2' fill='horizontal' weightx='1.0'>
+ <JTextField id="fieldLongMin" onKeyTyped='valueChanged(true)' onFocusLost='longMinChanged()'/>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JLabel text="isisfish.fisheryRegion.longitude.max"/>
+ </cell>
+ <cell columns='2' fill='horizontal' weightx='1.0'>
+ <JTextField id="fieldLongMax" onKeyTyped='valueChanged(true)' onFocusLost='longMaxChanged()'/>
+ </cell>
+ </row>
+ <row>
+ <cell columns='3'>
+ <JLabel text="isisfish.fisheryRegion.spatial"/>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JLabel text="isisfish.fisheryRegion.latitude"/>
+ </cell>
+ <cell columns='2' fill='horizontal' weightx='1.0'>
+ <JTextField id="fieldCellLengthLatitude" onKeyTyped='valueChanged(true)' onFocusLost='cellLenghtLatChanged()'/>
+ </cell>
+ </row>
+ <row>
+ <cell>
+ <JLabel text="isisfish.fisheryRegion.longitude"/>
+ </cell>
+ <cell columns='2' fill='horizontal' weightx='1.0'>
+ <JTextField id="fieldCellLengthLongitude" onKeyTyped='valueChanged(true)' onFocusLost='cellLenghtLongChanged()'/>
+ </cell>
+ </row>
+ <row>
+ <cell columns='3' fill='both' weightx='1.0' weighty='0.6'>
+ <JScrollPane>
+ <JList id="fieldMapfiles" onMouseClicked='mapFieldChanged()'/>
+ </JScrollPane>
+ </cell>
+ </row>
+ <row>
+ <cell columns='3' fill='horizontal' weightx='1.0'>
+ <Table>
+ <row>
+ <cell fill='horizontal' weightx='0.5'>
+ <JButton id="buttonAddMap" text="isisfish.fisheryRegion.addMap" onActionPerformed='addMap()'/>
+ </cell>
+ <cell fill='horizontal' weightx='0.5'>
+ <JButton id="buttonRemoveMap" text="isisfish.fisheryRegion.delMap" onActionPerformed='delMap()'/>
+ </cell>
+ </row>
+ </Table>
+ </cell>
+ </row>
+ <row>
+ <cell columns='3'>
+ <JLabel text="isisfish.fisheryRegion.comments"/>
+ </cell>
+ </row>
+ <row>
+ <cell columns='3' fill='both' weightx='1.0' weighty='0.4'>
+ <JScrollPane>
+ <JTextArea id="fieldComment" onKeyTyped='valueChanged(true)' onFocusLost='commentChanged()'/>
+ </JScrollPane>
+ </cell>
+ </row>
+ <row>
+ <cell columns='3'>
+ <JLabel text="isisfish.fisheryRegion.selectFile"/>
+ </cell>
+ </row>
+ <row>
+ <cell columns='3'>
+ <JLabel text="isisfish.fisheryRegion.ofCells"/>
+ </cell>
+ </row>
+ <row>
+ <cell columns='3' fill='horizontal' weightx='1.0'>
+ <Table>
+ <row>
+ <cell columns='4' fill='horizontal' weightx='1.0'>
+ <JTextField id="fieldCellFile" onKeyTyped='valueChanged(true)' onFocusLost='cellFillChanged()'/>
+ </cell>
+ <cell>
+ <JButton id="buttonCellFile" text="isisfish.common.ellipsis" onActionPerformed='cellFile()'/>
+ </cell>
+ </row>
+ </Table>
+ </cell>
+ </row>
+ <row>
+ <cell fill='horizontal' weightx='0.3'>
+ <JButton id='save' enabled='false' text="isisfish.common.save" onActionPerformed='save()'/>
+ </cell>
+ <cell fill='horizontal' weightx='0.3'>
+ <JButton id='cancel' enabled='false' text="isisfish.common.cancel" onActionPerformed='cancel()'/>
+ </cell>
+ <cell fill='horizontal' weightx='0.3'>
+ <JButton id='check' text="isisfish.common.check" onActionPerformed='check()'/>
+ </cell>
+ </row>
+ </Table>
+ <JPanel id="fisheryRegionMapPanel" layout='{new BorderLayout()}'/>
+ </JSplitPane>
+ </cell>
+ </row>
+ <row>
+ <cell fill='horizontal' weightx='1.0'>
+ <JButton text="isisfish.input.continueCells" onActionPerformed='goToCell()'/>
+ </cell>
+ </row>
+</Table>
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/GearTabUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/GearTabUI.jaxx 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/GearTabUI.jaxx 2008-12-10 16:49:33 UTC (rev 1657)
@@ -30,19 +30,24 @@
* by : $Author: sletellier $
*/
-->
-<Table>
+<Table implements='InputContent'>
+
+ <!-- ui state when the activite is active -->
+ <Boolean id='actif' javaBean='false'/>
+
+ <Boolean id='changed' javaBean='false'/>
+
<script><![CDATA[
import fr.ifremer.isisfish.entities.Gear;
import fr.ifremer.isisfish.ui.WelcomePanelUI;
import org.codelutin.topia.persistence.TopiaEntity;
import org.codelutin.topia.TopiaException;
- protected boolean changed = false;
public GearTabUI (InputAction action){
setContextValue(action);
}
- protected void refresh() {
+ public void refresh() {
Gear gear = getContextValue(InputAction.class).getGear();
if (gear != null){
fieldGearName.setText(gear.getName());
@@ -76,7 +81,7 @@
setInfoText(_("isisfish.message.creation.finished"));
}
protected void save(){
- TopiaEntity topia = getContextValue(InputAction.class).save("Gear");
+ TopiaEntity topia = getContextValue(InputAction.class).save();
getParentContainer(InputUI.class).setTreeModel();
getParentContainer(InputUI.class).setTreeSelection("$root/$gears/"+topia.getTopiaId());
setInfoText(_("isisfish.message.save.finished"));
@@ -84,10 +89,11 @@
valueChanged(false);
}
protected void cancel(){
- getContextValue(InputAction.class).cancel("Gear");
- setInfoText(_("isisfish.message.cancel.finished"));
+ TopiaEntity topia = getContextValue(InputAction.class).cancel("Gear");
valueChanged(false);
refresh();
+ getParentContainer(InputUI.class).setTreeSelection("$root/$gears/"+topia.getTopiaId());
+ setInfoText(_("isisfish.message.cancel.finished"));
}
protected void remove(){
setInfoText(getContextValue(InputAction.class).remove());
@@ -139,54 +145,54 @@
<Table>
<row>
<cell fill='horizontal' anchor='east'>
- <JLabel text="isisfish.gear.name"/>
+ <JLabel text="isisfish.gear.name" enabled='{isActif()}'/>
</cell>
<cell columns="2" fill='horizontal' weightx='1.0'>
- <JTextField id="fieldGearName" onKeyTyped='valueChanged(true)' onFocusLost='nameChanged()'/>
+ <JTextField id="fieldGearName" onKeyTyped='valueChanged(true)' onFocusLost='nameChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell fill='horizontal' anchor='east'>
- <JLabel text="isisfish.gear.effortUnit"/>
+ <JLabel text="isisfish.gear.effortUnit" enabled='{isActif()}'/>
</cell>
<cell columns="2" fill='horizontal' weightx='1.0'>
- <JTextField id="fieldGearEffortUnit" onKeyTyped='valueChanged(true)' onFocusLost='effortUnitChanged()'/>
+ <JTextField id="fieldGearEffortUnit" onKeyTyped='valueChanged(true)' onFocusLost='effortUnitChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell fill='horizontal' anchor='east'>
- <JLabel text="isisfish.gear.standardisationFactor"/>
+ <JLabel text="isisfish.gear.standardisationFactor" enabled='{isActif()}'/>
</cell>
<cell columns="2" fill='horizontal' weightx='1.0'>
- <JTextField id="fieldGearStandardisationFactor" onKeyTyped='valueChanged(true)' onFocusLost='standardisationFactorChanged()'/>
+ <JTextField id="fieldGearStandardisationFactor" onKeyTyped='valueChanged(true)' onFocusLost='standardisationFactorChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell fill='horizontal' anchor='east'>
- <JLabel text="isisfish.gear.technicalParameter"/>
+ <JLabel text="isisfish.gear.technicalParameter" enabled='{isActif()}'/>
</cell>
<cell columns="2" fill='horizontal' weightx='1.0'>
- <JTextField id="fieldGearParamName" onKeyTyped='valueChanged(true)' onFocusLost='paramNameChanged()'/>
+ <JTextField id="fieldGearParamName" onKeyTyped='valueChanged(true)' onFocusLost='paramNameChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell fill='horizontal' anchor='east'>
- <JLabel text="isisfish.gear.rangeValues"/>
+ <JLabel text="isisfish.gear.rangeValues" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JComboBox id="fieldGearParamType" onActionPerformed='paramTypeChanged()'/>
+ <JComboBox id="fieldGearParamType" onActionPerformed='paramTypeChanged()' enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JTextField id="fieldGearParamPossibleValue" onKeyTyped='valueChanged(true)' onFocusLost='paramPossibleValueChanged()'/>
+ <JTextField id="fieldGearParamPossibleValue" onKeyTyped='valueChanged(true)' onFocusLost='paramPossibleValueChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell fill='horizontal' anchor='east'>
- <JLabel text="isisfish.gear.comments"/>
+ <JLabel text="isisfish.gear.comments" enabled='{isActif()}'/>
</cell>
<cell columns="2" fill='both' weightx='1.0' weighty='1.0'>
<JScrollPane>
- <JTextArea id="fieldGearComment" onKeyTyped='valueChanged(true)' onFocusLost='commentChanged()'/>
+ <JTextArea id="fieldGearComment" onKeyTyped='valueChanged(true)' onFocusLost='commentChanged()' enabled='{isActif()}'/>
</JScrollPane>
</cell>
</row>
@@ -198,18 +204,18 @@
<Table>
<row>
<cell fill='horizontal' weightx='0.5'>
- <JButton id="save" enabled='false' text="isisfish.common.save" onActionPerformed='save()'/>
+ <JButton id="save" enabled='{isActif()}' text="isisfish.common.save" onActionPerformed='save()'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='cancel' enabled='false' text="isisfish.common.cancel" onActionPerformed='cancel()'/>
+ <JButton id='cancel' enabled='{isActif()}' text="isisfish.common.cancel" onActionPerformed='cancel()'/>
</cell>
</row>
<row>
<cell fill='horizontal' weightx='0.5'>
- <JButton id="create" text="isisfish.common.new" onActionPerformed='create()'/>
+ <JButton id="create" text="isisfish.common.new" onActionPerformed='create()' enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='remove' text="isisfish.common.remove" onActionPerformed='remove()'/>
+ <JButton id='remove' text="isisfish.common.remove" onActionPerformed='remove()' enabled='{isActif()}'/>
</cell>
</row>
</Table>
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/GearUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/GearUI.jaxx 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/GearUI.jaxx 2008-12-10 16:49:33 UTC (rev 1657)
@@ -35,14 +35,20 @@
<!--
+ Gear
+-->
-<JPanel layout='{new BorderLayout()}'>
+<JPanel id='panel' layout='{new BorderLayout()}' implements='InputContent'>
+
+ <!-- ui state when the activite is active -->
+ <Boolean id='actif' javaBean='false'/>
+
+ <Boolean id='changed' javaBean='false'/>
+
<script><![CDATA[
import fr.ifremer.isisfish.entities.Metier;
public GearUI (InputAction action){
setContextValue(action);
}
- protected void refresh() {
+ public void refresh() {
gearTabUI.refresh();
selectivityUI.refresh();
}
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/InputAction.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/InputAction.java 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/InputAction.java 2008-12-10 16:49:33 UTC (rev 1657)
@@ -530,7 +530,7 @@
* id to refresh after commit
* @return if ok return null else OutView error
*/
- public TopiaEntity save(String idToRefresh) {
+ public TopiaEntity save() {
log.debug("save called");
try {
if (selected == null) {
@@ -558,7 +558,7 @@
* interface Tab to refresh after rollback and reload
* @return if ok return null else OutView error
*/
- public Object cancel(String type) {
+ public TopiaEntity cancel(String type) {
log.debug("cancel called");
try {
isisContext.rollbackTransaction();
@@ -566,12 +566,13 @@
// reload the object
if (selected != null) {
selected = isisContext.findByTopiaId(selected.getTopiaId());
+ setValue(selected);
}
} catch (Exception eee) {
log.error("Can't cancel modification in region", eee);
showMsgBox(eee);
}
- return null;
+ return selected;
}
/**
Added: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/InputContent.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/InputContent.java (rev 0)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/InputContent.java 2008-12-10 16:49:33 UTC (rev 1657)
@@ -0,0 +1,23 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package fr.ifremer.isisfish.ui.input;
+
+/**
+ *
+ * @author letellier
+ */
+public interface InputContent {
+
+ void refresh();
+
+ java.lang.Boolean isActif();
+
+ java.lang.Boolean isChanged();
+
+ void setActif(java.lang.Boolean b);
+
+ void setChanged(java.lang.Boolean b);
+}
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/InputNavigationTreeSelectionAdapter.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/InputNavigationTreeSelectionAdapter.java 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/InputNavigationTreeSelectionAdapter.java 2008-12-10 16:49:33 UTC (rev 1657)
@@ -16,7 +16,8 @@
import javax.swing.JPanel;
import javax.swing.event.TreeSelectionEvent;
import java.awt.Component;
-import java.lang.reflect.Method;
+import javax.swing.JOptionPane;
+import static org.codelutin.i18n.I18n._;
/** @author letellier */
public class InputNavigationTreeSelectionAdapter extends NavigationTreeSelectionAdapterWithCardLayout {
@@ -72,15 +73,54 @@
super.openUI(newUI, node);
// apply refresh method (should a contract for all this ui with a method refresh...)
try {
- Method m = newUI.getClass().getDeclaredMethod("refresh");
- m.setAccessible(true);
- m.invoke(newUI);
- } catch (NoSuchMethodException e) {
- // ok do nothing
+ InputContent ui = (InputContent) newUI;
+ boolean parameter = context.getContextValue(InputAction.class).getSelected() != null;
+ log.debug(parameter);
+// Method setActif = newUI.getClass().getDeclaredMethod("setActif", Boolean.class);
+// setActif.setAccessible(true);
+// setActif.invoke(newUI, parameter);
+ ui.setActif(parameter);
+ ui.refresh();
+// Method refresh = newUI.getClass().getDeclaredMethod("refresh");
+// refresh.setAccessible(true);
+// refresh.invoke(newUI);
+ } catch (Exception e) {
+ log.debug(e.getMessage(), e);
}
}
@Override
+ protected boolean closeUI(TreeSelectionEvent event, Component component) throws Exception {
+ // by default, we says that component was succesfull closed
+ return checkEdit(component);
+ }
+ public boolean checkEdit(Component content) {
+ boolean wasClosed = true;
+ if (content != null){
+ InputContent ui = (InputContent) content;
+ if (ui.isActif()) {
+ if (ui.isChanged()) {
+ // ask user to close edition
+ // still in edit mode, must warn user
+ boolean willQuit = askUser(content, _("isisfish.message.page.modified"));
+ if (!willQuit) {
+ return false;
+ }
+ }
+ context.getContextValue(InputAction.class).save();
+ ui.setChanged(false);
+ }
+ }
+ return wasClosed;
+ }
+
+ public boolean askUser(Component parent, String message) {
+ int response = JOptionPane.showConfirmDialog(parent, message,
+ _("isisfish.input.menu.commit"), JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);
+ return response == JOptionPane.OK_OPTION;
+ }
+
+ @Override
protected void addSelectedBeanInContext(NavigationTreeNode node, Object data) {
if (log.isDebugEnabled()) {
log.debug("find data for contextPath <" + node.getContextPath() + "> : " + (data == null ? null : data.getClass()));
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/MetierSeasonInfoSpeciesUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/MetierSeasonInfoSpeciesUI.jaxx 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/MetierSeasonInfoSpeciesUI.jaxx 2008-12-10 16:49:33 UTC (rev 1657)
@@ -31,7 +31,13 @@
*/
-->
-<Table>
+<Table implements='InputContent'>
+
+ <!-- ui state when the activite is active -->
+ <Boolean id='actif' javaBean='false'/>
+
+ <Boolean id='changed' javaBean='false'/>
+
<script><![CDATA[
import com.l2fprod.common.swing.renderer.BooleanCellRenderer;
import java.util.logging.Level;
@@ -49,12 +55,11 @@
import fr.ifremer.isisfish.entities.Species;
import javax.swing.table.TableCellEditor;
- boolean changed = false;
public MetierSeasonInfoSpeciesUI (InputAction action){
setContextValue(action);
}
- protected void refresh() {
+ public void refresh() {
if (getContextValue(InputAction.class).getMetier() != null){
if (fieldMetierSeasonInfo.getSelectedIndex() <= 0){
setSeasonModel();
@@ -186,17 +191,18 @@
refresh();
}
protected void save(){
- TopiaEntity topia = getContextValue(InputAction.class).save("Metier");
+ TopiaEntity topia = getContextValue(InputAction.class).save();
getParentContainer(InputUI.class).setTreeSelection("$root/$metiers/"+topia.getTopiaId());
setInfoText(_("isisfish.message.save.finished"));
refresh();
valueChanged(false);
}
protected void cancel(){
- getContextValue(InputAction.class).cancel("Metier");
- setInfoText(_("isisfish.message.cancel.finished"));
+ TopiaEntity topia = getContextValue(InputAction.class).cancel("Metier");
valueChanged(false);
refresh();
+ getParentContainer(InputUI.class).setTreeSelection("$root/$metiers/"+topia.getTopiaId());
+ setInfoText(_("isisfish.message.cancel.finished"));
}
protected void valueChanged(boolean b){
changed=b;
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/MetierSeasonInfoZoneUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/MetierSeasonInfoZoneUI.jaxx 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/MetierSeasonInfoZoneUI.jaxx 2008-12-10 16:49:33 UTC (rev 1657)
@@ -31,7 +31,13 @@
*/
-->
-<Table>
+<Table implements='InputContent'>
+
+ <!-- ui state when the activite is active -->
+ <Boolean id='actif' javaBean='false'/>
+
+ <Boolean id='changed' javaBean='false'/>
+
<script><![CDATA[
import fr.ifremer.isisfish.entities.Season;
import fr.ifremer.isisfish.types.Month;
@@ -44,14 +50,14 @@
import org.codelutin.topia.persistence.TopiaEntity;
import fr.ifremer.isisfish.ui.WelcomePanelUI;
- protected boolean changed = false;
+ protected boolean seasonInit = true;
protected IntervalPanel ip = new IntervalPanel();
displayMetierSeason.add(ip, BorderLayout.CENTER);
public MetierSeasonInfoZoneUI (InputAction action){
setContextValue(action);
}
- protected void refresh(boolean seasonInit) {
+ public void refresh() {
Metier metier = getContextValue(InputAction.class).getMetier();
if (metier != null){
if (seasonInit){
@@ -158,28 +164,30 @@
setInfoText(_("isisfish.message.creation.finished"));
}
protected void save(){
- TopiaEntity topia = getContextValue(InputAction.class).save("Metier");
+ TopiaEntity topia = getContextValue(InputAction.class).save();
setInfoText(_("isisfish.message.save.finished"));
- refresh(false);
+ seasonInit = false;
+ refresh();
valueChanged(false);
}
protected void cancel(){
- getContextValue(InputAction.class).cancel("Metier");
+ TopiaEntity topia = getContextValue(InputAction.class).cancel("Metier");
+ valueChanged(false);
+ refresh();
+ getParentContainer(InputUI.class).setTreeSelection("$root/$metiers/"+topia.getTopiaId());
setInfoText(_("isisfish.message.cancel.finished"));
- valueChanged(false);
- refresh(false);
}
protected void remove(){
setInfoText(getContextValue(InputAction.class).remove());
valueChanged(false);
- refresh(false);
+ seasonInit = false;
+ refresh();
}
protected void setInfoText(String txt){
WelcomePanelUI root = getParentContainer(WelcomePanelUI.class);
root.setInfoText(txt);
}
protected void valueChanged(boolean b){
- changed=b;
cancel.setEnabled(b);
save.setEnabled(b);
}
@@ -209,43 +217,50 @@
}
valueChanged(true);
}
+ public void setSeasonInit(boolean b){
+ seasonInit = b;
+ }
+ protected void metierSeasonChanged(){
+ seasonInit = false;
+ refresh();
+ }
]]></script>
<row>
<cell fill='both' weightx='1.0' weighty='1.0'>
<Table>
<row>
<cell fill='horizontal' anchor='east'>
- <JLabel text="isisfish.metierSeasonInfoZone.selectSeason"/>
+ <JLabel text="isisfish.metierSeasonInfoZone.selectSeason" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JComboBox id="fieldMetierSeasonChoice" onActionPerformed='refresh(false)'/>
+ <JComboBox id="fieldMetierSeasonChoice" onActionPerformed='metierSeasonChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell fill='horizontal' anchor='east'>
- <JLabel text="isisfish.metierSeasonInfoZone.season"/>
+ <JLabel text="isisfish.metierSeasonInfoZone.season" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JPanel id='displayMetierSeason' layout='{new BorderLayout()}'/>
+ <JPanel id='displayMetierSeason' layout='{new BorderLayout()}' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell fill='horizontal' anchor='east'>
- <JLabel text="isisfish.common.zone"/>
+ <JLabel text="isisfish.common.zone" enabled='{isActif()}'/>
</cell>
<cell fill='both' weightx='1.0' weighty='0.7'>
<JScrollPane minimumSize='{new Dimension(0,0)}' preferredSize='{new Dimension(0,0)}'>
- <JList id="metierZones" onValueChanged='zonesChanged()'/>
+ <JList id="metierZones" onValueChanged='zonesChanged()' enabled='{isActif()}'/>
</JScrollPane>
</cell>
</row>
<row>
<cell fill='horizontal' anchor='east'>
- <JLabel text="isisfish.metierSeasonInfoZone.comments"/>
+ <JLabel text="isisfish.metierSeasonInfoZone.comments" enabled='{isActif()}'/>
</cell>
<cell fill='both' weightx='1.0' weighty='0.3'>
<JScrollPane minimumSize='{new Dimension(0,0)}' preferredSize='{new Dimension(0,0)}'>
- <JTextArea id="fieldMetierSeasonZoneComment" onKeyTyped='valueChanged(true)' onFocusLost='commentChanged()'/>
+ <JTextArea id="fieldMetierSeasonZoneComment" onKeyTyped='valueChanged(true)' onFocusLost='commentChanged()' enabled='{isActif()}'/>
</JScrollPane>
</cell>
</row>
@@ -257,10 +272,10 @@
<Table>
<row>
<cell fill='horizontal' weightx='0.5'>
- <JButton id ='save' text="isisfish.common.save" onActionPerformed='save()' enabled='false'/>
+ <JButton id ='save' text="isisfish.common.save" onActionPerformed='save()' enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='cancel' text="isisfish.common.cancel" onActionPerformed='cancel()' enabled='false'/>
+ <JButton id='cancel' text="isisfish.common.cancel" onActionPerformed='cancel()' enabled='{isActif()}'/>
</cell>
</row>
<row>
@@ -268,7 +283,7 @@
<JButton id='create' text="isisfish.common.new" onActionPerformed='create()'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='remove' text="isisfish.common.remove" onActionPerformed='remove()'/>
+ <JButton id='remove' text="isisfish.common.remove" onActionPerformed='remove()' enabled='{isActif()}'/>
</cell>
</row>
</Table>
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/MetierTabUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/MetierTabUI.jaxx 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/MetierTabUI.jaxx 2008-12-10 16:49:33 UTC (rev 1657)
@@ -31,7 +31,13 @@
*/
-->
-<Table>
+<Table implements='InputContent'>
+
+ <!-- ui state when the activite is active -->
+ <Boolean id='actif' javaBean='false'/>
+
+ <Boolean id='changed' javaBean='false'/>
+
<script><![CDATA[
import fr.ifremer.isisfish.entities.Gear;
@@ -43,12 +49,11 @@
import java.util.logging.Level;
import java.util.logging.Logger;
- protected boolean changed = false;
public MetierTabUI (InputAction action){
setContextValue(action);
}
- protected void refresh() {
+ public void refresh() {
try {
Metier metier = getContextValue(InputAction.class).getMetier();
DefaultComboBoxModel model = new DefaultComboBoxModel(getContextValue(InputAction.class).getFisheryRegion().getGear().toArray());
@@ -90,7 +95,7 @@
setInfoText(_("isisfish.message.creation.finished"));
}
protected void save(){
- TopiaEntity topia = getContextValue(InputAction.class).save("Metier");
+ TopiaEntity topia = getContextValue(InputAction.class).save();
getParentContainer(InputUI.class).setTreeModel();
getParentContainer(InputUI.class).setTreeSelection("$root/$metiers/"+topia.getTopiaId());
setInfoText(_("isisfish.message.save.finished"));
@@ -98,10 +103,11 @@
valueChanged(false);
}
protected void cancel(){
- getContextValue(InputAction.class).cancel("Metier");
- setInfoText(_("isisfish.message.cancel.finished"));
+ TopiaEntity topia = getContextValue(InputAction.class).cancel("Metier");
valueChanged(false);
refresh();
+ getParentContainer(InputUI.class).setTreeSelection("$root/$metiers/"+topia.getTopiaId());
+ setInfoText(_("isisfish.message.cancel.finished"));
}
protected void remove(){
setInfoText(getContextValue(InputAction.class).remove());
@@ -123,35 +129,35 @@
<Table>
<row>
<cell fill='horizontal' anchor='east'>
- <JLabel text="isisfish.metier.name"/>
+ <JLabel text="isisfish.metier.name" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JTextField id="fieldMetierName" onKeyTyped='valueChanged(true)' onFocusLost='nameChanged()'/>
+ <JTextField id="fieldMetierName" onKeyTyped='valueChanged(true)' onFocusLost='nameChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell fill='horizontal' anchor='east'>
- <JLabel text="isisfish.common.gear"/>
+ <JLabel text="isisfish.common.gear" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JComboBox id="fieldMetierGear" onActionPerformed='gearChanged()'/>
+ <JComboBox id="fieldMetierGear" onActionPerformed='gearChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell fill='horizontal' anchor='east'>
- <JLabel text="isisfish.metier.rangeValues"/>
+ <JLabel text="isisfish.metier.rangeValues" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JTextField id="fieldMetierParam" onKeyTyped='valueChanged(true)' onFocusLost='paramChanged()'/>
+ <JTextField id="fieldMetierParam" onKeyTyped='valueChanged(true)' onFocusLost='paramChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell fill='horizontal' anchor='east'>
- <JLabel text="isisfish.metier.comments"/>
+ <JLabel text="isisfish.metier.comments" enabled='{isActif()}'/>
</cell>
<cell fill='both' weightx='1.0' weighty='1.0'>
<JScrollPane minimumSize='{new Dimension(0,0)}' preferredSize='{new Dimension(0,0)}'>
- <JTextArea id="fieldMetierComment" onKeyTyped='valueChanged(true)' onFocusLost='commentChanged()'/>
+ <JTextArea id="fieldMetierComment" onKeyTyped='valueChanged(true)' onFocusLost='commentChanged()' enabled='{isActif()}'/>
</JScrollPane>
</cell>
</row>
@@ -163,10 +169,10 @@
<Table>
<row>
<cell fill='horizontal' weightx='0.5'>
- <JButton id="save" enabled='false' text="isisfish.common.save" onActionPerformed='save()'/>
+ <JButton id="save" text="isisfish.common.save" onActionPerformed='save()' enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JButton id="cancel" enabled='false' text="isisfish.common.cancel" onActionPerformed='cancel()'/>
+ <JButton id="cancel" text="isisfish.common.cancel" onActionPerformed='cancel()' enabled='{isActif()}'/>
</cell>
</row>
<row>
@@ -174,7 +180,7 @@
<JButton id="create" text="isisfish.common.new" onActionPerformed='create()'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JButton id="remove" text="isisfish.common.remove" onActionPerformed='remove()'/>
+ <JButton id="remove" text="isisfish.common.remove" onActionPerformed='remove()' enabled='{isActif()}'/>
</cell>
</row>
</Table>
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/MetierUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/MetierUI.jaxx 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/MetierUI.jaxx 2008-12-10 16:49:33 UTC (rev 1657)
@@ -34,17 +34,25 @@
<!--
+ Metier
+-->
-<JPanel layout='{new BorderLayout()}'>
+<JPanel layout='{new BorderLayout()}' implements='InputContent'>
+
+ <!-- ui state when the activite is active -->
+ <Boolean id='actif' javaBean='false'/>
+
+ <Boolean id='changed' javaBean='false'/>
+
<script><![CDATA[
import fr.ifremer.isisfish.entities.TripType;
public MetierUI (InputAction action){
setContextValue(action);
}
- protected void refresh() {
+ public void refresh() {
metierTabUI.refresh();
metierSeasonSpeciesUI.refresh();
- metierSeasonInfoUI.refresh(true);
+
+ metierSeasonInfoUI.setSeasonInit(true);
+ metierSeasonInfoUI.refresh();
}
protected void goToTripType(){
getParentContainer(InputUI.class).setTreeSelection("$root/$tripTypes");
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationBasicsUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationBasicsUI.jaxx 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationBasicsUI.jaxx 2008-12-10 16:49:33 UTC (rev 1657)
@@ -31,7 +31,13 @@
*/
-->
-<Table>
+<Table implements='InputContent'>
+
+ <!-- ui state when the activite is active -->
+ <Boolean id='actif' javaBean='false'/>
+
+ <Boolean id='changed' javaBean='false'/>
+
<script><![CDATA[
import fr.ifremer.isisfish.entities.Equation;
@@ -46,7 +52,6 @@
import java.util.logging.Level;
import java.util.logging.Logger;
- boolean changed = false;
protected Population pop = null;
public PopulationBasicsUI (InputAction action){
@@ -269,7 +274,7 @@
setInfoText(_("isisfish.message.creation.finished"));
}
protected void save(){
- TopiaEntity topia = getContextValue(InputAction.class).save("Population");
+ TopiaEntity topia = getContextValue(InputAction.class).save();
Population population = (Population) topia;
getParentContainer(InputUI.class).setTreeModel();
getParentContainer(InputUI.class).setTreeSelection("$root/$species/"+ population.getSpecies().getTopiaId() +"/$populations/"+topia.getTopiaId());
@@ -278,10 +283,11 @@
valueChanged(false);
}
protected void cancel(){
- getContextValue(InputAction.class).cancel("Population");
- setInfoText(_("isisfish.message.cancel.finished"));
+ TopiaEntity topia = getContextValue(InputAction.class).cancel("Population");
valueChanged(false);
refresh();
+ getParentContainer(InputUI.class).setTreeSelection("$root/$populations/"+topia.getTopiaId());
+ setInfoText(_("isisfish.message.cancel.finished"));
}
protected void remove(){
setInfoText(getContextValue(InputAction.class).remove());
@@ -307,53 +313,53 @@
<Table>
<row>
<cell anchor='east'>
- <JLabel text="isisfish.populationBasics.name"/>
+ <JLabel text="isisfish.populationBasics.name" enabled='{isActif()}'/>
</cell>
<cell columns='2' fill='horizontal' weightx='1.0'>
- <JTextField id="fieldPopulationBasicsName" onKeyTyped='valueChanged(true)' onFocusLost='nameChanged()'/>
+ <JTextField id="fieldPopulationBasicsName" onKeyTyped='valueChanged(true)' onFocusLost='nameChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell anchor='east'>
- <JLabel text="isisfish.populationBasics.geographicID"/>
+ <JLabel text="isisfish.populationBasics.geographicID" enabled='{isActif()}'/>
</cell>
<cell columns='2' fill='horizontal' weightx='1.0'>
- <JTextField id="fieldPopulationBasicsGeographicID" onKeyTyped='valueChanged(true)' onFocusLost='geographicChanged()'/>
+ <JTextField id="fieldPopulationBasicsGeographicID" onKeyTyped='valueChanged(true)' onFocusLost='geographicChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell anchor='east'>
- <JLabel text="isisfish.populationBasics.numberGroup"/>
+ <JLabel text="isisfish.populationBasics.numberGroup" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JTextField id="fieldPopulationBasicsNbClasses" editable="false"/>
+ <JTextField id="fieldPopulationBasicsNbClasses" editable="false" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JButton id="buttonPopulationBasicsCreateClasses" text="isisfish.populationBasics.recreateClasses" onActionPerformed='createClasses()'/>
+ <JButton id="buttonPopulationBasicsCreateClasses" text="isisfish.populationBasics.recreateClasses" onActionPerformed='createClasses()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell anchor='east'>
- <JLabel text="isisfish.populationBasics.maturityGroup"/>
+ <JLabel text="isisfish.populationBasics.maturityGroup" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JComboBox id="fieldPopulationBasicsMatureClass" onActionPerformed='matureClassChanged()'/>
+ <JComboBox id="fieldPopulationBasicsMatureClass" onActionPerformed='matureClassChanged()' enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JCheckBox id="fieldPopulationBasicsPlusGroup" text="isisfish.populationBasics.plusGroup" onActionPerformed='plusGroupChanged()'/>
+ <JCheckBox id="fieldPopulationBasicsPlusGroup" text="isisfish.populationBasics.plusGroup" onActionPerformed='plusGroupChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell columns='3' fill='both' weightx='1.0'>
- <JTable id='tableAgeLength'/>
+ <JTable id='tableAgeLength' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell anchor='east'>
- <JLabel text="isisfish.populationBasics.growth"/>
+ <JLabel text="isisfish.populationBasics.growth" enabled='{isActif()}'/>
</cell>
<cell columns='2' fill='horizontal' weightx='1.0'>
- <JComboBox id="fieldPopulationBasicsGrowth" onActionPerformed='basicsGrowthChanged()'/>
+ <JComboBox id="fieldPopulationBasicsGrowth" onActionPerformed='basicsGrowthChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
@@ -361,12 +367,12 @@
<Table>
<row>
<cell fill='horizontal'>
- <JButton text="isisfish.common.saveModel" onActionPerformed='saveGrowthModel()'/>
+ <JButton text="isisfish.common.saveModel" onActionPerformed='saveGrowthModel()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell fill='horizontal'>
- <JButton text="isisfish.common.openEditor" onActionPerformed='openGrowthEditor()'/>
+ <JButton text="isisfish.common.openEditor" onActionPerformed='openGrowthEditor()' enabled='{isActif()}'/>
</cell>
</row>
<row>
@@ -378,16 +384,16 @@
</cell>
<cell columns='2' fill='both' weightx='1.0' weighty='0.4'>
<JScrollPane>
- <org.codelutin.widget.editor.Editor id='editor' askIfNotSaved="false"/>
+ <org.codelutin.widget.editor.Editor id='editor' askIfNotSaved="false" enabled='{isActif()}'/>
</JScrollPane>
</cell>
</row>
<row>
<cell anchor='east'>
- <JLabel text="isisfish.populationBasics.growthReverse"/>
+ <JLabel text="isisfish.populationBasics.growthReverse" enabled='{isActif()}'/>
</cell>
<cell columns='2' fill='horizontal' weightx='1.0'>
- <JComboBox id="fieldPopulationBasicsGrowthReverse" onActionPerformed='growthReverseChanged()'/>
+ <JComboBox id="fieldPopulationBasicsGrowthReverse" onActionPerformed='growthReverseChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
@@ -395,12 +401,12 @@
<Table>
<row>
<cell fill='horizontal'>
- <JButton text="isisfish.common.saveModel" onActionPerformed='saveGrowthReverseModel()'/>
+ <JButton text="isisfish.common.saveModel" onActionPerformed='saveGrowthReverseModel()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell fill='horizontal'>
- <JButton text="isisfish.common.openEditor" onActionPerformed='openGrowthReverseEditor()'/>
+ <JButton text="isisfish.common.openEditor" onActionPerformed='openGrowthReverseEditor()' enabled='{isActif()}'/>
</cell>
</row>
<row>
@@ -412,17 +418,17 @@
</cell>
<cell columns='2' fill='both' weightx='1.0' weighty='0.4'>
<JScrollPane>
- <org.codelutin.widget.editor.Editor id='editorReverse' askIfNotSaved="false"/>
+ <org.codelutin.widget.editor.Editor id='editorReverse' askIfNotSaved="false" enabled='{isActif()}'/>
</JScrollPane>
</cell>
</row>
<row>
<cell anchor='east'>
- <JLabel text="isisfish.population.comments"/>
+ <JLabel text="isisfish.population.comments" enabled='{isActif()}'/>
</cell>
<cell columns='2' fill='both' weightx='1.0' weighty='0.2'>
<JScrollPane>
- <JTextArea id="fieldPopulationBasicsComment" onKeyTyped='valueChanged(true)' onFocusLost='commentChanged()'/>
+ <JTextArea id="fieldPopulationBasicsComment" onKeyTyped='valueChanged(true)' onFocusLost='commentChanged()' enabled='{isActif()}'/>
</JScrollPane>
</cell>
</row>
@@ -440,10 +446,10 @@
<Table>
<row>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='save' text="isisfish.common.save" onActionPerformed='save()'/>
+ <JButton id='save' text="isisfish.common.save" onActionPerformed='save()' enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='cancel' text="isisfish.common.cancel" onActionPerformed='cancel()'/>
+ <JButton id='cancel' text="isisfish.common.cancel" onActionPerformed='cancel()' enabled='{isActif()}'/>
</cell>
</row>
<row>
@@ -451,7 +457,7 @@
<JButton id='create' text="isisfish.common.new" onActionPerformed='create()'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='remove' text="isisfish.common.remove" onActionPerformed='remove()'/>
+ <JButton id='remove' text="isisfish.common.remove" onActionPerformed='remove()' enabled='{isActif()}'/>
</cell>
</row>
</Table>
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationCapturabilityUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationCapturabilityUI.jaxx 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationCapturabilityUI.jaxx 2008-12-10 16:49:33 UTC (rev 1657)
@@ -31,7 +31,13 @@
*/
-->
-<Table>
+<Table implements='InputContent'>
+
+ <!-- ui state when the activite is active -->
+ <Boolean id='actif' javaBean='false'/>
+
+ <Boolean id='changed' javaBean='false'/>
+
<script><![CDATA[
import fr.ifremer.isisfish.entities.Population;
@@ -41,7 +47,6 @@
import fr.ifremer.isisfish.ui.WelcomePanelUI;
protected Population pop = null;
- protected boolean changed = false;
public PopulationCapturabilityUI (InputAction action){
setContextValue(action);
@@ -74,17 +79,18 @@
valueChanged(true);
}
protected void save(){
- TopiaEntity topia = getContextValue(InputAction.class).save("Population");
+ TopiaEntity topia = getContextValue(InputAction.class).save();
getParentContainer(InputUI.class).setTreeSelection("$root/$population/"+topia.getTopiaId());
setInfoText(_("isisfish.message.save.finished"));
refresh();
valueChanged(false);
}
protected void cancel(){
- getContextValue(InputAction.class).cancel("Metier");
+ TopiaEntity topia = getContextValue(InputAction.class).cancel("Metier");
+ valueChanged(false);
+ refresh();
+ getParentContainer(InputUI.class).setTreeSelection("$root/$metiers/"+topia.getTopiaId());
setInfoText(_("isisfish.message.cancel.finished"));
- refresh();
- valueChanged(false);
}
protected void setInfoText(String txt){
WelcomePanelUI root = getParentContainer(WelcomePanelUI.class);
@@ -99,32 +105,32 @@
</script>
<row>
<cell columns='2' fill='horizontal' weightx='1.0' anchor='east'>
- <JLabel text="isisfish.populationCapturability.selectCoefficient"/>
+ <JLabel text="isisfish.populationCapturability.selectCoefficient" enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell columns='2' fill='both' weightx='1.0'>
- <org.codelutin.math.matrix.gui.MatrixPanelEditor id ='fieldPopulationCapturability'/>
+ <org.codelutin.math.matrix.gui.MatrixPanelEditor id ='fieldPopulationCapturability' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell columns='2' fill='horizontal' weightx='1.0' anchor='east'>
- <JLabel text="isisfish.populationCapturability.comments"/>
+ <JLabel text="isisfish.populationCapturability.comments" enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell columns='2' fill='both' weightx='1.0' weighty='1.0'>
<JScrollPane>
- <JTextArea id="fieldPopulationCapturabilityComment" onKeyTyped='valueChanged(true)' onFocusLost='commentChanged()'/>
+ <JTextArea id="fieldPopulationCapturabilityComment" onKeyTyped='valueChanged(true)' onFocusLost='commentChanged()' enabled='{isActif()}'/>
</JScrollPane>
</cell>
</row>
<row>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='save' enabled='false' text="isisfish.common.save" onActionPerformed='save()'/>
+ <JButton id='save' text="isisfish.common.save" onActionPerformed='save()' enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='cancel' enabled='false' text="isisfish.common.cancel" onActionPerformed='cancel()'/>
+ <JButton id='cancel' text="isisfish.common.cancel" onActionPerformed='cancel()' enabled='{isActif()}'/>
</cell>
</row>
</Table>
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationEquationUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationEquationUI.jaxx 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationEquationUI.jaxx 2008-12-10 16:49:33 UTC (rev 1657)
@@ -30,7 +30,13 @@
* by : $Author: sletellier $
*/
-->
-<Table>
+<Table implements='InputContent'>
+
+ <!-- ui state when the activite is active -->
+ <Boolean id='actif' javaBean='false'/>
+
+ <Boolean id='changed' javaBean='false'/>
+
<script><![CDATA[
import fr.ifremer.isisfish.entities.Formule;
@@ -39,7 +45,6 @@
import fr.ifremer.isisfish.entities.Population;
protected Population pop = null;
- boolean changed = false;
public PopulationEquationUI (InputAction action){
setContextValue(action);
@@ -47,24 +52,28 @@
public void refresh(){
pop = getContextValue(InputAction.class).getPopulation();
if (pop != null){
- naturalDeathRate.refresh(_("isisfish.populationEquation.naturalDeathRate"), (Formule)pop.getNaturalDeathRate(), "NaturalDeathRate", fr.ifremer.isisfish.equation.PopulationNaturalDeathRate.class);
- meanWeight.refresh(_("isisfish.populationEquation.meanWeight"), (Formule)pop.getMeanWeight(), "MeanWeight", fr.ifremer.isisfish.equation.PopulationMeanWeight.class);
- price.refresh(_("isisfish.populationEquation.price"), (Formule)pop.getPrice(), "Price", fr.ifremer.isisfish.equation.PopulationPrice.class);
+ naturalDeathRate.init(_("isisfish.populationEquation.naturalDeathRate"), (Formule)pop.getNaturalDeathRate(), "NaturalDeathRate", fr.ifremer.isisfish.equation.PopulationNaturalDeathRate.class);
+ meanWeight.init(_("isisfish.populationEquation.meanWeight"), (Formule)pop.getMeanWeight(), "MeanWeight", fr.ifremer.isisfish.equation.PopulationMeanWeight.class);
+ price.init(_("isisfish.populationEquation.price"), (Formule)pop.getPrice(), "Price", fr.ifremer.isisfish.equation.PopulationPrice.class);
+ naturalDeathRate.refresh();
+ meanWeight.refresh();
+ price.refresh();
valueChanged(false);
}
}
protected void save(){
- TopiaEntity topia = getContextValue(InputAction.class).save("Population");
+ TopiaEntity topia = getContextValue(InputAction.class).save();
getParentContainer(InputUI.class).setTreeSelection("$root/$populations/"+topia.getTopiaId());
setInfoText(_("isisfish.message.save.finished"));
refresh();
valueChanged(false);
}
protected void cancel(){
- getContextValue(InputAction.class).cancel("Population");
- setInfoText(_("isisfish.message.cancel.finished"));
+ TopiaEntity topia = getContextValue(InputAction.class).cancel("Population");
valueChanged(false);
refresh();
+ getParentContainer(InputUI.class).setTreeSelection("$root/$populations/"+topia.getTopiaId());
+ setInfoText(_("isisfish.message.cancel.finished"));
}
protected void setInfoText(String txt){
WelcomePanelUI root = getParentContainer(WelcomePanelUI.class);
@@ -94,10 +103,10 @@
</row>
<row>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='cancel' text="isisfish.common.cancel" enabled='false' onActionPerformed='cancel()'/>
+ <JButton id='cancel' text="isisfish.common.cancel" enabled='{isActif()}' onActionPerformed='cancel()'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='save' text="isisfish.common.save" enabled='false' onActionPerformed='save()'/>
+ <JButton id='save' text="isisfish.common.save" enabled='{isActif()}' onActionPerformed='save()'/>
</cell>
</row>
</Table>
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationGroupUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationGroupUI.jaxx 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationGroupUI.jaxx 2008-12-10 16:49:33 UTC (rev 1657)
@@ -31,7 +31,13 @@
*/
-->
-<Table>
+<Table implements='InputContent'>
+
+ <!-- ui state when the activite is active -->
+ <Boolean id='actif' javaBean='false'/>
+
+ <Boolean id='changed' javaBean='false'/>
+
<script><![CDATA[
import fr.ifremer.isisfish.entities.PopulationGroup;
@@ -42,7 +48,6 @@
import org.codelutin.math.matrix.gui.MatrixPanelListener;
import org.codelutin.math.matrix.gui.MatrixPanelEvent;
- protected boolean changed = false;
protected Population pop = null;
protected PopulationGroup populationGroup = null;
public PopulationGroupUI (InputAction action){
@@ -108,17 +113,18 @@
populationGroup.setComment(fieldPopulationGroupComment.getText());
}
protected void save(){
- TopiaEntity topia = getContextValue(InputAction.class).save("Population");
+ TopiaEntity topia = getContextValue(InputAction.class).save();
getParentContainer(InputUI.class).setTreeSelection("$root/$populations/"+topia.getTopiaId());
setInfoText(_("isisfish.message.save.finished"));
refresh();
valueChanged(false);
}
protected void cancel(){
- getContextValue(InputAction.class).cancel("Population");
- setInfoText(_("isisfish.message.cancel.finished"));
+ TopiaEntity topia = getContextValue(InputAction.class).cancel("Population");
valueChanged(false);
refresh();
+ getParentContainer(InputUI.class).setTreeSelection("$root/$populations/"+topia.getTopiaId());
+ setInfoText(_("isisfish.message.cancel.finished"));
}
protected void setInfoText(String txt){
WelcomePanelUI root = getParentContainer(WelcomePanelUI.class);
@@ -132,70 +138,70 @@
</script>
<row>
<cell fill='horizontal' anchor='east'>
- <JLabel text="isisfish.common.populationGroup"/>
+ <JLabel text="isisfish.common.populationGroup" enabled='{isActif()}'/>
</cell>
<cell columns='2' fill='horizontal' weightx='1.0'>
- <JComboBox id='fieldPopulationGroupPopulationGroup' onActionPerformed='populationGroupChanged()'/>
+ <JComboBox id='fieldPopulationGroupPopulationGroup' onActionPerformed='populationGroupChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell fill='horizontal' anchor='east'>
- <JLabel text="isisfish.populationGroup.meanWeigth"/>
+ <JLabel text="isisfish.populationGroup.meanWeigth" enabled='{isActif()}'/>
</cell>
<cell columns='2' fill='horizontal' weightx='1.0'>
- <JTextField id="fieldPopulationGroupMeanWeight"/>
+ <JTextField id="fieldPopulationGroupMeanWeight" enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell fill='horizontal' anchor='east'>
- <JLabel text="isisfish.populationGroup.price"/>
+ <JLabel text="isisfish.populationGroup.price" enabled='{isActif()}'/>
</cell>
<cell columns='2' fill='horizontal' weightx='1.0'>
- <JTextField id="fieldPopulationGroupPrice"/>
+ <JTextField id="fieldPopulationGroupPrice" enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell fill='horizontal' anchor='east'>
- <JLabel text="isisfish.populationGroup.naturalDeathRate"/>
+ <JLabel text="isisfish.populationGroup.naturalDeathRate" enabled='{isActif()}'/>
</cell>
<cell columns='2' fill='both' weightx='1.0' weighty='0.5'>
- <org.codelutin.math.matrix.gui.MatrixPanelEditor id ='fieldPopulationGroupNaturalDeathRate'/>
+ <org.codelutin.math.matrix.gui.MatrixPanelEditor id ='fieldPopulationGroupNaturalDeathRate' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell fill='horizontal' anchor='east'>
- <JLabel text="isisfish.populationGroup.reproductionRate"/>
+ <JLabel text="isisfish.populationGroup.reproductionRate" enabled='{isActif()}'/>
</cell>
<cell columns='2' fill='horizontal' weightx='1.0'>
- <JTextField id="fieldPopulationGroupReproductionRate" onKeyTyped='valueChanged(true)' onFocusLost='reproductionRateChanged()'/>
+ <JTextField id="fieldPopulationGroupReproductionRate" onKeyTyped='valueChanged(true)' onFocusLost='reproductionRateChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell fill='horizontal' anchor='east'>
- <JLabel text="isisfish.populationGroup.age"/>
+ <JLabel text="isisfish.populationGroup.age" enabled='{isActif()}'/>
</cell>
<cell columns='2' fill='horizontal' weightx='1.0'>
- <JTextField id="fieldPopulationGroupAge"/>
+ <JTextField id="fieldPopulationGroupAge" enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell fill='horizontal' anchor='east'>
- <JLabel text="isisfish.populationGroup.length"/>
+ <JLabel text="isisfish.populationGroup.length" enabled='{isActif()}'/>
</cell>
<cell fill='both' weightx='0.5'>
- <JTextField id="fieldPopulationGroupMinLength" onKeyTyped='valueChanged(true)' onFocusLost='groupMinLengthChanged()'/>
+ <JTextField id="fieldPopulationGroupMinLength" onKeyTyped='valueChanged(true)' onFocusLost='groupMinLengthChanged()' enabled='{isActif()}'/>
</cell>
<cell fill='both' weightx='0.5'>
- <JTextField id="fieldPopulationGroupMaxLength" onKeyTyped='valueChanged(true)' onFocusLost='groupMaxLengthChanged()'/>
+ <JTextField id="fieldPopulationGroupMaxLength" onKeyTyped='valueChanged(true)' onFocusLost='groupMaxLengthChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell fill='horizontal' anchor='east'>
- <JLabel text="isisfish.populationGroup.comments"/>
+ <JLabel text="isisfish.populationGroup.comments" enabled='{isActif()}'/>
</cell>
<cell columns='2' fill='both' weightx='1.0' weighty='0.5'>
<JScrollPane>
- <JTextArea id="fieldPopulationGroupComment" onKeyTyped='valueChanged(true)' onFocusLost='groupCommentChanged()'/>
+ <JTextArea id="fieldPopulationGroupComment" onKeyTyped='valueChanged(true)' onFocusLost='groupCommentChanged()' enabled='{isActif()}'/>
</JScrollPane>
</cell>
</row>
@@ -204,10 +210,10 @@
<Table>
<row>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='save' enabled='false' text="isisfish.common.save" onActionPerformed='save()'/>
+ <JButton id='save' enabled='{isActif()}' text="isisfish.common.save" onActionPerformed='save()'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='cancel' enabled='false' text="isisfish.common.cancel" onActionPerformed='cancel()'/>
+ <JButton id='cancel' enabled='{isActif()}' text="isisfish.common.cancel" onActionPerformed='cancel()'/>
</cell>
</row>
</Table>
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationMigrationEmigrationUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationMigrationEmigrationUI.jaxx 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationMigrationEmigrationUI.jaxx 2008-12-10 16:49:33 UTC (rev 1657)
@@ -34,7 +34,13 @@
<!--
name="isisfish.populationMigrationEmigration.title"
-->
-<Table>
+<Table implements='InputContent'>
+
+ <!-- ui state when the activite is active -->
+ <Boolean id='actif' javaBean='false'/>
+
+ <Boolean id='changed' javaBean='false'/>
+
<script><![CDATA[
import fr.ifremer.isisfish.entities.Population;
import fr.ifremer.isisfish.entities.PopulationSeasonInfo;
@@ -56,8 +62,10 @@
setContextValue(action);
}
- public void refresh(PopulationSeasonInfo pi){
+ public void init(PopulationSeasonInfo pi){
popInfo = pi;
+ }
+ public void refresh(){
pop = getContextValue(InputAction.class).getPopulation();
if (pop != null){
setFieldPopulationMigrationMigrationGroupChooserModel();
@@ -101,7 +109,7 @@
(Zone) fieldPopulationMigrationEmigrationDepartureZoneChooser.getSelectedItem(),
Double.parseDouble(fieldPopulationMigrationEmigrationCoefficient.getText()));
getParentContainer(PopulationMigrationUI.class).valueChanged(true);
- refresh(popInfo);
+ refresh();
}
protected void remove(){
@@ -119,30 +127,30 @@
log.error("Can't remove migration", eee);
// return new OutputView("Error.xml", "error", eee.getMessage());
}
- refresh(popInfo);
+ refresh();
}
]]>
</script>
<row>
<cell>
- <JLabel text="isisfish.common.populationGroup"/>
+ <JLabel text="isisfish.common.populationGroup" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JComboBox id="fieldPopulationMigrationEmigrationGroupChooser"/>
+ <JComboBox id="fieldPopulationMigrationEmigrationGroupChooser" enabled='{isActif()}'/>
</cell>
<cell>
- <JLabel text="isisfish.populationMigrationEmigration.coefficient"/>
+ <JLabel text="isisfish.populationMigrationEmigration.coefficient" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JTextField id="fieldPopulationMigrationEmigrationCoefficient"/>
+ <JTextField id="fieldPopulationMigrationEmigrationCoefficient" enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell>
- <JLabel text="isisfish.populationMigrationEmigration.departureZone"/>
+ <JLabel text="isisfish.populationMigrationEmigration.departureZone" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JComboBox id="fieldPopulationMigrationEmigrationDepartureZoneChooser"/>
+ <JComboBox id="fieldPopulationMigrationEmigrationDepartureZoneChooser" enabled='{isActif()}'/>
</cell>
<cell columns='2' fill='horizontal' weightx='0.5'>
<JPanel/>
@@ -150,17 +158,17 @@
</row>
<row columns='4'>
<cell fill='horizontal' weightx='1.0'>
- <JButton id="add" text="isisfish.common.add" onActionPerformed='add()'/>
+ <JButton id="add" text="isisfish.common.add" onActionPerformed='add()' enabled='{isActif()}'/>
</cell>
</row>
<row columns='4'>
<cell fill='both' weightx='1.0' weighty='1.0'>
- <org.codelutin.math.matrix.gui.MatrixPanelEditor id ='populationMigrationEmigrationTable'/>
+ <org.codelutin.math.matrix.gui.MatrixPanelEditor id ='populationMigrationEmigrationTable' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell columns='4' fill='horizontal' weightx='1.0'>
- <JButton id="remove" text="isisfish.common.remove" onActionPerformed='remove()'/>
+ <JButton id="remove" text="isisfish.common.remove" onActionPerformed='remove()' enabled='{isActif()}'/>
</cell>
</row>
</Table>
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationMigrationEquationUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationMigrationEquationUI.jaxx 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationMigrationEquationUI.jaxx 2008-12-10 16:49:33 UTC (rev 1657)
@@ -30,7 +30,13 @@
* by : $Author: sletellier $
*/
-->
-<Table name="isisfish.populationMigrationEquation.title">
+<Table name="isisfish.populationMigrationEquation.title" implements='InputContent'>
+
+ <!-- ui state when the activite is active -->
+ <Boolean id='actif' javaBean='false'/>
+
+ <Boolean id='changed' javaBean='false'/>
+
<script><![CDATA[
import fr.ifremer.isisfish.entities.PopulationSeasonInfo;
@@ -38,22 +44,29 @@
import fr.ifremer.isisfish.entities.Formule;
protected Population pop = null;
+ protected PopulationSeasonInfo popInfo = null;
public PopulationMigrationEquationUI (InputAction action){
setContextValue(action);
}
- public void refresh(PopulationSeasonInfo popInfo){
+ public void init(PopulationSeasonInfo pi){
+ this.popInfo = pi;
+ }
+ public void refresh(){
pop = getContextValue(InputAction.class).getPopulation();
if (pop != null){
- migrationEquation.refresh(_("isisfish.common.migration"), (Formule)popInfo.getMigrationEquation(), "Migration", fr.ifremer.isisfish.equation.MigrationEquation.class);
- emigrationEquation.refresh(_("isisfish.common.emigration"), (Formule)popInfo.getEmigrationEquation(), "Emigration", fr.ifremer.isisfish.equation.EmigrationEquation.class);
- immigrationEquation.refresh(_("isisfish.common.immigration"), (Formule)popInfo.getImmigrationEquation(), "Immigration", fr.ifremer.isisfish.equation.ImmigrationEquation.class);
+ migrationEquation.init(_("isisfish.common.migration"), (Formule)popInfo.getMigrationEquation(), "Migration", fr.ifremer.isisfish.equation.MigrationEquation.class);
+ emigrationEquation.init(_("isisfish.common.emigration"), (Formule)popInfo.getEmigrationEquation(), "Emigration", fr.ifremer.isisfish.equation.EmigrationEquation.class);
+ immigrationEquation.init(_("isisfish.common.immigration"), (Formule)popInfo.getImmigrationEquation(), "Immigration", fr.ifremer.isisfish.equation.ImmigrationEquation.class);
}
else{
- migrationEquation.refresh(_("isisfish.common.migration"), null, "Migration", fr.ifremer.isisfish.equation.MigrationEquation.class);
- emigrationEquation.refresh(_("isisfish.common.emigration"), null, "Emigration", fr.ifremer.isisfish.equation.EmigrationEquation.class);
- immigrationEquation.refresh(_("isisfish.common.immigration"), null, "Immigration", fr.ifremer.isisfish.equation.ImmigrationEquation.class);
+ migrationEquation.init(_("isisfish.common.migration"), null, "Migration", fr.ifremer.isisfish.equation.MigrationEquation.class);
+ emigrationEquation.init(_("isisfish.common.emigration"), null, "Emigration", fr.ifremer.isisfish.equation.EmigrationEquation.class);
+ immigrationEquation.init(_("isisfish.common.immigration"), null, "Immigration", fr.ifremer.isisfish.equation.ImmigrationEquation.class);
}
+ migrationEquation.refresh();
+ emigrationEquation.refresh();
+ immigrationEquation.refresh();
}
]]>
</script>
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationMigrationImmigrationUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationMigrationImmigrationUI.jaxx 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationMigrationImmigrationUI.jaxx 2008-12-10 16:49:33 UTC (rev 1657)
@@ -33,7 +33,13 @@
<!-- Fixme : ContextDataSource
name="isisfish.populationMigrationImmigration.title"
-->
-<Table>
+<Table implements='InputContent'>
+
+ <!-- ui state when the activite is active -->
+ <Boolean id='actif' javaBean='false'/>
+
+ <Boolean id='changed' javaBean='false'/>
+
<script><![CDATA[
import fr.ifremer.isisfish.entities.Population;
@@ -48,12 +54,15 @@
protected PopulationSeasonInfo popInfo = null;
protected Population pop = null;
- public PopulationMigrationImmigrationUI (InputAction action){
+ public PopulationMigrationImmigrationUI (InputAction action){
setContextValue(action);
}
- public void refresh(PopulationSeasonInfo pi){
- popInfo = pi;
+
+ public void init(PopulationSeasonInfo pi){
+ this.popInfo = pi;
+ }
+ public void refresh(){
pop = getContextValue(InputAction.class).getPopulation();
if (pop != null){
setFieldPopulationMigrationMigrationGroupChooserModel();
@@ -96,7 +105,7 @@
(Zone) fieldPopulationMigrationImmigrationArrivalZoneChooser.getSelectedItem(),
Double.parseDouble(fieldPopulationMigrationImmigrationCoefficient.getText()));
getParentContainer(PopulationMigrationUI.class).valueChanged(true);
- refresh(popInfo);
+ refresh();
}
protected void remove(){
int row = populationMigrationImmigrationTable.getTable().getSelectedRow();
@@ -107,30 +116,30 @@
MatrixND mat = popInfo.getImmigrationMatrix().copy();
mat.setValue(group, departure, arrival, 0);
popInfo.setImmigrationMatrix(mat);
- refresh(popInfo);
+ refresh();
}
]]>
</script>
<row>
<cell>
- <JLabel text="isisfish.common.populationGroup"/>
+ <JLabel text="isisfish.common.populationGroup" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JComboBox id="fieldPopulationMigrationImmigrationGroupChooser"/>
+ <JComboBox id="fieldPopulationMigrationImmigrationGroupChooser" enabled='{isActif()}'/>
</cell>
<cell>
- <JLabel text="isisfish.populationMigrationImmigration.coefficient"/>
+ <JLabel text="isisfish.populationMigrationImmigration.coefficient" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JTextField id="fieldPopulationMigrationImmigrationCoefficient"/>
+ <JTextField id="fieldPopulationMigrationImmigrationCoefficient" enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell>
- <JLabel text="isisfish.populationMigrationImmigration.arrivalZone"/>
+ <JLabel text="isisfish.populationMigrationImmigration.arrivalZone" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JComboBox id="fieldPopulationMigrationImmigrationArrivalZoneChooser"/>
+ <JComboBox id="fieldPopulationMigrationImmigrationArrivalZoneChooser" enabled='{isActif()}'/>
</cell>
<cell columns='2' fill='horizontal' weightx='0.5'>
<JPanel/>
@@ -138,18 +147,17 @@
</row>
<row columns='4'>
<cell fill='horizontal' weightx='1.0'>
- <JButton id="buttonPopulationMigrationImmigrationAdd" text="isisfish.common.add" onActionPerformed='add()'/>
+ <JButton id="buttonPopulationMigrationImmigrationAdd" text="isisfish.common.add" onActionPerformed='add()' enabled='{isActif()}'/>
</cell>
</row>
<row columns='4'>
<cell fill='both' weightx='1.0' weighty='1.0'>
- <org.codelutin.math.matrix.gui.MatrixPanelEditor id ='populationMigrationImmigrationTable'/>
+ <org.codelutin.math.matrix.gui.MatrixPanelEditor id ='populationMigrationImmigrationTable' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell columns='4' fill='horizontal' weightx='1.0'>
- <JButton id="buttonPopulationImmigrationMigrationRemove" text="isisfish.common.remove" onActionPerformed='remove()'/>
+ <JButton id="buttonPopulationImmigrationMigrationRemove" text="isisfish.common.remove" onActionPerformed='remove()' enabled='{isActif()}'/>
</cell>
</row>
-</Table>
-
+</Table>
\ No newline at end of file
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationMigrationMigrationUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationMigrationMigrationUI.jaxx 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationMigrationMigrationUI.jaxx 2008-12-10 16:49:33 UTC (rev 1657)
@@ -31,7 +31,13 @@
*/
-->
-<Table>
+<Table implements='InputContent'>
+
+ <!-- ui state when the activite is active -->
+ <Boolean id='actif' javaBean='false'/>
+
+ <Boolean id='changed' javaBean='false'/>
+
<script><![CDATA[
import fr.ifremer.isisfish.entities.PopulationSeasonInfo;
@@ -47,11 +53,15 @@
protected PopulationSeasonInfo popInfo = null;
protected Population pop = null;
- public PopulationMigrationMigrationUI (InputAction action){
+ protected PopulationSeasonInfo pi;
+ public PopulationMigrationMigrationUI (InputAction action){
setContextValue(action);
}
- public void refresh(PopulationSeasonInfo pi){
+ public void init(PopulationSeasonInfo pi){
+ this.pi = pi;
+ }
+ public void refresh(){
popInfo = pi;
pop = getContextValue(InputAction.class).getPopulation();
if (pop != null){
@@ -106,7 +116,7 @@
(Zone) fieldPopulationMigrationMigrationArrivalZoneChooser.getSelectedItem(),
Double.parseDouble(fieldPopulationMigrationMigrationCoefficient.getText()));
getParentContainer(PopulationMigrationUI.class).valueChanged(true);
- refresh(popInfo);
+ refresh();
}
protected void remove(){
int row = populationMigrationMigrationTable.getTable().getSelectedRow();
@@ -117,51 +127,51 @@
MatrixND mat = popInfo.getMigrationMatrix().copy();
mat.setValue(group, departure, arrival, 0);
popInfo.setMigrationMatrix(mat);
- refresh(popInfo);
+ refresh();
}
]]>
</script>
<row>
<cell>
- <JLabel text="isisfish.common.populationGroup"/>
+ <JLabel text="isisfish.common.populationGroup" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JComboBox id="fieldPopulationMigrationMigrationGroupChooser"/>
+ <JComboBox id="fieldPopulationMigrationMigrationGroupChooser" enabled='{isActif()}'/>
</cell>
<cell>
- <JLabel text="isisfish.populationMigrationMigration.coefficient"/>
+ <JLabel text="isisfish.populationMigrationMigration.coefficient" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JTextField id="fieldPopulationMigrationMigrationCoefficient"/>
+ <JTextField id="fieldPopulationMigrationMigrationCoefficient" enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell>
- <JLabel text="isisfish.populationMigrationMigration.departureZone"/>
+ <JLabel text="isisfish.populationMigrationMigration.departureZone" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JComboBox id="fieldPopulationMigrationMigrationDepartureZoneChooser"/>
+ <JComboBox id="fieldPopulationMigrationMigrationDepartureZoneChooser" enabled='{isActif()}'/>
</cell>
<cell>
- <JLabel text="isisfish.populationMigrationMigration.arrivalZone"/>
+ <JLabel text="isisfish.populationMigrationMigration.arrivalZone" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JComboBox id="fieldPopulationMigrationMigrationArrivalZoneChooser"/>
+ <JComboBox id="fieldPopulationMigrationMigrationArrivalZoneChooser" enabled='{isActif()}'/>
</cell>
</row>
<row columns='4'>
<cell fill='horizontal' weightx='1.0'>
- <JButton id="buttonPopulationMigrationMigrationAdd" text="isisfish.common.add" onActionPerformed='add()'/>
+ <JButton id="buttonPopulationMigrationMigrationAdd" text="isisfish.common.add" onActionPerformed='add()' enabled='{isActif()}'/>
</cell>
</row>
<row columns='4'>
<cell fill='both' weightx='1.0' weighty='1.0'>
- <org.codelutin.math.matrix.gui.MatrixPanelEditor id ='populationMigrationMigrationTable'/>
+ <org.codelutin.math.matrix.gui.MatrixPanelEditor id ='populationMigrationMigrationTable' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell columns='4' fill='horizontal' weightx='1.0'>
- <JButton id="buttonPopulationMigrationMigrationRemove" text="isisfish.common.remove" onActionPerformed='remove()'/>
+ <JButton id="buttonPopulationMigrationMigrationRemove" text="isisfish.common.remove" onActionPerformed='remove()' enabled='{isActif()}'/>
</cell>
</row>
</Table>
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationMigrationUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationMigrationUI.jaxx 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationMigrationUI.jaxx 2008-12-10 16:49:33 UTC (rev 1657)
@@ -31,7 +31,13 @@
*/
-->
-<Table>
+<Table implements='InputContent'>
+
+ <!-- ui state when the activite is active -->
+ <Boolean id='actif' javaBean='false'/>
+
+ <Boolean id='changed' javaBean='false'/>
+
<script><![CDATA[
import fr.ifremer.isisfish.entities.PopulationSeasonInfo;
@@ -43,7 +49,6 @@
import org.apache.commons.logging.LogFactory;
protected Population pop;
- protected boolean changed;
// protected PopulationSeasonInfo populationSeasonInfoSelected = null;
public PopulationMigrationUI (InputAction action){
@@ -57,10 +62,14 @@
if (selected != null){
fieldUseEquationMigration.setSelected(selected.getUseEquationMigration());
useEquationChanged();
- populationMigrationEquationUI.refresh(selected);
- populationMigrationMigrationUI.refresh(selected);
- populationMigrationImmigrationUI.refresh(selected);
- populationMigrationEmigrationUI.refresh(selected);
+ populationMigrationEquationUI.init(selected);
+ populationMigrationMigrationUI.init(selected);
+ populationMigrationImmigrationUI.init(selected);
+ populationMigrationEmigrationUI.init(selected);
+ populationMigrationEquationUI.refresh();
+ populationMigrationMigrationUI.refresh();
+ populationMigrationImmigrationUI.refresh();
+ populationMigrationEmigrationUI.refresh();
}
fieldPopulationMigrationComment.setText(pop.getMigrationComment());
}
@@ -106,17 +115,18 @@
valueChanged(true);
}
protected void save(){
- TopiaEntity topia = getContextValue(InputAction.class).save("Population");
+ TopiaEntity topia = getContextValue(InputAction.class).save();
getParentContainer(InputUI.class).setTreeSelection("$root/$populations/"+topia.getTopiaId());
setInfoText(_("isisfish.message.save.finished"));
refresh();
valueChanged(false);
}
protected void cancel(){
- getContextValue(InputAction.class).cancel("Population");
- setInfoText(_("isisfish.message.cancel.finished"));
+ TopiaEntity topia = getContextValue(InputAction.class).cancel("Population");
valueChanged(false);
refresh();
+ getParentContainer(InputUI.class).setTreeSelection("$root/$populations/"+topia.getTopiaId());
+ setInfoText(_("isisfish.message.cancel.finished"));
}
protected void setInfoText(String txt){
WelcomePanelUI root = getParentContainer(WelcomePanelUI.class);
@@ -131,15 +141,15 @@
</script>
<row>
<cell anchor='east'>
- <JLabel text="isisfish.populationMigration.selectSeason"/>
+ <JLabel text="isisfish.populationMigration.selectSeason" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JComboBox id="fieldPopulationMigrationSeasonChooser" onActionPerformed='seasonChooserChanged()'/>
+ <JComboBox id="fieldPopulationMigrationSeasonChooser" onActionPerformed='seasonChooserChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell columns='2' anchor='west'>
- <JCheckBox id="fieldUseEquationMigration" text="isisfish.populationMigration.useEquation" onActionPerformed='useEquationChanged()'/>
+ <JCheckBox id="fieldUseEquationMigration" text="isisfish.populationMigration.useEquation" onActionPerformed='useEquationChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
@@ -156,11 +166,11 @@
</row>
<row>
<cell anchor='east'>
- <JLabel text="isisfish.populationMigration.comments"/>
+ <JLabel text="isisfish.populationMigration.comments" enabled='{isActif()}'/>
</cell>
<cell fill='both' weightx='1.0' weighty='0.3'>
<JScrollPane>
- <JTextArea id="fieldPopulationMigrationComment" onKeyTyped='valueChanged(true)' onFocusLost='commentChanged()'/>
+ <JTextArea id="fieldPopulationMigrationComment" onKeyTyped='valueChanged(true)' onFocusLost='commentChanged()' enabled='{isActif()}'/>
</JScrollPane>
</cell>
</row>
@@ -169,10 +179,10 @@
<Table>
<row>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='save' enabled='false' text="isisfish.common.save" onActionPerformed='save()'/>
+ <JButton id='save' text="isisfish.common.save" onActionPerformed='save()' enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='cancel' enabled='false' text="isisfish.common.cancel" onActionPerformed='cancel()'/>
+ <JButton id='cancel' text="isisfish.common.cancel" onActionPerformed='cancel()' enabled='{isActif()}'/>
</cell>
</row>
</Table>
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationOneEquationUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationOneEquationUI.jaxx 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationOneEquationUI.jaxx 2008-12-10 16:49:33 UTC (rev 1657)
@@ -31,7 +31,13 @@
*/
-->
-<Table>
+<Table implements='InputContent'>
+
+ <!-- ui state when the activite is active -->
+ <Boolean id='actif' javaBean='false'/>
+
+ <Boolean id='changed' javaBean='false'/>
+
<script><![CDATA[
import fr.ifremer.isisfish.ui.widget.editor.GenericCell;
@@ -42,14 +48,23 @@
import java.util.logging.Logger;
protected Population pop = null;
- protected boolean changed = false;
protected Class clazz = null;
protected String nameEquation = null;
- public PopulationOneEquationUI (InputAction action){
-
+ protected String lblText;
+ protected Formule f;
+ protected String name;
+ protected Class c;
+
+ public PopulationOneEquationUI (InputAction action){
setContextValue(action);
}
- public void refresh(String lblText, Formule f, String name, Class c){
+ public void init(String lblText, Formule f, String name, Class c){
+ this.lblText = lblText;
+ this.f = f;
+ this.name = name;
+ this.c = c;
+ }
+ public void refresh(){
lbl.setText(lblText);
clazz = c;
try {
@@ -121,7 +136,7 @@
<JLabel id='lbl'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JComboBox id="combo" onActionPerformed='comboChanged()'/>
+ <JComboBox id="combo" onActionPerformed='comboChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
@@ -129,12 +144,12 @@
<Table>
<row>
<cell fill='horizontal'>
- <JButton text="isisfish.common.saveModel" onActionPerformed='saveModel()'/>
+ <JButton text="isisfish.common.saveModel" onActionPerformed='saveModel()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell fill='horizontal'>
- <JButton text="isisfish.common.openEditor" onActionPerformed='openEditor()'/>
+ <JButton text="isisfish.common.openEditor" onActionPerformed='openEditor()' enabled='{isActif()}'/>
</cell>
</row>
<row>
@@ -146,7 +161,7 @@
</cell>
<cell fill='both' weightx='1.0' weighty='1.0'>
<JScrollPane>
- <org.codelutin.widget.editor.Editor id='editor' askIfNotSaved="false" onKeyTyped='valueChanged(true)' onFocusLost='valueChanged(true)'/>
+ <org.codelutin.widget.editor.Editor id='editor' askIfNotSaved="false" onKeyTyped='valueChanged(true)' onFocusLost='valueChanged(true)' enabled='{isActif()}'/>
</JScrollPane>
</cell>
</row>
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationRecruitmentUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationRecruitmentUI.jaxx 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationRecruitmentUI.jaxx 2008-12-10 16:49:33 UTC (rev 1657)
@@ -30,7 +30,13 @@
* by : $Author: sletellier $
*/
-->
-<Table>
+<Table implements='InputContent'>
+
+ <!-- ui state when the activite is active -->
+ <Boolean id='actif' javaBean='false'/>
+
+ <Boolean id='changed' javaBean='false'/>
+
<script><![CDATA[
import fr.ifremer.isisfish.entities.Equation;
@@ -43,7 +49,6 @@
import java.util.logging.Logger;
protected Population pop = null;
- protected boolean changed = false;
public PopulationRecruitmentUI (InputAction action){
setContextValue(action);
@@ -129,17 +134,18 @@
refresh();
}
protected void save(){
- TopiaEntity topia = getContextValue(InputAction.class).save("Population");
+ TopiaEntity topia = getContextValue(InputAction.class).save();
getParentContainer(InputUI.class).setTreeSelection("$root/$populations/"+topia.getTopiaId());
setInfoText(_("isisfish.message.save.finished"));
refresh();
valueChanged(false);
}
protected void cancel(){
- getContextValue(InputAction.class).cancel("Metier");
- setInfoText(_("isisfish.message.cancel.finished"));
+ TopiaEntity topia = getContextValue(InputAction.class).cancel("Metier");
valueChanged(false);
refresh();
+ getParentContainer(InputUI.class).setTreeSelection("$root/$metiers/"+topia.getTopiaId());
+ setInfoText(_("isisfish.message.cancel.finished"));
}
protected void setInfoText(String txt){
WelcomePanelUI root = getParentContainer(WelcomePanelUI.class);
@@ -157,10 +163,10 @@
<Table>
<row>
<cell anchor='east'>
- <JLabel text="isisfish.populationRecruitment.reproductionEquation"/>
+ <JLabel text="isisfish.populationRecruitment.reproductionEquation" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JComboBox id="fieldPopulationReproductionEquation" onActionPerformed='equationChanged()'/>
+ <JComboBox id="fieldPopulationReproductionEquation" onActionPerformed='equationChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
@@ -168,12 +174,12 @@
<Table>
<row>
<cell fill='horizontal'>
- <JButton text="isisfish.common.saveModel" onActionPerformed='saveModel()'/>
+ <JButton text="isisfish.common.saveModel" onActionPerformed='saveModel()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell fill='horizontal'>
- <JButton text="isisfish.common.openEditor" onActionPerformed='openEditor()'/>
+ <JButton text="isisfish.common.openEditor" onActionPerformed='openEditor()' enabled='{isActif()}'/>
</cell>
</row>
<row>
@@ -185,21 +191,21 @@
</cell>
<cell fill='both' weightx='1.0' weighty='0.5'>
<JScrollPane>
- <org.codelutin.widget.editor.Editor id='editor' askIfNotSaved="false"/>
+ <org.codelutin.widget.editor.Editor id='editor' askIfNotSaved="false" enabled='{isActif()}'/>
</JScrollPane>
</cell>
</row>
<row>
<cell anchor='east'>
- <JLabel text="Month Gap BetweenRepro Recruitment"/>
+ <JLabel text="Month Gap BetweenRepro Recruitment" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JTextField id="fieldPopulationMonthGapBetweenReproRecrutement" onKeyTyped='valueChanged(true)' onFocusLost='monthGapChanged()'/>
+ <JTextField id="fieldPopulationMonthGapBetweenReproRecrutement" onKeyTyped='valueChanged(true)' onFocusLost='monthGapChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell anchor='east'>
- <JLabel text="isisfish.populationRecruitment.recruitmentDistribution"/>
+ <JLabel text="isisfish.populationRecruitment.recruitmentDistribution" enabled='{isActif()}'/>
</cell>
<cell fill='both' weightx='1.0'>
<JTable/>
@@ -210,16 +216,16 @@
<JPanel/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JButton id="create" text="isisfish.common.newMatrix" onActionPerformed='create()'/>
+ <JButton id="create" text="isisfish.common.newMatrix" onActionPerformed='create()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell anchor='east'>
- <JLabel text="isisfish.populationRecruitment.comments"/>
+ <JLabel text="isisfish.populationRecruitment.comments" enabled='{isActif()}'/>
</cell>
<cell fill='both' weightx='1.0' weighty='0.5'>
<JScrollPane>
- <JTextArea id="fieldPopulationRecruitmentComment" onKeyTyped='valueChanged(true)' onFocusLost='commentChanged()'/>
+ <JTextArea id="fieldPopulationRecruitmentComment" onKeyTyped='valueChanged(true)' onFocusLost='commentChanged()' enabled='{isActif()}'/>
</JScrollPane>
</cell>
</row>
@@ -231,10 +237,10 @@
<Table>
<row>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='save' enabled='false' text="isisfish.common.save" onActionPerformed='save()'/>
+ <JButton id='save' text="isisfish.common.save" onActionPerformed='save()' enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='cancel' enabled='false' text="isisfish.common.cancel" onActionPerformed='cancel()'/>
+ <JButton id='cancel' text="isisfish.common.cancel" onActionPerformed='cancel()' enabled='{isActif()}'/>
</cell>
</row>
</Table>
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationSeasonsUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationSeasonsUI.jaxx 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationSeasonsUI.jaxx 2008-12-10 16:49:33 UTC (rev 1657)
@@ -31,7 +31,13 @@
*/
-->
-<Table>
+<Table implements='InputContent'>
+
+ <!-- ui state when the activite is active -->
+ <Boolean id='actif' javaBean='false'/>
+
+ <Boolean id='changed' javaBean='false'/>
+
<script><![CDATA[
import fr.ifremer.isisfish.entities.PopulationSeasonInfo;
@@ -44,7 +50,6 @@
import fr.ifremer.isisfish.ui.widget.IntervalPanel;
protected Population pop = null;
- protected boolean changed = false;
protected IntervalPanel ip = new IntervalPanel();
fieldPopulationSeasonInterval.add(ip, BorderLayout.CENTER);
public PopulationSeasonsUI (InputAction action){
@@ -159,16 +164,17 @@
setInfoText(_("isisfish.message.creation.finished"));
}
protected void save(){
- TopiaEntity topia = getContextValue(InputAction.class).save("Population");
+ TopiaEntity topia = getContextValue(InputAction.class).save();
setInfoText(_("isisfish.message.save.finished"));
refresh();
valueChanged(false);
}
protected void cancel(){
- getContextValue(InputAction.class).cancel("Metier");
- setInfoText(_("isisfish.message.cancel.finished"));
+ TopiaEntity topia = getContextValue(InputAction.class).cancel("Metier");
valueChanged(false);
refresh();
+ getParentContainer(InputUI.class).setTreeSelection("$root/$metiers/"+topia.getTopiaId());
+ setInfoText(_("isisfish.message.cancel.finished"));
}
protected void remove(){
setInfoText(getContextValue(InputAction.class).remove());
@@ -191,18 +197,18 @@
<Table>
<row>
<cell anchor='east'>
- <JLabel text="isisfish.populationSeasons.selectSeason"/>
+ <JLabel text="isisfish.populationSeasons.selectSeason" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JComboBox id="fieldPopulationSeasonInfoChooser" onActionPerformed='infoChooserChanged()'/>
+ <JComboBox id="fieldPopulationSeasonInfoChooser" onActionPerformed='infoChooserChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell anchor='east'>
- <JLabel text="isisfish.common.season"/>
+ <JLabel text="isisfish.common.season" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JPanel id='fieldPopulationSeasonInterval' layout='{new BorderLayout()}'/>
+ <JPanel id='fieldPopulationSeasonInterval' layout='{new BorderLayout()}' enabled='{isActif()}'/>
</cell>
</row>
<row>
@@ -210,24 +216,24 @@
<JPanel/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JCheckBox id="fieldPopulationSeasonGroupChange" text="isisfish.populationSeasons.changeGroup" onActionPerformed='groupChangedChanged()'/>
+ <JCheckBox id="fieldPopulationSeasonGroupChange" text="isisfish.populationSeasons.changeGroup" onActionPerformed='groupChangedChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell anchor='east'>
- <JLabel text="isisfish.populationSeasons.distributionSpawning"/>
+ <JLabel text="isisfish.populationSeasons.distributionSpawning" enabled='{isActif()}'/>
</cell>
<cell fill='both' weightx='1.0'>
- <org.codelutin.math.matrix.gui.MatrixPanelEditor id ='fieldPopulationSeasonReproductionDistribution'/>
+ <org.codelutin.math.matrix.gui.MatrixPanelEditor id ='fieldPopulationSeasonReproductionDistribution' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell anchor='east'>
- <JLabel text="isisfish.populationSeasons.comments"/>
+ <JLabel text="isisfish.populationSeasons.comments" enabled='{isActif()}'/>
</cell>
<cell fill='both' weightx='1.0' weighty='1.0'>
<JScrollPane>
- <JTextArea id="fieldPopulationSeasonComment" onKeyTyped='valueChanged(true)' onFocusLost='commentChanged()'/>
+ <JTextArea id="fieldPopulationSeasonComment" onKeyTyped='valueChanged(true)' onFocusLost='commentChanged()' enabled='{isActif()}'/>
</JScrollPane>
</cell>
</row>
@@ -239,10 +245,10 @@
<Table>
<row>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='save' enabled='false' text="isisfish.common.save" onActionPerformed='save()'/>
+ <JButton id='save' text="isisfish.common.save" onActionPerformed='save()' enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='cancel' enabled='false' text="isisfish.common.cancel" onActionPerformed='cancel()'/>
+ <JButton id='cancel' text="isisfish.common.cancel" onActionPerformed='cancel()' enabled='{isActif()}'/>
</cell>
</row>
<row>
@@ -250,7 +256,7 @@
<JButton id='create' text="isisfish.common.new" onActionPerformed='create()'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='remove' text="isisfish.common.remove" onActionPerformed='remove()'/>
+ <JButton id='remove' text="isisfish.common.remove" onActionPerformed='remove()' enabled='{isActif()}'/>
</cell>
</row>
</Table>
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationUI.jaxx 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationUI.jaxx 2008-12-10 16:49:33 UTC (rev 1657)
@@ -35,7 +35,13 @@
<!--
+ Population
+-->
-<JPanel layout='{new BorderLayout()}'>
+<JPanel layout='{new BorderLayout()}' implements='InputContent'>
+
+ <!-- ui state when the activite is active -->
+ <Boolean id='actif' javaBean='false'/>
+
+ <Boolean id='changed' javaBean='false'/>
+
<script><![CDATA[
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationZonesUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationZonesUI.jaxx 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PopulationZonesUI.jaxx 2008-12-10 16:49:33 UTC (rev 1657)
@@ -31,7 +31,13 @@
*/
-->
-<Table>
+<Table implements='InputContent'>
+
+ <!-- ui state when the activite is active -->
+ <Boolean id='actif' javaBean='false'/>
+
+ <Boolean id='changed' javaBean='false'/>
+
<script><![CDATA[
import jaxx.runtime.swing.JAXXList;
@@ -43,7 +49,6 @@
import org.codelutin.math.matrix.gui.MatrixPanelEvent;
import org.codelutin.math.matrix.gui.MatrixPanelListener;
- protected boolean changed = false;
protected Population pop = null;
public PopulationZonesUI (InputAction action){
@@ -154,17 +159,18 @@
return selectedZone;
}
protected void save(){
- TopiaEntity topia = getContextValue(InputAction.class).save("Population");
+ TopiaEntity topia = getContextValue(InputAction.class).save();
getParentContainer(InputUI.class).setTreeSelection("$root/$populations/"+topia.getTopiaId());
setInfoText(_("isisfish.message.save.finished"));
refresh();
valueChanged(false);
}
protected void cancel(){
- getContextValue(InputAction.class).cancel("Population");
- setInfoText(_("isisfish.message.cancel.finished"));
+ TopiaEntity topia = getContextValue(InputAction.class).cancel("Population");
valueChanged(false);
refresh();
+ getParentContainer(InputUI.class).setTreeSelection("$root/$populations/"+topia.getTopiaId());
+ setInfoText(_("isisfish.message.cancel.finished"));
}
protected void setInfoText(String txt){
WelcomePanelUI root = getParentContainer(WelcomePanelUI.class);
@@ -179,40 +185,40 @@
</script>
<row>
<cell fill='horizontal' weightx='0.3'>
- <JLabel text="isisfish.populationZones.selectPopulationAreas"/>
+ <JLabel text="isisfish.populationZones.selectPopulationAreas" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.3'>
- <JLabel text="isisfish.populationZones.selectSpawningAreas"/>
+ <JLabel text="isisfish.populationZones.selectSpawningAreas" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.3'>
- <JLabel text="isisfish.populationZones.selectRecruitmentAreas"/>
+ <JLabel text="isisfish.populationZones.selectRecruitmentAreas" enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell fill='both' weightx='0.3' weighty='0.5'>
<JScrollPane minimumSize='{new Dimension(0,0)}' preferredSize='{new Dimension(0,0)}'>
- <JList id="populationZonesPresence" onMouseClicked='presenceChanged()'/>
+ <JList id="populationZonesPresence" onMouseClicked='presenceChanged()' enabled='{isActif()}'/>
</JScrollPane>
</cell>
<cell fill='both' weightx='0.3' weighty='0.5'>
<JScrollPane minimumSize='{new Dimension(0,0)}' preferredSize='{new Dimension(0,0)}'>
- <JList id="fieldPopulationZonesReproduction" onMouseClicked='reproductionChanged()'/>
+ <JList id="fieldPopulationZonesReproduction" onMouseClicked='reproductionChanged()' enabled='{isActif()}'/>
</JScrollPane>
</cell>
<cell fill='both' weightx='0.3' weighty='0.5'>
<JScrollPane minimumSize='{new Dimension(0,0)}' preferredSize='{new Dimension(0,0)}'>
- <JList id="fieldPopulationZonesRecruitment" onMouseClicked='recruitementChanged()'/>
+ <JList id="fieldPopulationZonesRecruitment" onMouseClicked='recruitementChanged()' enabled='{isActif()}'/>
</JScrollPane>
</cell>
</row>
<row>
<cell columns='3' anchor='west'>
- <JLabel text="isisfish.populationZones.betweenSpawningRecruitmentAreas"/>
+ <JLabel text="isisfish.populationZones.betweenSpawningRecruitmentAreas" enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell columns='3' fill='both' weightx='1.0' weighty='0.5'>
- <org.codelutin.math.matrix.gui.MatrixPanelEditor id ='fieldPopulationMappingZoneReproZoneRecru'/>
+ <org.codelutin.math.matrix.gui.MatrixPanelEditor id ='fieldPopulationMappingZoneReproZoneRecru' enabled='{isActif()}'/>
</cell>
</row>
<row>
@@ -220,12 +226,12 @@
<Table>
<row>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='save' enabled='false' text="isisfish.common.save" onActionPerformed='save()'/>
+ <JButton id='save' text="isisfish.common.save" onActionPerformed='save()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='cancel' enabled='false' text="isisfish.common.cancel" onActionPerformed='cancel()'/>
+ <JButton id='cancel' text="isisfish.common.cancel" onActionPerformed='cancel()' enabled='{isActif()}'/>
</cell>
</row>
</Table>
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PortUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PortUI.jaxx 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/PortUI.jaxx 2008-12-10 16:49:33 UTC (rev 1657)
@@ -35,7 +35,13 @@
<!--
+ Port
+-->
-<Table>
+<Table implements='InputContent'>
+
+ <!-- ui state when the activite is active -->
+ <Boolean id='actif' javaBean='false'/>
+
+ <Boolean id='changed' javaBean='false'/>
+
<script><![CDATA[
import fr.ifremer.isisfish.entities.Species;
@@ -51,12 +57,11 @@
protected IsisMapBean portMap = new IsisMapBean();
protected OpenMapToolPanel toolMap = new OpenMapToolPanel();
protected OMToolSet toolSet = new OMToolSet();
- protected boolean changed = false;
public PortUI (InputAction action){
setContextValue(action);
}
- protected void refresh() {
+ public void refresh() {
Port port = getContextValue(InputAction.class).getPort();
if (port != null){
fieldPortName.setText(port.getName());
@@ -114,7 +119,7 @@
setInfoText(_("isisfish.message.creation.finished"));
}
protected void save(){
- TopiaEntity topia = getContextValue(InputAction.class).save("Port");
+ TopiaEntity topia = getContextValue(InputAction.class).save();
getParentContainer(InputUI.class).setTreeModel();
getParentContainer(InputUI.class).setTreeSelection("$root/$ports/"+topia.getTopiaId());
setInfoText(_("isisfish.message.save.finished"));
@@ -122,10 +127,11 @@
valueChanged(false);
}
protected void cancel(){
- getContextValue(InputAction.class).cancel("Port");
- setInfoText(_("isisfish.message.cancel.finished"));
+ TopiaEntity topia = getContextValue(InputAction.class).cancel("Port");
valueChanged(false);
refresh();
+ getParentContainer(InputUI.class).setTreeSelection("$root/$ports/"+topia.getTopiaId());
+ setInfoText(_("isisfish.message.cancel.finished"));
}
protected void remove(){
setInfoText(getContextValue(InputAction.class).remove());
@@ -147,12 +153,10 @@
protected void nameChanged(){
getContextValue(InputAction.class).getPort().setName(fieldPortName.getText());
valueChanged(true);
- refresh();
}
protected void portCellChanged(){
getContextValue(InputAction.class).getPort().setCell((Cell)portCell.getSelectedValue());
valueChanged(true);
- refresh();
}
protected void commentChanged(){
getContextValue(InputAction.class).getPort().setComment(fieldPortComment.getText());
@@ -167,45 +171,45 @@
<Table>
<row>
<cell columns='2' fill='horizontal' weightx='1.0' >
- <JLabel text="isisfish.port.name"/>
+ <JLabel text="isisfish.port.name" enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell columns='2' fill='horizontal' weightx='1.0' >
- <JTextField id="fieldPortName" onKeyTyped='valueChanged(true)' onFocusLost='nameChanged()'/>
+ <JTextField id="fieldPortName" onKeyTyped='valueChanged(true)' onFocusLost='nameChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell columns='2' fill='horizontal' weightx='1.0' >
- <JLabel text="isisfish.port.cell"/>
+ <JLabel text="isisfish.port.cell" enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell columns='2' fill='both' weighty='0.7' weightx='1.0'>
<JScrollPane>
- <JList id="portCell" selectionMode="0" onMouseClicked='portCellChanged()'/>
+ <JList id="portCell" selectionMode="0" onMouseClicked='portCellChanged()' enabled='{isActif()}'/>
</JScrollPane>
</cell>
</row>
<row>
<cell columns='2' fill='horizontal' weightx='1.0'>
- <JLabel text="isisfish.port.comments"/>
+ <JLabel text="isisfish.port.comments" enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell columns='2' fill='both' weighty='0.3' weightx='1.0' >
<JScrollPane>
- <JTextArea id="fieldPortComment" onKeyTyped='valueChanged(true)' onFocusLost='commentChanged()'/>
+ <JTextArea id="fieldPortComment" onKeyTyped='valueChanged(true)' onFocusLost='commentChanged()' enabled='{isActif()}'/>
</JScrollPane>
</cell>
</row>
<row>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='save' enabled='false' text="isisfish.common.save" onActionPerformed='save()'/>
+ <JButton id='save' text="isisfish.common.save" onActionPerformed='save()' enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='cancel' enabled='false' text="isisfish.common.cancel" onActionPerformed='cancel()'/>
+ <JButton id='cancel' text="isisfish.common.cancel" onActionPerformed='cancel()' enabled='{isActif()}'/>
</cell>
</row>
<row>
@@ -213,7 +217,7 @@
<JButton id='create' text="isisfish.common.new" onActionPerformed='create()'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='remove' text="isisfish.common.remove" onActionPerformed='remove()'/>
+ <JButton id='remove' text="isisfish.common.remove" onActionPerformed='remove()' enabled='{isActif()}'/>
</cell>
</row>
</Table>
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/SelectivityUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/SelectivityUI.jaxx 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/SelectivityUI.jaxx 2008-12-10 16:49:33 UTC (rev 1657)
@@ -30,7 +30,13 @@
* by : $Author: sletellier $
*/
-->
-<Table>
+<Table implements='InputContent'>
+
+ <!-- ui state when the activite is active -->
+ <Boolean id='actif' javaBean='false'/>
+
+ <Boolean id='changed' javaBean='false'/>
+
<script>
<![CDATA[
@@ -48,7 +54,6 @@
import org.codelutin.topia.persistence.TopiaEntity;
import fr.ifremer.isisfish.ui.widget.editor.GenericCell;
- boolean changed = false;
public SelectivityUI (InputAction action){
setContextValue(action);
@@ -144,17 +149,18 @@
refresh();
}
protected void save(){
- TopiaEntity topia = getContextValue(InputAction.class).save("Gear");
+ TopiaEntity topia = getContextValue(InputAction.class).save();
getParentContainer(InputUI.class).setTreeSelection("$root/$gears/"+topia.getTopiaId());
setInfoText(_("isisfish.message.save.finished"));
refresh();
valueChanged(false);
}
protected void cancel(){
- getContextValue(InputAction.class).cancel("Gear");
- setInfoText(_("isisfish.message.cancel.finished"));
+ TopiaEntity topia = getContextValue(InputAction.class).cancel("Gear");
valueChanged(false);
refresh();
+ getParentContainer(InputUI.class).setTreeSelection("$root/$gears/"+topia.getTopiaId());
+ setInfoText(_("isisfish.message.cancel.finished"));
}
protected void valueChanged(boolean b){
changed=b;
@@ -181,18 +187,18 @@
<Table>
<row>
<cell fill='horizontal' anchor='east'>
- <JLabel text="isisfish.selectivity.selectPopulation"/>
+ <JLabel text="isisfish.selectivity.selectPopulation" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JComboBox id="fieldSelectivityPopulation"/>
+ <JComboBox id="fieldSelectivityPopulation" enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell fill='horizontal' anchor='east'>
- <JLabel text="isisfish.selectivity.equation"/>
+ <JLabel text="isisfish.selectivity.equation" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JComboBox id="fieldSelectivityEquation" onActionPerformed='equationChanged()'/>
+ <JComboBox id="fieldSelectivityEquation" onActionPerformed='equationChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
@@ -200,12 +206,12 @@
<Table>
<row>
<cell fill='horizontal'>
- <JButton id='saveModel' text="isisfish.common.saveModel" onActionPerformed='saveAsModel()'/>
+ <JButton id='saveModel' text="isisfish.common.saveModel" onActionPerformed='saveAsModel()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell fill='horizontal'>
- <JButton id='openEditor' text="isisfish.common.openEditor" onActionPerformed='openEditor()'/>
+ <JButton id='openEditor' text="isisfish.common.openEditor" onActionPerformed='openEditor()' enabled='{isActif()}'/>
</cell>
</row>
<row>
@@ -217,7 +223,7 @@
</cell>
<cell fill='both' weightx='1.0' weighty='1.0'>
<JScrollPane>
- <org.codelutin.widget.editor.Editor id='fieldSelectivityScript' askIfNotSaved="false"/>
+ <org.codelutin.widget.editor.Editor id='fieldSelectivityScript' askIfNotSaved="false" enabled='{isActif()}'/>
</JScrollPane>
</cell>
</row>
@@ -229,28 +235,27 @@
<Table>
<row>
<cell columns='2' fill='horizontal' weightx='1.0'>
- <JButton id="buttonAddSelectivity" text="isisfish.common.add" onActionPerformed='add()'/>
+ <JButton id="buttonAddSelectivity" text="isisfish.common.add" onActionPerformed='add()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell columns='2' fill='both' weightx='1.0' weighty='1.0'>
<JScrollPane>
- <JTable id="selectivityTable">
- </JTable>
+ <JTable id="selectivityTable" enabled='{isActif()}'/>
</JScrollPane>
</cell>
</row>
<row>
<cell columns='2' fill='horizontal' weightx='1.0'>
- <JButton id="buttonSelectivityRemove" text="isisfish.common.remove" onActionPerformed='remove()'/>
+ <JButton id="buttonSelectivityRemove" text="isisfish.common.remove" onActionPerformed='remove()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell fill='horizontal' weightx='1.0'>
- <JButton id='save' text="isisfish.common.save" onActionPerformed='save()' enabled='false'/>
+ <JButton id='save' text="isisfish.common.save" onActionPerformed='save()' enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JButton id='cancel' text="isisfish.common.cancel" onActionPerformed='cancel()' enabled='false'/>
+ <JButton id='cancel' text="isisfish.common.cancel" onActionPerformed='cancel()' enabled='{isActif()}'/>
</cell>
</row>
</Table>
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/SetOfVesselsTabsUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/SetOfVesselsTabsUI.jaxx 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/SetOfVesselsTabsUI.jaxx 2008-12-10 16:49:33 UTC (rev 1657)
@@ -31,7 +31,13 @@
*/
-->
-<Table>
+<Table implements='InputContent'>
+
+ <!-- ui state when the activite is active -->
+ <Boolean id='actif' javaBean='false'/>
+
+ <Boolean id='changed' javaBean='false'/>
+
<script><![CDATA[
import org.codelutin.topia.TopiaException;
@@ -45,12 +51,11 @@
import java.util.logging.Level;
import java.util.logging.Logger;
- protected boolean changed = false;
public SetOfVesselsTabsUI (InputAction action){
setContextValue(action);
}
- protected void refresh() {
+ public void refresh() {
fr.ifremer.isisfish.entities.SetOfVessels setOfVessels = getContextValue(InputAction.class).getSetOfVessels();
if (setOfVessels != null){
fieldSetOfVesselsName.setText(setOfVessels.getName());
@@ -146,7 +151,7 @@
setInfoText(_("isisfish.message.creation.finished"));
}
protected void save(){
- TopiaEntity topia = getContextValue(InputAction.class).save("SetOfVessels");
+ TopiaEntity topia = getContextValue(InputAction.class).save();
getParentContainer(InputUI.class).setTreeModel();
getParentContainer(InputUI.class).setTreeSelection("$root/$setOfVessels/"+topia.getTopiaId());
setInfoText(_("isisfish.message.save.finished"));
@@ -154,10 +159,11 @@
valueChanged(false);
}
protected void cancel(){
- getContextValue(InputAction.class).cancel("SetOfVessels");
- setInfoText(_("isisfish.message.cancel.finished"));
+ TopiaEntity topia = getContextValue(InputAction.class).cancel("SetOfVessels");
valueChanged(false);
refresh();
+ getParentContainer(InputUI.class).setTreeSelection("$root/$setOfVessels/"+topia.getTopiaId());
+ setInfoText(_("isisfish.message.cancel.finished"));
}
protected void remove(){
setInfoText(getContextValue(InputAction.class).remove());
@@ -237,50 +243,50 @@
<Table>
<row>
<cell anchor='east'>
- <JLabel text="isisfish.setOfVessels.name"/>
+ <JLabel text="isisfish.setOfVessels.name" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JTextField id="fieldSetOfVesselsName" onKeyTyped='valueChanged(true)' onFocusLost='nameChanged()'/>
+ <JTextField id="fieldSetOfVesselsName" onKeyTyped='valueChanged(true)' onFocusLost='nameChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell anchor='east'>
- <JLabel text="isisfish.common.port"/>
+ <JLabel text="isisfish.common.port" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JComboBox id="fieldSetOfVesselsPort" onActionPerformed='portChanged()'/>
+ <JComboBox id="fieldSetOfVesselsPort" onActionPerformed='portChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell anchor='east'>
- <JLabel text="isisfish.setOfVessels.vesselType"/>
+ <JLabel text="isisfish.setOfVessels.vesselType" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JComboBox id="fieldSetOfVesselsVesselType" onActionPerformed='vesselTypeChanged()'/>
+ <JComboBox id="fieldSetOfVesselsVesselType" onActionPerformed='vesselTypeChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell anchor='east'>
- <JLabel text="isisfish.setOfVessels.numberOfVessels"/>
+ <JLabel text="isisfish.setOfVessels.numberOfVessels" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JTextField id="fieldSetOfVesselsNumberOfVessels" onKeyTyped='valueChanged(true)' onFocusLost='numberOfVesselsChanged()'/>
+ <JTextField id="fieldSetOfVesselsNumberOfVessels" onKeyTyped='valueChanged(true)' onFocusLost='numberOfVesselsChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell anchor='east'>
- <JLabel text="isisfish.setOfVessels.fixedCosts"/>
+ <JLabel text="isisfish.setOfVessels.fixedCosts" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JTextField id="fieldSetOfVesselsFixedCosts" onKeyTyped='valueChanged(true)' onFocusLost='fixedCostsChanged()'/>
+ <JTextField id="fieldSetOfVesselsFixedCosts" onKeyTyped='valueChanged(true)' onFocusLost='fixedCostsChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell anchor='east'>
- <JLabel text="isisfish.setOfVessels.technicalEfficiency"/>
+ <JLabel text="isisfish.setOfVessels.technicalEfficiency" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JComboBox id="fieldSetOfVesselsTechnicalEfficiency" onActionPerformed='technicalEfficiencyChanged()'/>
+ <JComboBox id="fieldSetOfVesselsTechnicalEfficiency" onActionPerformed='technicalEfficiencyChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
@@ -288,12 +294,12 @@
<Table>
<row>
<cell fill='horizontal'>
- <JButton text="isisfish.common.saveModel" onActionPerformed='saveAsModel()'/>
+ <JButton text="isisfish.common.saveModel" onActionPerformed='saveAsModel()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell fill='horizontal'>
- <JButton text="isisfish.common.openEditor" onActionPerformed='openEditor()'/>
+ <JButton text="isisfish.common.openEditor" onActionPerformed='openEditor()' enabled='{isActif()}'/>
</cell>
</row>
<row>
@@ -305,17 +311,17 @@
</cell>
<cell fill='both' weightx='1.0' weighty='0.7'>
<JScrollPane minimumSize='{new Dimension(0,0)}' preferredSize='{new Dimension(0,0)}'>
- <org.codelutin.widget.editor.Editor id='editor' askIfNotSaved="false"/>
+ <org.codelutin.widget.editor.Editor id='editor' askIfNotSaved="false" enabled='{isActif()}'/>
</JScrollPane>
</cell>
</row>
<row>
<cell anchor='east'>
- <JLabel text="isisfish.setOfVessels.comments"/>
+ <JLabel text="isisfish.setOfVessels.comments" enabled='{isActif()}'/>
</cell>
<cell fill='both' weightx='1.0' weighty='0.3'>
<JScrollPane>
- <JTextArea id="fieldSetOfVesselsComment" onKeyTyped='valueChanged(true)' onFocusLost='commentChanged()'/>
+ <JTextArea id="fieldSetOfVesselsComment" onKeyTyped='valueChanged(true)' onFocusLost='commentChanged()' enabled='{isActif()}'/>
</JScrollPane>
</cell>
</row>
@@ -327,10 +333,10 @@
<Table>
<row>
<cell fill='horizontal' weightx='1.0'>
- <JButton id='save' enabled='false' text="isisfish.common.save" onActionPerformed='save()'/>
+ <JButton id='save' text="isisfish.common.save" onActionPerformed='save()' enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JButton id='cancel' enabled='false' text="isisfish.common.cancel" onActionPerformed='cancel()'/>
+ <JButton id='cancel' text="isisfish.common.cancel" onActionPerformed='cancel()' enabled='{isActif()}'/>
</cell>
</row>
<row>
@@ -338,7 +344,7 @@
<JButton id='create' text="isisfish.common.new" onActionPerformed='create()'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JButton id='remove' text="isisfish.common.remove" onActionPerformed='remove()'/>
+ <JButton id='remove' text="isisfish.common.remove" onActionPerformed='remove()' enabled='{isActif()}'/>
</cell>
</row>
</Table>
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/SetOfVesselsUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/SetOfVesselsUI.jaxx 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/SetOfVesselsUI.jaxx 2008-12-10 16:49:33 UTC (rev 1657)
@@ -35,14 +35,20 @@
<!--
+ SetOfVessels
+-->
-<JPanel layout='{new BorderLayout()}'>
+<JPanel implements='InputContent' layout='{new BorderLayout()}'>
+
+ <!-- ui state when the activite is active -->
+ <Boolean id='actif' javaBean='false'/>
+
+ <Boolean id='changed' javaBean='false'/>
+
<script><![CDATA[
import fr.ifremer.isisfish.entities.Strategy;
public SetOfVesselsUI (InputAction action){
setContextValue(action);
}
- protected void refresh() {
+ public void refresh() {
setOfVesselsTabsUI.refresh();
effortDescriptionUI.refresh();
}
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/SpeciesUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/SpeciesUI.jaxx 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/SpeciesUI.jaxx 2008-12-10 16:49:33 UTC (rev 1657)
@@ -35,7 +35,13 @@
<!--
+ Species
+-->
-<Table>
+<Table implements='InputContent'>
+
+ <!-- ui state when the activite is active -->
+ <Boolean id='actif' javaBean='false'/>
+
+ <Boolean id='changed' javaBean='false'/>
+
<script><![CDATA[
import fr.ifremer.isisfish.entities.Population;
import fr.ifremer.isisfish.entities.Species;
@@ -43,12 +49,11 @@
import org.codelutin.topia.persistence.TopiaEntity;
import org.codelutin.topia.TopiaException;
- protected boolean changed = false;
public SpeciesUI (InputAction action){
setContextValue(action);
}
- protected void refresh() {
+ public void refresh() {
Species s = getContextValue(InputAction.class).getSpecies();
if (s != null){
fieldSpeciesName.setText(s.getName());
@@ -78,7 +83,7 @@
setInfoText(_("isisfish.message.creation.finished"));
}
protected void save(){
- TopiaEntity topia = getContextValue(InputAction.class).save("Species");
+ TopiaEntity topia = getContextValue(InputAction.class).save();
getParentContainer(InputUI.class).setTreeModel();
getParentContainer(InputUI.class).setTreeSelection("$root/$species/"+topia.getTopiaId());
@@ -87,10 +92,11 @@
valueChanged(false);
}
protected void cancel(){
- getContextValue(InputAction.class).cancel("Species");
- setInfoText(_("isisfish.message.cancel.finished"));
+ TopiaEntity topia = getContextValue(InputAction.class).cancel("Species");
valueChanged(false);
refresh();
+ getParentContainer(InputUI.class).setTreeSelection("$root/$species/"+topia.getTopiaId());
+ setInfoText(_("isisfish.message.cancel.finished"));
}
protected void remove(){
setInfoText(getContextValue(InputAction.class).remove());
@@ -147,62 +153,54 @@
<Table>
<row>
<cell>
- <JLabel text="isisfish.species.name"/>
-
+ <JLabel text="isisfish.species.name" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' columns='2' weightx='1.0'>
- <JTextField id="fieldSpeciesName" onFocusLost='nameChanged()'/>
+ <JTextField id="fieldSpeciesName" onFocusLost='nameChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell>
- <JLabel text="isisfish.species.scientificName"/>
-
+ <JLabel text="isisfish.species.scientificName" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' columns='2' weightx='1.0'>
- <JTextField id="fieldSpeciesScientificName" onFocusLost='scientificNameChanged()'/>
+ <JTextField id="fieldSpeciesScientificName" onFocusLost='scientificNameChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell>
-
- <JLabel text="isisfish.species.rubbinCode"/>
-
+ <JLabel text="isisfish.species.rubbinCode" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' columns='2' weightx='1.0'>
- <JTextField id="fieldSpeciesCodeRubbin" onFocusLost='codeChanged()'/>
+ <JTextField id="fieldSpeciesCodeRubbin" onFocusLost='codeChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell>
- <JLabel text="isisfish.species.cee"/>
-
+ <JLabel text="isisfish.species.cee" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' columns='2' weightx='1.0'>
- <JTextField id="fieldSpeciesCEE" onFocusLost='CEEChanged()'/>
+ <JTextField id="fieldSpeciesCEE" onFocusLost='CEEChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell>
- <JLabel text="isisfish.species.structured"/>
-
-
+ <JLabel text="isisfish.species.structured" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JRadioButton id="fieldSpeciesDynamicAge" text="isisfish.species.age" buttonGroup="structuredGroup" onItemStateChanged='dynamicAgeChanged()'/>
+ <JRadioButton id="fieldSpeciesDynamicAge" text="isisfish.species.age" buttonGroup="structuredGroup" onItemStateChanged='dynamicAgeChanged()' enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JRadioButton id="fieldSpeciesDynamicLength" text="isisfish.species.length" buttonGroup="structuredGroup"/>
+ <JRadioButton id="fieldSpeciesDynamicLength" text="isisfish.species.length" buttonGroup="structuredGroup" enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell>
- <JLabel text="isisfish.species.comments"/>
-
+ <JLabel text="isisfish.species.comments" enabled='{isActif()}'/>
</cell>
<cell fill='both' columns='2' weightx='1.0' weighty='1.0'>
<JScrollPane>
- <JTextArea id="fieldSpeciesComment" onFocusLost='commentChanged()'/>
+ <JTextArea id="fieldSpeciesComment" onFocusLost='commentChanged()' enabled='{isActif()}'/>
</JScrollPane>
</cell>
</row>
@@ -214,10 +212,10 @@
<Table>
<row>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='save' enabled='false' text="isisfish.common.save" onActionPerformed='save()'/>
+ <JButton id='save' text="isisfish.common.save" onActionPerformed='save()' enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='cancel' enabled='false' text="isisfish.common.cancel" onActionPerformed='cancel()'/>
+ <JButton id='cancel' text="isisfish.common.cancel" onActionPerformed='cancel()' enabled='{isActif()}'/>
</cell>
</row>
<row>
@@ -225,7 +223,7 @@
<JButton id='create' text="isisfish.common.new" onActionPerformed='create()'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='remove' text="isisfish.common.remove" onActionPerformed='remove()'/>
+ <JButton id='remove' text="isisfish.common.remove" onActionPerformed='remove()' enabled='{isActif()}'/>
</cell>
</row>
<row>
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/StrategyMonthInfoUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/StrategyMonthInfoUI.jaxx 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/StrategyMonthInfoUI.jaxx 2008-12-10 16:49:33 UTC (rev 1657)
@@ -31,42 +31,61 @@
*/
-->
-<JPanel layout='{new BorderLayout()}'>
+<JPanel layout='{new BorderLayout()}' implements='InputContent'>
+
+ <!-- ui state when the activite is active -->
+ <Boolean id='actif' javaBean='false'/>
+
+ <Boolean id='changed' javaBean='false'/>
+
<script><![CDATA[
import fr.ifremer.isisfish.entities.StrategyMonthInfo;
import fr.ifremer.isisfish.types.Month;
import fr.ifremer.isisfish.ui.WelcomePanelUI;
import org.codelutin.topia.persistence.TopiaEntity;
- protected boolean changed = false;
public StrategyMonthInfoUI (InputAction action){
setContextValue(action);
}
- protected void refresh() {
- strategyJanuary.refresh(Month.JANUARY);
- strategyFebuary.refresh(Month.FEBRUARY);
- strategyMarch.refresh(Month.MARCH);
- strategyApril.refresh(Month.APRIL);
- strategyMay.refresh(Month.MAY);
- strategyJune.refresh(Month.JUNE);
- strategyJuly.refresh(Month.JULY);
- strategyAugust.refresh(Month.AUGUST);
- strategySeptember.refresh(Month.SEPTEMBER);
- strategyOctober.refresh(Month.OCTOBER);
- strategyNovember.refresh(Month.NOVEMBER);
- strategyDecember.refresh(Month.DECEMBER);
+ public void refresh() {
+ strategyJanuary.init(Month.JANUARY);
+ strategyFebuary.init(Month.FEBRUARY);
+ strategyMarch.init(Month.MARCH);
+ strategyApril.init(Month.APRIL);
+ strategyMay.init(Month.MAY);
+ strategyJune.init(Month.JUNE);
+ strategyJuly.init(Month.JULY);
+ strategyAugust.init(Month.AUGUST);
+ strategySeptember.init(Month.SEPTEMBER);
+ strategyOctober.init(Month.OCTOBER);
+ strategyNovember.init(Month.NOVEMBER);
+ strategyDecember.init(Month.DECEMBER);
+ strategyJanuary.refresh();
+ strategyFebuary.refresh();
+ strategyMarch.refresh();
+ strategyApril.refresh();
+ strategyMay.refresh();
+ strategyJune.refresh();
+ strategyJuly.refresh();
+ strategyAugust.refresh();
+ strategySeptember.refresh();
+ strategyOctober.refresh();
+ strategyNovember.refresh();
+ strategyDecember.refresh();
}
protected void save(){
- TopiaEntity topia = getContextValue(InputAction.class).save("Strategy");
+ TopiaEntity topia = getContextValue(InputAction.class).save();
getParentContainer(InputUI.class).setTreeSelection("$root/$strategies/"+topia.getTopiaId());
setInfoText(_("isisfish.message.save.finished"));
refresh();
}
protected void cancel(){
- getContextValue(InputAction.class).cancel("Strategy");
+ TopiaEntity topia = getContextValue(InputAction.class).cancel("Strategy");
+ valueChanged(false);
+ refresh();
+ getParentContainer(InputUI.class).setTreeSelection("$root/$strategies/"+topia.getTopiaId());
setInfoText(_("isisfish.message.cancel.finished"));
- refresh();
}
protected void setInfoText(String txt){
WelcomePanelUI root = getParentContainer(WelcomePanelUI.class);
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/StrategyOneMonthInfoUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/StrategyOneMonthInfoUI.jaxx 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/StrategyOneMonthInfoUI.jaxx 2008-12-10 16:49:33 UTC (rev 1657)
@@ -31,7 +31,13 @@
*/
-->
-<Table>
+<Table implements='InputContent'>
+
+ <!-- ui state when the activite is active -->
+ <Boolean id='actif' javaBean='false'/>
+
+ <Boolean id='changed' javaBean='false'/>
+
<script><![CDATA[
import fr.ifremer.isisfish.entities.StrategyMonthInfo;
@@ -41,15 +47,15 @@
import fr.ifremer.isisfish.ui.widget.editor.GenericCell;
protected StrategyMonthInfo strategyMonthInfo = null;
- protected boolean changed = false;
+ Month month = null;
public StrategyOneMonthInfoUI (InputAction action){
setContextValue(action);
}
- protected void refresh(Month m) {
+ public void refresh() {
Strategy strategy = getContextValue(InputAction.class).getStrategy();
- if (strategy != null && m != null){
- strategyMonthInfo = strategy.getStrategyMonthInfo(m);
+ if (strategy != null && month != null){
+ strategyMonthInfo = strategy.getStrategyMonthInfo(month);
setFieldStrategyMonthInfoTripTypeModel();
numberOfTrips.setText(strategyMonthInfo.getNumberOfTrips() + "");
fieldStrategyMonthInfoMinInactivityDays.setText(strategyMonthInfo.getMinInactivityDays() + "");
@@ -65,6 +71,9 @@
valueChanged(false);
}
}
+ public void init(Month m){
+ month = m;
+ }
protected void setFieldStrategyMonthInfoTripTypeModel(){
DefaultComboBoxModel model = new DefaultComboBoxModel();
TripType selected = strategyMonthInfo.getTripType();
@@ -115,41 +124,33 @@
]]></script>
<row>
<cell columns='2' fill='horizontal' weightx='1.0' anchor='west'>
- <JLabel id='StrategieMonth'/>
+ <JLabel id='StrategieMonth' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell columns='2' fill='horizontal' weightx='1.0'>
- <JComboBox id="fieldStrategyMonthInfoTripType" onActionPerformed='tripTypeChanged()'/>
+ <JComboBox id="fieldStrategyMonthInfoTripType" onActionPerformed='tripTypeChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell fill='horizontal' weightx='0.5' anchor='west'>
- <JLabel text="isisfish.strategyMonthInfo.numberOfTrips"/>
+ <JLabel text="isisfish.strategyMonthInfo.numberOfTrips" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.5' anchor='west'>
- <JLabel id='numberOfTrips'/>
+ <JLabel id='numberOfTrips' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell fill='horizontal' weightx='0.5' anchor='west'>
- <JLabel text="isisfish.strategyMonthInfo.minInactivityDays"/>
+ <JLabel text="isisfish.strategyMonthInfo.minInactivityDays" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JTextField id="fieldStrategyMonthInfoMinInactivityDays" onKeyTyped='valueChanged(true)' onFocusLost='minInactivityDayChanged()'/>
+ <JTextField id="fieldStrategyMonthInfoMinInactivityDays" onKeyTyped='valueChanged(true)' onFocusLost='minInactivityDayChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell columns='2' fill='both' weightx='1.0' weighty='1.0'>
- <org.codelutin.math.matrix.gui.MatrixPanelEditor id="fieldStrategyMonthInfoProportion"/>
+ <org.codelutin.math.matrix.gui.MatrixPanelEditor id="fieldStrategyMonthInfoProportion" enabled='{isActif()}'/>
</cell>
</row>
-</Table>
-
-
-
-
-
-
-
-
\ No newline at end of file
+</Table>
\ No newline at end of file
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/StrategyTabUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/StrategyTabUI.jaxx 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/StrategyTabUI.jaxx 2008-12-10 16:49:33 UTC (rev 1657)
@@ -31,7 +31,13 @@
*/
-->
-<Table>
+<Table implements='InputContent'>
+
+ <!-- ui state when the activite is active -->
+ <Boolean id='actif' javaBean='false'/>
+
+ <Boolean id='changed' javaBean='false'/>
+
<script><![CDATA[
import fr.ifremer.isisfish.entities.Equation;
import fr.ifremer.isisfish.entities.Formule;
@@ -42,13 +48,11 @@
import java.util.logging.Level;
import java.util.logging.Logger;
- boolean changed = false;
-
public StrategyTabUI (InputAction action){
setContextValue(action);
}
- protected void refresh() {
+ public void refresh() {
fr.ifremer.isisfish.entities.Strategy strategy = getContextValue(InputAction.class).getStrategy();
if (strategy != null){
fieldStrategyName.setText(strategy.getName());
@@ -142,7 +146,7 @@
setInfoText(_("isisfish.message.creation.finished"));
}
protected void save(){
- TopiaEntity topia = getContextValue(InputAction.class).save("Strategy");
+ TopiaEntity topia = getContextValue(InputAction.class).save();
getParentContainer(InputUI.class).setTreeModel();
getParentContainer(InputUI.class).setTreeSelection("$root/$strategies/"+topia.getTopiaId());
setInfoText(_("isisfish.message.save.finished"));
@@ -150,10 +154,11 @@
valueChanged(false);
}
protected void cancel(){
- getContextValue(InputAction.class).cancel("Strategy");
- setInfoText(_("isisfish.message.cancel.finished"));
+ TopiaEntity topia = getContextValue(InputAction.class).cancel("Strategy");
valueChanged(false);
refresh();
+ getParentContainer(InputUI.class).setTreeSelection("$root/$strategies/"+topia.getTopiaId());
+ setInfoText(_("isisfish.message.cancel.finished"));
}
protected void remove(){
setInfoText(getContextValue(InputAction.class).remove());
@@ -175,26 +180,26 @@
<Table>
<row>
<cell anchor='west'>
- <JLabel text="isisfish.strategy.name"/>
+ <JLabel text="isisfish.strategy.name" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JTextField id="fieldStrategyName" onKeyTyped='valueChanged(true)' onFocusLost='nameChanged()'/>
+ <JTextField id="fieldStrategyName" onKeyTyped='valueChanged(true)' onFocusLost='nameChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell anchor='west'>
- <JLabel text="isisfish.common.setOfVessels"/>
+ <JLabel text="isisfish.common.setOfVessels" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JComboBox id="fieldStrategySetOfVessels" onActionPerformed='setOfVesselsChanged()'/>
+ <JComboBox id="fieldStrategySetOfVessels" onActionPerformed='setOfVesselsChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell anchor='west'>
- <JLabel text="isisfish.strategy.proportionSetOfVessels"/>
+ <JLabel text="isisfish.strategy.proportionSetOfVessels" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JTextField id="fieldStrategyProportionSetOfVessels" onKeyTyped='valueChanged(true)' onFocusLost='proportionSetOfVesselsChanged()'/>
+ <JTextField id="fieldStrategyProportionSetOfVessels" onKeyTyped='valueChanged(true)' onFocusLost='proportionSetOfVesselsChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
@@ -202,15 +207,15 @@
<JPanel/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JCheckBox id="fieldUseEquationInactivity" text="isisfish.strategy.inactivityEquationUsed" onActionPerformed='useInactivityChanged()'/>
+ <JCheckBox id="fieldUseEquationInactivity" text="isisfish.strategy.inactivityEquationUsed" onActionPerformed='useInactivityChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell anchor='west'>
- <JLabel text="isisfish.strategy.inactivity"/>
+ <JLabel text="isisfish.strategy.inactivity" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JComboBox id="fieldStrategyInactivity" onActionPerformed='inactivityChanged()'/>
+ <JComboBox id="fieldStrategyInactivity" onActionPerformed='inactivityChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
@@ -218,12 +223,12 @@
<Table>
<row>
<cell fill='horizontal'>
- <JButton text="isisfish.common.saveModel" onActionPerformed='saveModel()'/>
+ <JButton text="isisfish.common.saveModel" onActionPerformed='saveModel()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell fill='horizontal'>
- <JButton text="isisfish.common.openEditor" onActionPerformed='openEditor()'/>
+ <JButton text="isisfish.common.openEditor" onActionPerformed='openEditor()' enabled='{isActif()}'/>
</cell>
</row>
<row>
@@ -234,16 +239,16 @@
</Table>
</cell>
<cell fill='both' weightx='1.0' weighty='0.7'>
- <org.codelutin.widget.editor.Editor id='editor' askIfNotSaved="false"/>
+ <org.codelutin.widget.editor.Editor id='editor' askIfNotSaved="false" enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell anchor='west'>
- <JLabel text="isisfish.strategy.comments"/>
+ <JLabel text="isisfish.strategy.comments" enabled='{isActif()}'/>
</cell>
<cell fill='both' weightx='1.0' weighty='0.3'>
<JScrollPane>
- <JTextArea id="fieldStrategyComment" onKeyTyped='valueChanged(true)' onFocusLost='commentChanged()'/>
+ <JTextArea id="fieldStrategyComment" onKeyTyped='valueChanged(true)' onFocusLost='commentChanged()' enabled='{isActif()}'/>
</JScrollPane>
</cell>
</row>
@@ -255,10 +260,10 @@
<Table>
<row>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='save' enabled='false' text="isisfish.common.save" onActionPerformed='save()'/>
+ <JButton id='save' text="isisfish.common.save" onActionPerformed='save()' enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='cancel' enabled='false' text="isisfish.common.cancel" onActionPerformed='cancel()'/>
+ <JButton id='cancel' text="isisfish.common.cancel" onActionPerformed='cancel()' enabled='{isActif()}'/>
</cell>
</row>
<row>
@@ -266,7 +271,7 @@
<JButton id='create' text="isisfish.common.new" onActionPerformed='create()'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='remove' text="isisfish.common.remove" onActionPerformed='remove()'/>
+ <JButton id='remove' text="isisfish.common.remove" onActionPerformed='remove()' enabled='{isActif()}'/>
</cell>
</row>
</Table>
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/StrategyUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/StrategyUI.jaxx 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/StrategyUI.jaxx 2008-12-10 16:49:33 UTC (rev 1657)
@@ -34,13 +34,18 @@
<!--
+ Strategy
+-->
-<JTabbedPane id="StrategyTab" name="Strategy" >
+<JTabbedPane id="StrategyTab" name="Strategy" implements='InputContent'>
+
+ <!-- ui state when the activite is active -->
+ <Boolean id='actif' javaBean='false'/>
+
+ <Boolean id='changed' javaBean='false'/>
+
<script><![CDATA[
- public StrategyUI (InputAction action){
-
+ public StrategyUI (InputAction action){
setContextValue(action);
}
- protected void refresh() {
+ public void refresh() {
strategyTabUI.refresh();
strategyMonthInfoUI.refresh();
}
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/TripTypeUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/TripTypeUI.jaxx 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/TripTypeUI.jaxx 2008-12-10 16:49:33 UTC (rev 1657)
@@ -33,7 +33,13 @@
<!--
+ TripType
+-->
-<Table>
+<Table implements='InputContent'>
+
+ <!-- ui state when the activite is active -->
+ <Boolean id='actif' javaBean='false'/>
+
+ <Boolean id='changed' javaBean='false'/>
+
<script><![CDATA[
import fr.ifremer.isisfish.ui.WelcomePanelUI;
import org.codelutin.topia.persistence.TopiaEntity;
@@ -41,12 +47,11 @@
import fr.ifremer.isisfish.entities.VesselType;
import fr.ifremer.isisfish.types.TimeUnit;
- boolean changed = false;
public TripTypeUI (InputAction action){
setContextValue(action);
}
- protected void refresh() {
+ public void refresh() {
if (getContextValue(InputAction.class).getTripType() != null){
fieldTripTypeName.setText(getContextValue(InputAction.class).getTripType().getName());
fieldTripTypeDuration.setText("" + getContextValue(InputAction.class).getTripType().getTripDuration().getHour());
@@ -94,7 +99,7 @@
setInfoText(_("isisfish.message.creation.finished"));
}
protected void save(){
- TopiaEntity topia = getContextValue(InputAction.class).save("TripType");
+ TopiaEntity topia = getContextValue(InputAction.class).save();
getParentContainer(InputUI.class).setTreeModel();
getParentContainer(InputUI.class).setTreeSelection("$root/$tripTypes/"+topia.getTopiaId());
setInfoText(_("isisfish.message.save.finished"));
@@ -102,10 +107,11 @@
valueChanged(false);
}
protected void cancel(){
- getContextValue(InputAction.class).cancel("TripType");
- setInfoText(_("isisfish.message.cancel.finished"));
+ TopiaEntity topia = getContextValue(InputAction.class).cancel("TripType");
valueChanged(false);
refresh();
+ getParentContainer(InputUI.class).setTreeSelection("$root/$tripTypes/"+topia.getTopiaId());
+ setInfoText(_("isisfish.message.cancel.finished"));
}
protected void remove(){
setInfoText(getContextValue(InputAction.class).remove());
@@ -122,36 +128,35 @@
<Table>
<row>
<cell>
- <JLabel text="isisfish.tripType.name"/>
+ <JLabel text="isisfish.tripType.name" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JTextField id="fieldTripTypeName" onKeyTyped='valueChanged(true)' onFocusLost='nameChanged()'/>
+ <JTextField id="fieldTripTypeName" onKeyTyped='valueChanged(true)' onFocusLost='nameChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell>
- <JLabel text="isisfish.tripType.duration"/>
+ <JLabel text="isisfish.tripType.duration" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JTextField id="fieldTripTypeDuration" onKeyTyped='valueChanged(true)' onFocusLost='typeDurationChanged()'/>
+ <JTextField id="fieldTripTypeDuration" onKeyTyped='valueChanged(true)' onFocusLost='typeDurationChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell>
- <JLabel text="isisfish.tripType.minTime"/>
+ <JLabel text="isisfish.tripType.minTime" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JTextField id="fieldTripTypeMinTimeBetweenTrip" onKeyTyped='valueChanged(true)' onFocusLost='minTimeChanged()'/>
+ <JTextField id="fieldTripTypeMinTimeBetweenTrip" onKeyTyped='valueChanged(true)' onFocusLost='minTimeChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell>
-
- <JLabel text="isisfish.tripType.comments"/>
+ <JLabel text="isisfish.tripType.comments" enabled='{isActif()}'/>
</cell>
<cell fill='both' weightx='1.0' weighty='1.0'>
<JScrollPane>
- <JTextArea id="fieldTripTypeComment" onKeyTyped='valueChanged(true)' onFocusLost='commentChanged()'/>
+ <JTextArea id="fieldTripTypeComment" onKeyTyped='valueChanged(true)' onFocusLost='commentChanged()' enabled='{isActif()}'/>
</JScrollPane>
</cell>
</row>
@@ -163,24 +168,23 @@
<Table>
<row>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='save' enabled='false' text="isisfish.common.save" onActionPerformed='save()'/>
+ <JButton id='save' text="isisfish.common.save" onActionPerformed='save()' enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='cancel' enabled='false' text="isisfish.common.cancel" onActionPerformed='cancel()'/>
-
+ <JButton id='cancel' text="isisfish.common.cancel" onActionPerformed='cancel()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='create' text="isisfish.common.new" onActionPerformed='create()'/>
+ <JButton id='create' text="isisfish.common.new" onActionPerformed='create()' enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='remove' text="isisfish.common.remove" onActionPerformed='remove()'/>
+ <JButton id='remove' text="isisfish.common.remove" onActionPerformed='remove()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell columns ='2' fill='horizontal' weightx='1.0'>
- <JButton text="isisfish.input.continueVesselTypes" onActionPerformed='goToVesselTypes()'/>
+ <JButton text="isisfish.input.continueVesselTypes" onActionPerformed='goToVesselTypes()' enabled='{isActif()}'/>
</cell>
</row>
</Table>
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/VesselTypeUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/VesselTypeUI.jaxx 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/VesselTypeUI.jaxx 2008-12-10 16:49:33 UTC (rev 1657)
@@ -31,7 +31,13 @@
*/
-->
-<JPanel layout='{new BorderLayout()}'>
+<JPanel layout='{new BorderLayout()}' implements='InputContent'>
+
+ <!-- ui state when the activite is active -->
+ <Boolean id='actif' javaBean='false'/>
+
+ <Boolean id='changed' javaBean='false'/>
+
<script><![CDATA[
import fr.ifremer.isisfish.entities.VesselType;
import fr.ifremer.isisfish.entities.TripType;
@@ -40,12 +46,10 @@
import org.codelutin.topia.persistence.TopiaEntity;
import fr.ifremer.isisfish.types.TimeUnit;
- boolean changed = false;
public VesselTypeUI (InputAction action){
-
setContextValue(action);
}
- protected void refresh() {
+ public void refresh() {
VesselType vesselType = getContextValue(InputAction.class).getVesselType();
setVesselTypeTripTypeModel();
if (vesselType != null){
@@ -89,7 +93,7 @@
setInfoText(_("isisfish.message.creation.finished"));
}
protected void save(){
- TopiaEntity topia = getContextValue(InputAction.class).save("VesselType");
+ TopiaEntity topia = getContextValue(InputAction.class).save();
getParentContainer(InputUI.class).setTreeModel();
getParentContainer(InputUI.class).setTreeSelection("$root/$vesselTypes/"+topia.getTopiaId());
setInfoText(_("isisfish.message.save.finished"));
@@ -97,10 +101,11 @@
valueChanged(false);
}
protected void cancel(){
- getContextValue(InputAction.class).cancel("VesselType");
- setInfoText(_("isisfish.message.cancel.finished"));
+ TopiaEntity topia = getContextValue(InputAction.class).cancel("VesselType");
valueChanged(false);
refresh();
+ getParentContainer(InputUI.class).setTreeSelection("$root/$vesselTypes/"+topia.getTopiaId());
+ setInfoText(_("isisfish.message.cancel.finished"));
}
protected void remove(){
setInfoText(getContextValue(InputAction.class).remove());
@@ -112,7 +117,6 @@
root.setInfoText(txt);
}
protected void valueChanged(boolean b){
- changed=b;
cancel.setEnabled(b);
save.setEnabled(b);
}
@@ -158,77 +162,77 @@
<Table>
<row>
<cell fill='horizontal' anchor='east'>
- <JLabel text="isisfish.vesselType.name"/>
+ <JLabel text="isisfish.vesselType.name" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JTextField id="fieldVesselTypeName" onKeyTyped='valueChanged(true)' onFocusLost='nameChanged()'/>
+ <JTextField id="fieldVesselTypeName" enabled='{isActif()}' onKeyTyped='valueChanged(true)' onFocusLost='nameChanged()'/>
</cell>
</row>
<row>
<cell fill='horizontal' anchor='east'>
- <JLabel text="isisfish.vesselType.length"/>
+ <JLabel text="isisfish.vesselType.length" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JTextField id="fieldVesselTypeLength" onKeyTyped='valueChanged(true)' onFocusLost='lenghtChanged()'/>
+ <JTextField id="fieldVesselTypeLength" enabled='{isActif()}' onKeyTyped='valueChanged(true)' onFocusLost='lenghtChanged()'/>
</cell>
</row>
<row>
<cell fill='horizontal' anchor='east'>
- <JLabel text="isisfish.vesselType.speed"/>
+ <JLabel text="isisfish.vesselType.speed" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JTextField id="fieldVesselTypeSpeed" onKeyTyped='valueChanged(true)' onFocusLost='speedChanged()'/>
+ <JTextField id="fieldVesselTypeSpeed" enabled='{isActif()}' onKeyTyped='valueChanged(true)' onFocusLost='speedChanged()'/>
</cell>
</row>
<row>
<cell fill='horizontal' anchor='east'>
- <JLabel text="isisfish.vesselType.maxDuration"/>
+ <JLabel text="isisfish.vesselType.maxDuration" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JTextField id="fieldVesselTypeMaxTripDuration" onKeyTyped='valueChanged(true)' onFocusLost='tripDurationChanged()'/>
+ <JTextField id="fieldVesselTypeMaxTripDuration" enabled='{isActif()}' onKeyTyped='valueChanged(true)' onFocusLost='tripDurationChanged()'/>
</cell>
</row>
<row>
<cell fill='horizontal' anchor='east'>
- <JLabel text="isisfish.vesselType.activityRange"/>
+ <JLabel text="isisfish.vesselType.activityRange" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JTextField id="fieldVesselTypeActivityRange" onKeyTyped='valueChanged(true)' onFocusLost='activityRangeChanged()'/>
+ <JTextField id="fieldVesselTypeActivityRange" enabled='{isActif()}' onKeyTyped='valueChanged(true)' onFocusLost='activityRangeChanged()'/>
</cell>
</row>
<row>
<cell fill='horizontal' anchor='east'>
- <JLabel text="isisfish.vesselType.miniCrew"/>
+ <JLabel text="isisfish.vesselType.miniCrew" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JTextField id="fieldVesselTypeMinCrewSize" onKeyTyped='valueChanged(true)' onFocusLost='minCrewChanged()'/>
+ <JTextField id="fieldVesselTypeMinCrewSize" enabled='{isActif()}' onKeyTyped='valueChanged(true)' onFocusLost='minCrewChanged()'/>
</cell>
</row>
<row>
<cell fill='horizontal' anchor='east'>
- <JLabel text="isisfish.vesselType.fuelCost"/>
+ <JLabel text="isisfish.vesselType.fuelCost" enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='1.0'>
- <JTextField id="fieldVesselTypeUnitFuelCostOfTravel" onKeyTyped='valueChanged(true)' onFocusLost='unitFuelCostChanged()'/>
+ <JTextField id="fieldVesselTypeUnitFuelCostOfTravel" onKeyTyped='valueChanged(true)' onFocusLost='unitFuelCostChanged()' enabled='{isActif()}'/>
</cell>
</row>
<row>
<cell fill='horizontal' anchor='east'>
- <JLabel text="isisfish.common.tripType"/>
+ <JLabel text="isisfish.common.tripType" enabled='{isActif()}'/>
</cell>
<cell fill='both' weightx='1.0' weighty='0.7'>
<JScrollPane>
- <JList id="vesselTypeTripType" onValueChanged='tripTypeChanged()'/>
+ <JList id="vesselTypeTripType" onValueChanged='tripTypeChanged()' enabled='{isActif()}'/>
</JScrollPane>
</cell>
</row>
<row>
<cell fill='horizontal' anchor='east'>
- <JLabel text="isisfish.vesselType.comments"/>
+ <JLabel text="isisfish.vesselType.comments" enabled='{isActif()}'/>
</cell>
<cell fill='both' weightx='1.0' weighty='0.3'>
<JScrollPane>
- <JTextArea id="fieldVesselTypeComment" onKeyTyped='valueChanged(true)' onFocusLost='commentChanged()'/>
+ <JTextArea id="fieldVesselTypeComment" onKeyTyped='valueChanged(true)' onFocusLost='commentChanged()' enabled='{isActif()}'/>
</JScrollPane>
</cell>
</row>
@@ -240,10 +244,10 @@
<Table>
<row>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='save' enabled='false' text="isisfish.common.save" onActionPerformed='save()'/>
+ <JButton id='save' text="isisfish.common.save" onActionPerformed='save()' enabled='{isActif()}'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='cancel' enabled='false' text="isisfish.common.cancel" onActionPerformed='cancel()'/>
+ <JButton id='cancel' text="isisfish.common.cancel" onActionPerformed='cancel()' enabled='{isActif()}'/>
</cell>
</row>
<row>
@@ -251,7 +255,7 @@
<JButton id='create' text="isisfish.common.new" onActionPerformed='create()'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='remove' text="isisfish.common.remove" onActionPerformed='remove()'/>
+ <JButton id='remove' text="isisfish.common.remove" onActionPerformed='remove()' enabled='{isActif()}'/>
</cell>
</row>
</Table>
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/ZoneUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/ZoneUI.jaxx 2008-12-09 17:50:47 UTC (rev 1656)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/ZoneUI.jaxx 2008-12-10 16:49:33 UTC (rev 1657)
@@ -35,7 +35,13 @@
<!--
+ Zone
+-->
-<Table>
+<Table implements='InputContent'>
+
+ <!-- ui state when the activite is active -->
+ <Boolean id='actif' javaBean='false'/>
+
+ <Boolean id='changed' javaBean='false'/>
+
<script><![CDATA[
import fr.ifremer.isisfish.entities.Cell;
import fr.ifremer.isisfish.entities.Zone;
@@ -52,7 +58,7 @@
protected IsisMapBean zoneMap = new IsisMapBean();
protected OpenMapToolPanel toolMap = new OpenMapToolPanel();
protected OMToolSet toolSet = new OMToolSet();
- protected boolean changed = false;
+
public ZoneUI (InputAction action){
setContextValue(action);
@@ -96,7 +102,7 @@
}
return result;
}
- protected void refresh() {
+ public void refresh() {
Zone z = getContextValue(InputAction.class).getZone();
if (z != null){
DefaultListModel zoneCellsModel = new DefaultListModel();
@@ -116,16 +122,8 @@
}
zoneCells.setSelectedIndices(indexs);
}
-
fieldZoneName.setText(z.getName());
fieldZoneComment.setText(getContextValue(InputAction.class).getZone().getComment());
-
- zoneMap.setFisheryRegion(getContextValue(InputAction.class).getFisheryRegion());
- toolSet.setupListeners(zoneMap);
- toolMap.add((Component)toolSet);
- zoneMapPanel.add(toolMap, BorderLayout.NORTH);
- zoneMapPanel.add(zoneMap, BorderLayout.CENTER);
- refreshMap();
}
else{
DefaultListModel zoneCellsModel = new DefaultListModel();
@@ -136,14 +134,14 @@
zoneCells.setModel(zoneCellsModel);
fieldZoneName.setText("");
fieldZoneComment.setText("");
-
- zoneMap.setFisheryRegion(getContextValue(InputAction.class).getFisheryRegion());
- toolSet.setupListeners(zoneMap);
- toolMap.add((Component)toolSet);
- zoneMapPanel.add(toolMap, BorderLayout.NORTH);
- zoneMapPanel.add(zoneMap, BorderLayout.CENTER);
- refreshMap();
}
+ zoneMap.setFisheryRegion(getContextValue(InputAction.class).getFisheryRegion());
+ toolSet.setupListeners(zoneMap);
+ toolMap.add((Component)toolSet);
+ zoneMapPanel.add(toolMap, BorderLayout.NORTH);
+ zoneMapPanel.add(zoneMap, BorderLayout.CENTER);
+ valueChanged(false);
+ refreshMap();
}
protected void refreshMap(){
java.util.List<Cell> cells = new ArrayList<Cell>();
@@ -161,7 +159,7 @@
setInfoText(_("isisfish.message.creation.finished"));
}
protected void save(){
- TopiaEntity topia = getContextValue(InputAction.class).save("Zone");
+ TopiaEntity topia = getContextValue(InputAction.class).save();
getParentContainer(InputUI.class).setTreeModel();
getParentContainer(InputUI.class).setTreeSelection("$root/$zones/"+topia.getTopiaId());
setInfoText(_("isisfish.message.save.finished"));
@@ -169,10 +167,11 @@
valueChanged(false);
}
protected void cancel(){
- getContextValue(InputAction.class).cancel("Zone");
- setInfoText(_("isisfish.message.cancel.finished"));
+ TopiaEntity topia = getContextValue(InputAction.class).cancel("Zone");
valueChanged(false);
refresh();
+ getParentContainer(InputUI.class).setTreeSelection("$root/$zones/"+topia.getTopiaId());
+ setInfoText(_("isisfish.message.cancel.finished"));
}
protected void remove(){
setInfoText(getContextValue(InputAction.class).remove());
@@ -201,11 +200,12 @@
refreshMap();
}
protected void nameChange(){
+ System.out.println("InputAction " + getContextValue(InputAction.class) + " getZone "+getContextValue(InputAction.class).getZone()+" fieldZoneName.getText() "+ fieldZoneName.getText());
getContextValue(InputAction.class).getZone().setName(fieldZoneName.getText());
valueChanged(true);
}
protected void valueChanged(boolean b){
- changed=b;
+ changed = b;
cancel.setEnabled(b);
save.setEnabled(b);
}
@@ -218,45 +218,46 @@
<Table>
<row>
<cell columns='2' fill='horizontal' weightx='1.0'>
- <JLabel text="isisfish.zone.name"/>
+ <JLabel enabled='{isActif()}' text="isisfish.zone.name"/>
</cell>
</row>
<row>
<cell columns='2' fill='horizontal' weightx='1.0'>
- <JTextField id="fieldZoneName" onKeyTyped='valueChanged(true)' onFocusLost='nameChange()'/>
+ <JTextField id="fieldZoneName" enabled='{isActif()}' onKeyTyped='valueChanged(true)'/>
+<!-- onFocusLost='nameChange()' -->
</cell>
</row>
<row>
<cell columns='2' fill='horizontal' weightx='1.0'>
- <JLabel text="isisfish.zone.cells"/>
+ <JLabel enabled='{isActif()}' text="isisfish.zone.cells"/>
</cell>
</row>
<row>
<cell columns='2' fill='both' weighty='0.7' weightx='1.0'>
<JScrollPane>
- <JList id="zoneCells" onMouseClicked='zoneCellsChange()'/>
+ <JList id="zoneCells" enabled='{isActif()}' onMouseClicked='zoneCellsChange()'/>
</JScrollPane>
</cell>
</row>
<row>
<cell columns='2' fill='horizontal' weightx='1.0'>
- <JLabel text="isisfish.zone.comments"/>
+ <JLabel enabled='{isActif()}' text="isisfish.zone.comments"/>
</cell>
</row>
<row>
<cell columns='2' fill='both' weighty='0.3' weightx='1.0'>
<JScrollPane>
- <JTextArea id="fieldZoneComment" onKeyTyped='valueChanged(true)' onFocusLost='commentChange()'/>
+ <JTextArea id="fieldZoneComment" enabled='{isActif()}' onKeyTyped='valueChanged(true)' onFocusLost='commentChange()'/>
</JScrollPane>
</cell>
</row>
<row>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='save' text="isisfish.common.save" enabled='false' onActionPerformed='save()'/>
+ <JButton id='save' text="isisfish.common.save" enabled='{isActif()}' onActionPerformed='save()'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='cancel' text="isisfish.common.cancel" enabled='false' onActionPerformed='cancel()'/>
+ <JButton id='cancel' text="isisfish.common.cancel" enabled='{isActif()}' onActionPerformed='cancel()'/>
</cell>
</row>
<row>
@@ -264,11 +265,11 @@
<JButton id='create' text="isisfish.common.new" onActionPerformed='create()'/>
</cell>
<cell fill='horizontal' weightx='0.5'>
- <JButton id='remove' text="isisfish.common.remove" onActionPerformed='remove()'/>
+ <JButton id='remove' text="isisfish.common.remove" enabled='{isActif()}' onActionPerformed='remove()'/>
</cell>
</row>
</Table>
- <JPanel id="zoneMapPanel" layout='{new BorderLayout()}'/>
+ <JPanel enabled='{isActif()}' id="zoneMapPanel" layout='{new BorderLayout()}'/>
</JSplitPane>
</cell>
</row>
1
0
r1656 - in isis-fish/trunk/src/main: java/fr/ifremer/isisfish/datastore/update java/fr/ifremer/isisfish/ui/input resources/i18n
by chatellier@users.labs.libre-entreprise.org 09 Dec '08
by chatellier@users.labs.libre-entreprise.org 09 Dec '08
09 Dec '08
Author: chatellier
Date: 2008-12-09 17:50:47 +0000 (Tue, 09 Dec 2008)
New Revision: 1656
Modified:
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/datastore/update/ImportFromV2.java
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/InputAction.java
isis-fish/trunk/src/main/resources/i18n/isis-fish-en_GB.properties
isis-fish/trunk/src/main/resources/i18n/isis-fish-fr_FR.properties
Log:
Modification i18n
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/datastore/update/ImportFromV2.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/datastore/update/ImportFromV2.java 2008-12-09 17:44:02 UTC (rev 1655)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/datastore/update/ImportFromV2.java 2008-12-09 17:50:47 UTC (rev 1656)
@@ -358,7 +358,7 @@
log.info("Ask user for manual equation conversion");
// EquationEditorFrame frame = new EquationEditorFrame(true, true);
EquationEditorPaneUI frame = new EquationEditorPaneUI();
- frame.setTitle("Conversion manuel de l'equation");
+ frame.setTitle(_("isisfish.message.import.equation.convert"));
for (String id : equationId) {
context = storage.getStorage().beginTransaction();
Equation eq = (Equation)context.findByTopiaId(id);
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/InputAction.java
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/InputAction.java 2008-12-09 17:44:02 UTC (rev 1655)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/InputAction.java 2008-12-09 17:50:47 UTC (rev 1656)
@@ -100,7 +100,6 @@
import static org.codelutin.i18n.I18n._;
import static javax.swing.JOptionPane.showInputDialog;
import static fr.ifremer.isisfish.ui.simulator.filter.SimulationFilterUtil.selectSimulation;
-import static javax.swing.JOptionPane.showMessageDialog;
/**
*
@@ -405,7 +404,7 @@
String msg = regionStorage.getCommentForNextCommit();
JTextArea text = new JTextArea(msg);
int resp = JOptionPane.showOptionDialog(null,
- new JScrollPane(text), "Enter commit message",
+ new JScrollPane(text), _("isisfish.commit.message"),
JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE,
null, // icon
null, null);
Modified: isis-fish/trunk/src/main/resources/i18n/isis-fish-en_GB.properties
===================================================================
--- isis-fish/trunk/src/main/resources/i18n/isis-fish-en_GB.properties 2008-12-09 17:44:02 UTC (rev 1655)
+++ isis-fish/trunk/src/main/resources/i18n/isis-fish-en_GB.properties 2008-12-09 17:50:47 UTC (rev 1656)
@@ -94,6 +94,7 @@
isisfish.cell.longitude=longitude
isisfish.cell.name=name
isisfish.change.equation=Can't change equation
+isisfish.commit.message=Enter commit message
isisfish.common.add=add
isisfish.common.add.short=add short
isisfish.common.alert=alert
@@ -547,13 +548,14 @@
isisfish.message.export.zip=Export to zip file %1$s
isisfish.message.file.overwrite=File exists, do you want overwrite it ?
isisfish.message.import=Import %1$s
+isisfish.message.import.equation.convert=Manual equation convertion
isisfish.message.import.finished=Import finished
isisfish.message.import.region.name=Enter name for imported region
isisfish.message.import.region.xml=XMLed Region
isisfish.message.import.region.zipped=Zipped Region
isisfish.message.import.scripts.file.cancelled=Import scripts cancelled
-isisfish.message.import.xml.v2.file=
-isisfish.message.import.xml.v2.file\ =Import xml v2 file
+isisfish.message.import.xml.v2.file=Import xml v2 file
+isisfish.message.import.xml.v2.file\ =
isisfish.message.import.zip=Import zip file
isisfish.message.load.finished=load finished
isisfish.message.load.map=Try to load map file\: %1$s (%2$s, %3$s)
Modified: isis-fish/trunk/src/main/resources/i18n/isis-fish-fr_FR.properties
===================================================================
--- isis-fish/trunk/src/main/resources/i18n/isis-fish-fr_FR.properties 2008-12-09 17:44:02 UTC (rev 1655)
+++ isis-fish/trunk/src/main/resources/i18n/isis-fish-fr_FR.properties 2008-12-09 17:50:47 UTC (rev 1656)
@@ -94,6 +94,7 @@
isisfish.cell.longitude=Longitude
isisfish.cell.name=Nom
isisfish.change.equation=Ne peut pas changer l'\u00E9quation
+isisfish.commit.message=Entrer un message de commit
isisfish.common.add=Ajouter
isisfish.common.add.short=isisfish.common.add.short
isisfish.common.alert=alerte
@@ -540,20 +541,21 @@
isisfish.message.delete.entities=Supprimer les entit\u00E9s
isisfish.message.delete.entity=Supprimer l'entit\u00E9
isisfish.message.delete.finished=Suppression termin\u00E9e
-isisfish.message.delete.object=Pour supprimer l'objet %1$s, tous les objets suivant seront aussi supprim\u00E9s \\n\\n
+isisfish.message.delete.object=Pour supprimer l'objet %1$s, tous les objets suivants seront aussi supprim\u00E9s \n\n
isisfish.message.diff.finished=fichier dans l'\u00E9tat %1$s
isisfish.message.evaluation.finished=\u00E9valuation termin\u00E9e
isisfish.message.export.done=Export termin\u00E9
isisfish.message.export.zip=Exporter dans le fichier zip %1$s
isisfish.message.file.overwrite=Le fichier existe, Voulez-vous l'\u00E9craser ?
isisfish.message.import=Importer %1$s
+isisfish.message.import.equation.convert=Conversion manuelle de l'\u00E9quation
isisfish.message.import.finished=Import termin\u00E9
isisfish.message.import.region.name=Entre le nom de la r\u00E9egion \u00E0 importer
-isisfish.message.import.region.xml=Region XML (Isis-Fish V2.x)
+isisfish.message.import.region.xml=R\u00E9gion XML (Isis-Fish V2.x)
isisfish.message.import.region.zipped=Zipped Region
isisfish.message.import.scripts.file.cancelled=Importation des scripts annul\u00E9
-isisfish.message.import.xml.v2.file=
-isisfish.message.import.xml.v2.file\ =Import xml v2 file
+isisfish.message.import.xml.v2.file=Import xml v2 file
+isisfish.message.import.xml.v2.file\ =
isisfish.message.import.zip=Import zip file
isisfish.message.load.finished=Chargement termin\u00E9
isisfish.message.load.map=Chargement de la carte \: %1$s (%2$s, %3$s)
@@ -620,18 +622,18 @@
isisfish.params.description=Description
isisfish.params.filter=Filtrer
isisfish.params.lblLauncher=Lanceur de simulation
-isisfish.params.loadOldSimulation=Charger un ancienne simulation
+isisfish.params.loadOldSimulation=Charger une ancienne simulation
isisfish.params.numberYear=Nombre d'ann\u00E9es
isisfish.params.onlyExportSimulation=Exporter uniquement des simulations
isisfish.params.populationNumbers=Donn\u00E9es de population
isisfish.params.ruleParameters=Param\u00E8tres des r\u00E8gles
isisfish.params.simulationName=Nom de la simulation
isisfish.params.title=Param\u00E8tres
-isisfish.params.toString.fishery=P\u00EAcherie\: %1$s\\n\\n
+isisfish.params.toString.fishery=P\u00EAcherie\: %1$s\n\n
isisfish.params.toString.lib.logger.level=niveau du logger de librairies %1$s
-isisfish.params.toString.number.years=Nombre d'ann\u00E9\u00E9s \: %1$s\\n\\n
+isisfish.params.toString.number.years=Nombre d'ann\u00E9\u00E9s \: %1$s\n\n
isisfish.params.toString.plan=Plan\: %1$s
-isisfish.params.toString.plan.number=Analyse plan sequence number\: %1$s\\n\\n
+isisfish.params.toString.plan.number=Analyse plan sequence number\: %1$s\n\n
isisfish.params.toString.populations=Populations\:
isisfish.params.toString.rule=Rule\: %1$s
isisfish.params.toString.script.logger.level=niveau du logger de scripts %1$s
@@ -863,8 +865,8 @@
isisfish.simpleResult.table=defaultToolTip-fr.ifremer.isisfish.map.SimpleResultatMapBean.table12
isisfish.simulation.log.console.title=Console de log simulation '%1$s'
isisfish.simulation.log.showConsole=affichage de la console de log pour la simulation %1$s
-isisfish.simulation.menu.import=Import simulation
-isisfish.simulation.menu.save=Save simulation
+isisfish.simulation.menu.import=Importer une simulation
+isisfish.simulation.menu.save=Sauver la simulation
isisfish.simulation.menu.simulation=Simulation
isisfish.simulation.name=Nom de la simulation
isisfish.simulation.title=Lanceur de simulation
1
0
Author: chatellier
Date: 2008-12-09 17:44:02 +0000 (Tue, 09 Dec 2008)
New Revision: 1655
Modified:
isis-fish/trunk/pom.xml
Log:
Update pom, add ssj, jaxen
Modified: isis-fish/trunk/pom.xml
===================================================================
--- isis-fish/trunk/pom.xml 2008-12-09 16:43:07 UTC (rev 1654)
+++ isis-fish/trunk/pom.xml 2008-12-09 17:44:02 UTC (rev 1655)
@@ -21,12 +21,6 @@
<!-- POM Relationships : Inheritance : Dependencies -->
<dependencies>
- <dependency>
- <groupId>org.jdesktop</groupId>
- <artifactId>beansbinding</artifactId>
- <version>1.2.1</version>
- </dependency>
-
<!--Compile-->
<!--Librairies CodeLutin-->
<dependency>
@@ -109,6 +103,13 @@
</dependency>
<dependency>
+ <groupId>org.jdesktop</groupId>
+ <artifactId>beansbinding</artifactId>
+ <version>1.2.1</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6.1</version>
@@ -180,12 +181,20 @@
<version>0.2</version>
<scope>runtime</scope>
</dependency>
+
+ <!-- Utilisé lors de l'import xml v2 (entre autre) -->
+ <dependency>
+ <groupId>jaxen</groupId>
+ <artifactId>jaxen</artifactId>
+ <version>1.1.1</version>
+ <scope>runtime</scope>
+ </dependency>
<!-- Change this dependence if you change database -->
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
- <version>1.1.103</version>
+ <version>1.1.104</version>
<scope>compile</scope>
</dependency>
@@ -209,25 +218,25 @@
<scope>compile</scope>
</dependency>
- <!-- ssj pour les calculs stockastiques - ->
+ <!-- ssj pour les calculs stockastiques -->
<dependency>
<groupId>ssj</groupId>
<artifactId>ssj</artifactId>
- <version>2.0</version>
+ <version>2.1.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>ssj</groupId>
<artifactId>Blas</artifactId>
- <version>20060531</version>
+ <version>20081007</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>ssj</groupId>
<artifactId>colt</artifactId>
- <version>1.1.0.0</version>
+ <version>20081007</version>
<scope>runtime</scope>
</dependency>
@@ -255,10 +264,10 @@
<dependency>
<groupId>ssj</groupId>
<artifactId>optimization</artifactId>
- <version>20060613</version>
+ <version>20081007</version>
<scope>runtime</scope>
</dependency>
- <!- - fin ssj pour les calculs stockastiques -->
+ <!-- fin ssj pour les calculs stockastiques -->
<!-- debut svnkit pour communication subversion -->
<dependency>
1
0
r1654 - isis-fish/trunk/src/main/resources/i18n
by sletellier@users.labs.libre-entreprise.org 09 Dec '08
by sletellier@users.labs.libre-entreprise.org 09 Dec '08
09 Dec '08
Author: sletellier
Date: 2008-12-09 16:43:07 +0000 (Tue, 09 Dec 2008)
New Revision: 1654
Modified:
isis-fish/trunk/src/main/resources/i18n/isis-fish-en_GB.properties
isis-fish/trunk/src/main/resources/i18n/isis-fish-fr_FR.properties
Log:
Traduction des menus de simulations
Modified: isis-fish/trunk/src/main/resources/i18n/isis-fish-en_GB.properties
===================================================================
--- isis-fish/trunk/src/main/resources/i18n/isis-fish-en_GB.properties 2008-12-09 16:38:44 UTC (rev 1653)
+++ isis-fish/trunk/src/main/resources/i18n/isis-fish-en_GB.properties 2008-12-09 16:43:07 UTC (rev 1654)
@@ -216,6 +216,7 @@
isisfish.error.add.tray=Can't add system tray icon
isisfish.error.change.classloader=Can't change classloader because can't create URL from file %1$s
isisfish.error.change.equation=Can't change equation
+isisfish.error.check.region=
isisfish.error.compile.script=Can't compile script\: %1$s
isisfish.error.compiled.parameter=Can't get rule parameter from compiled class
isisfish.error.conversion.data=Erreur lors de la conversion du fichier de donn\u00E9es
@@ -318,6 +319,7 @@
isisfish.error.remove.directory=Can't remove directory %1$s
isisfish.error.rename.region=Can't rename region to %1$s
isisfish.error.save.checkSum.compilation=Can't save checkSum to compilation\: %1$s
+isisfish.error.save.region=
isisfish.error.save.script.compilation=Can't save script to compilation\: %1$s
isisfish.error.save.simulation.parameters=Can't save simulation parameters in file %1$s
isisfish.error.script.create=isisfish.error.script.create
@@ -516,7 +518,10 @@
isisfish.message.backup.database.progress=backup database in progress
isisfish.message.cancel.finished=Cancel finished
isisfish.message.check.finished=check finished
+isisfish.message.check.region=
+isisfish.message.checking.cell=
isisfish.message.choose.archive=choose archive file or directory
+isisfish.message.commit=
isisfish.message.commit.cancelled=commit cancelled
isisfish.message.commit.finished=commit finished
isisfish.message.commit.region.canceled=Commit region canceled
@@ -547,6 +552,7 @@
isisfish.message.import.region.xml=XMLed Region
isisfish.message.import.region.zipped=Zipped Region
isisfish.message.import.scripts.file.cancelled=Import scripts cancelled
+isisfish.message.import.xml.v2.file=
isisfish.message.import.xml.v2.file\ =Import xml v2 file
isisfish.message.import.zip=Import zip file
isisfish.message.load.finished=load finished
@@ -568,6 +574,7 @@
isisfish.message.region.removed=Region removed
isisfish.message.remove.canceled=Remove canceled
isisfish.message.remove.finished=Remove finished
+isisfish.message.remove.unnecessary.cells=
isisfish.message.removing.region=Removing region %1$s ...
isisfish.message.result.verif.region=R\u00E9sultat de la v\u00E9rification de la r\u00E9gion
isisfish.message.save.finished=save finished
@@ -856,9 +863,9 @@
isisfish.simpleResult.table=defaultToolTip-fr.ifremer.isisfish.map.SimpleResultatMapBean.table12
isisfish.simulation.log.console.title=Log console for simulation '%1$s'
isisfish.simulation.log.showConsole=display log console for simulation %1$s
-isisfish.simulation.menu.import=
-isisfish.simulation.menu.save=
-isisfish.simulation.menu.simulation=
+isisfish.simulation.menu.import=Import simulation
+isisfish.simulation.menu.save=Save simulation
+isisfish.simulation.menu.simulation=Simulation
isisfish.simulation.name=Simulation name
isisfish.simulation.title=Simulation launcher
isisfish.simulator.launcher.inprocess=in current process
Modified: isis-fish/trunk/src/main/resources/i18n/isis-fish-fr_FR.properties
===================================================================
--- isis-fish/trunk/src/main/resources/i18n/isis-fish-fr_FR.properties 2008-12-09 16:38:44 UTC (rev 1653)
+++ isis-fish/trunk/src/main/resources/i18n/isis-fish-fr_FR.properties 2008-12-09 16:43:07 UTC (rev 1654)
@@ -552,6 +552,7 @@
isisfish.message.import.region.xml=Region XML (Isis-Fish V2.x)
isisfish.message.import.region.zipped=Zipped Region
isisfish.message.import.scripts.file.cancelled=Importation des scripts annul\u00E9
+isisfish.message.import.xml.v2.file=
isisfish.message.import.xml.v2.file\ =Import xml v2 file
isisfish.message.import.zip=Import zip file
isisfish.message.load.finished=Chargement termin\u00E9
@@ -862,9 +863,9 @@
isisfish.simpleResult.table=defaultToolTip-fr.ifremer.isisfish.map.SimpleResultatMapBean.table12
isisfish.simulation.log.console.title=Console de log simulation '%1$s'
isisfish.simulation.log.showConsole=affichage de la console de log pour la simulation %1$s
-isisfish.simulation.menu.import=
-isisfish.simulation.menu.save=
-isisfish.simulation.menu.simulation=
+isisfish.simulation.menu.import=Import simulation
+isisfish.simulation.menu.save=Save simulation
+isisfish.simulation.menu.simulation=Simulation
isisfish.simulation.name=Nom de la simulation
isisfish.simulation.title=Lanceur de simulation
isisfish.simulator.launcher.inprocess=dans le m\u00EAme processus
1
0
r1653 - in isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui: input simulator
by sletellier@users.labs.libre-entreprise.org 09 Dec '08
by sletellier@users.labs.libre-entreprise.org 09 Dec '08
09 Dec '08
Author: sletellier
Date: 2008-12-09 16:38:44 +0000 (Tue, 09 Dec 2008)
New Revision: 1653
Modified:
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/InputUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/ZoneUI.jaxx
isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/ParamsUI.jaxx
Log:
Debug vol2
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/InputUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/InputUI.jaxx 2008-12-09 16:35:11 UTC (rev 1652)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/InputUI.jaxx 2008-12-09 16:38:44 UTC (rev 1653)
@@ -313,7 +313,7 @@
setInfoText(_("isisfish.message.import.finished"));
}
protected void importV2Region(){
- setInfoText(_("isisfish.message.import.xml.v2.file " + getContextValue(InputAction.class).importV2Region()));
+ setInfoText(_("isisfish.message.import.xml.v2.file") + getContextValue(InputAction.class).importV2Region());
setInfoText(_("isisfish.message.import.finished"));
}
protected void importRegionFromSimulation(){
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/ZoneUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/ZoneUI.jaxx 2008-12-09 16:35:11 UTC (rev 1652)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/input/ZoneUI.jaxx 2008-12-09 16:38:44 UTC (rev 1653)
@@ -111,6 +111,7 @@
int i = 0;
for (Cell c : cellsSelected){
indexs[i] = zoneCellsModel.indexOf(c);
+ System.out.println("refresh " + c + " " + i);
i++;
}
zoneCells.setSelectedIndices(indexs);
@@ -192,17 +193,16 @@
protected void zoneCellsChange(){
java.util.List<Cell> cells = new ArrayList<Cell>();
for (Object o : zoneCells.getSelectedValues()){
+ System.out.println("zoneCellChanged " + o);
cells.add((Cell) o);
}
getContextValue(InputAction.class).getZone().setCell(cells);
valueChanged(true);
refreshMap();
- refresh();
}
protected void nameChange(){
getContextValue(InputAction.class).getZone().setName(fieldZoneName.getText());
valueChanged(true);
- refresh();
}
protected void valueChanged(boolean b){
changed=b;
Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/ParamsUI.jaxx
===================================================================
--- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/ParamsUI.jaxx 2008-12-09 16:35:11 UTC (rev 1652)
+++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/ParamsUI.jaxx 2008-12-09 16:38:44 UTC (rev 1653)
@@ -80,9 +80,9 @@
simul.enableAnalysePlan();
}
}
- public void setName(String name){
- fieldSimulParamsName.setText(name);
- }
+// public void setSimulName(String name){
+// fieldSimulParamsName.setText(name);
+// }
protected void regionChange(){
WelcomePanelUI root = getParentContainer(WelcomePanelUI.class);
root.setInfoText(_("isisfish.message.loading.region"));
1
0