r1862 - in isis-fish/trunk/src/main/java/fr/ifremer/isisfish: . simulator types/hibernate ui/script/action ui/simulator
Author: chatellier Date: 2009-02-23 15:42:34 +0000 (Mon, 23 Feb 2009) New Revision: 1862 Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/IsisConfig.java isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/AnalysePlan.java isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/AnalysePlanContext.java isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/AnalysePlanIndependent.java isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/MetierMonitor.java isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/RuleMonitor.java isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/SimulationControl.java isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/SimulationParameter.java isis-fish/trunk/src/main/java/fr/ifremer/isisfish/types/hibernate/MatrixType.java isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/script/action/BackupAction.java isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/script/action/CancelAction.java isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/script/action/ChooseFileAction.java isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/SensWizard.java isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/SimulAction.java isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/SimulatorListeners.java isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/ToolTipListModelFactory.java Log: Fix some doc, make some method deprecated, fixe code style Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/IsisConfig.java =================================================================== --- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/IsisConfig.java 2009-02-23 15:26:14 UTC (rev 1861) +++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/IsisConfig.java 2009-02-23 15:42:34 UTC (rev 1862) @@ -1,5 +1,5 @@ /* *##% - * Copyright (C) 2002-2008 Code Lutin, Benjamin Poussin + * Copyright (C) 2002-2009 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 @@ -15,7 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. - *##%*/ + * ##%*/ package fr.ifremer.isisfish; @@ -65,7 +65,7 @@ public class IsisConfig extends ApplicationConfig { /** to use log facility, just put in your code: log.info(\"...\"); */ - static private Log log = LogFactory.getLog(IsisConfig.class); + private static Log log = LogFactory.getLog(IsisConfig.class); /** * La version du logiciel constitue de l.d.a.r Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/AnalysePlan.java =================================================================== --- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/AnalysePlan.java 2009-02-23 15:26:14 UTC (rev 1861) +++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/AnalysePlan.java 2009-02-23 15:42:34 UTC (rev 1862) @@ -1,5 +1,5 @@ /* *##% - * Copyright (C) 2007 + * Copyright (C) 2007 - 2009 * Ifremer, Code Lutin, Cédric Pineau, Benjamin Poussin * * This program is free software; you can redistribute it and/or @@ -17,7 +17,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *##%*/ -/* * +package fr.ifremer.isisfish.simulator; + +import fr.ifremer.isisfish.datastore.SimulationStorage; + +/** * AnalysePlan.java * * Created: 1 mars 07 20:27:28 @@ -28,57 +32,53 @@ * Last update: $Date$ * by : $Author$ */ - -package fr.ifremer.isisfish.simulator; - -import fr.ifremer.isisfish.datastore.SimulationStorage; - - -/** - * @author poussin - * - */ - public interface AnalysePlan { /** + * Return plan necessary Results. + * * @return the necessaryResult name */ public String[] getNecessaryResult(); - + /** - * return plan description + * Return plan description. + * * @return plan description * @throws Exception */ public String getDescription() throws Exception; - + /** - * Use only once before first simulation. You can modified Param for all - * simulation or put value in context.values. - * @param context + * Use only once before first simulation. + * + * You can modified Param for all simulation or put value in context.values. + * + * @param context plan context * @throws Exception */ public void init(AnalysePlanContext context) throws Exception; - + /** - * Call before each simulation + * Call before each simulation. + * * @param context plan context * @param nextSimulation storage used for next simulation * @return true if we must do next simulation, false to stop plan * @throws Exception */ - public boolean beforeSimulation(AnalysePlanContext context, SimulationStorage nextSimulation) throws Exception; - + public boolean beforeSimulation(AnalysePlanContext context, + SimulationStorage nextSimulation) throws Exception; + /** - * Call after each simulation + * Call after each simulation. + * * @param context plan context * @param lastSimulation storage used for simulation * @return true if we must do next simulation, false to stop plan * @throws Exception */ - public boolean afterSimulation(AnalysePlanContext context, SimulationStorage lastSimulation) throws Exception; - + public boolean afterSimulation(AnalysePlanContext context, + SimulationStorage lastSimulation) throws Exception; + } - - Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/AnalysePlanContext.java =================================================================== --- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/AnalysePlanContext.java 2009-02-23 15:26:14 UTC (rev 1861) +++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/AnalysePlanContext.java 2009-02-23 15:42:34 UTC (rev 1862) @@ -1,5 +1,5 @@ /* *##% - * Copyright (C) 2007 + * Copyright (C) 2007 - 2009 * Ifremer, Code Lutin, Cédric Pineau, Benjamin Poussin * * This program is free software; you can redistribute it and/or @@ -17,18 +17,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *##%*/ -/* * - * AnalysePlanContext.java - * - * Created: 1 mars 07 20:19:31 - * - * @author poussin - * @version $Revision$ - * - * Last update: $Date$ - * by : $Author$ - */ - package fr.ifremer.isisfish.simulator; import java.util.HashMap; @@ -36,77 +24,106 @@ import fr.ifremer.isisfish.datastore.SimulationStorage; - /** + * AnalysePlanContext.java + * + * Created: 1 mars 07 20:19:31 + * * @author poussin + * @version $Revision$ * + * Last update: $Date$ + * by : $Author$ */ +public class AnalysePlanContext { -public class AnalysePlanContext { - + /** Simulation id. */ protected String id; + + /** Analyse plan number. */ protected int number = 0; + + /** Simulation parameters. */ protected SimulationParameter param; + + /** @deprecated on 20080223 seams never used */ protected Map<String, Object> values = new HashMap<String, Object>(); - + public AnalysePlanContext(String id, SimulationParameter param) { this.id = id; this.param = param; } - + /** - * @return Returns the id. + * Get id. + * + * @return the id */ public String getId() { - return this.id; + return id; } - + /** - * @return Returns the number. + * Get analyse plan number. + * + * @return the number */ public int getNumber() { return number; } - + /** - * must be call when new simulation is generated from plan + * Must be call when new simulation is generated from plan. */ public void incNumber() { number++; } - + /** - * @return Returns the param. + * Get simulation parameters. + * + * @return simulation params + * @deprecated on 20080223 seams never used */ public SimulationParameter getParam() { - return this.param; + return param; } - + /** - * Used in PlanGenerator to set parameter to parameter of the next - * simulation - * @param param The param to set. + * @param key + * @return value for key. + * @deprecated on 20080223 seams never used */ - public void setParam(SimulationParameter param) { - this.param = param; + public Object getValue(String key) { + return this.values.get(key); } - + /** - * @return Returns the values. + * + * @param key + * @param value + * @deprecated on 20080223 seams never used */ - public Object getValue(String key) { - return this.values.get(key); - } - public void setValue(String key, Object value) { this.values.put(key, value); } - + + /** + * + * @return + * @deprecated on 20080223 seams never used + */ public SimulationStorage getLastSimulation() { - SimulationStorage result = getSimulation(getNumber()-1); + SimulationStorage result = getSimulation(getNumber() - 1); return result; } - + + /** + * Get {@link SimulationStorage} for specified anaylse plan number. + * + * @param number number + * @return {@link SimulationStorage} + */ public SimulationStorage getSimulation(int number) { SimulationStorage result = null; if (0 <= number && number <= getNumber()) { @@ -114,7 +131,4 @@ } return result; } - } - - Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/AnalysePlanIndependent.java =================================================================== --- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/AnalysePlanIndependent.java 2009-02-23 15:26:14 UTC (rev 1861) +++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/AnalysePlanIndependent.java 2009-02-23 15:42:34 UTC (rev 1862) @@ -1,5 +1,5 @@ /* *##% - * Copyright (C) 2007 + * Copyright (C) 2007 - 2009 * Ifremer, Code Lutin, Cédric Pineau, Benjamin Poussin * * This program is free software; you can redistribute it and/or @@ -17,8 +17,12 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *##%*/ -/* * - * AnalysePlan.java +package fr.ifremer.isisfish.simulator; + +/** + * Use for Analyse plan that don't need previous simulation to do next + * simulation. When Simulation use this plan type, Isis can do more than one + * simulation in same time. * * Created: 1 mars 07 20:27:28 * @@ -28,19 +32,6 @@ * Last update: $Date: 2007-03-09 15:10:40 +0100 (ven, 09 mar 2007) $ * by : $Author: bpoussin $ */ - -package fr.ifremer.isisfish.simulator; - -/** - * Use for Analyse plan that don't need previous simulation to do next - * simulation. When Simulation use this plan type, Isis can do more than one - * simulation in same time. - * - * author poussin - */ public interface AnalysePlanIndependent extends AnalysePlan { - } - - Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/MetierMonitor.java =================================================================== --- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/MetierMonitor.java 2009-02-23 15:26:14 UTC (rev 1861) +++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/MetierMonitor.java 2009-02-23 15:42:34 UTC (rev 1862) @@ -1,5 +1,5 @@ /* *##% - * Copyright (C) 2006 + * Copyright (C) 2006 - 2009 * Ifremer, Code Lutin, Cédric Pineau, Benjamin Poussin * * This program is free software; you can redistribute it and/or @@ -17,18 +17,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *##%*/ -/* * - * MetierMonitor.java - * - * Created: 21 août 2006 15:43:19 - * - * @author poussin - * @version $Revision$ - * - * Last update: $Date$ - * by : $Author$ - */ - package fr.ifremer.isisfish.simulator; import static org.codelutin.i18n.I18n.n_; @@ -59,19 +47,24 @@ import fr.ifremer.isisfish.types.Date; import fr.ifremer.isisfish.types.Month; - /** * ATTENTION: l'implantation de cette classe n'est peut-etre pas correct. Il faut * absolument verifier le FIXME, mais il est difficile de le faire car * la plupart des methodes de cette objets ne semble plus utilisé dans la * version 2.3.x de isis * + * Created: 21 août 2006 15:43:19 + * * @author poussin + * @version $Revision$ + * + * Last update: $Date$ + * by : $Author$ */ public class MetierMonitor { /** to use log facility, just put in your code: log.info(\"...\"); */ - static private Log log = LogFactory.getLog(MetierMonitor.class); + private static Log log = LogFactory.getLog(MetierMonitor.class); protected Set<Metier> forbiddenMetier = new HashSet<Metier>(); protected Set<MultiKey> forbiddenMetierMonth = new HashSet<MultiKey>(); @@ -317,7 +310,4 @@ return result; } - } - - Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/RuleMonitor.java =================================================================== --- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/RuleMonitor.java 2009-02-23 15:26:14 UTC (rev 1861) +++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/RuleMonitor.java 2009-02-23 15:42:34 UTC (rev 1862) @@ -1,5 +1,5 @@ /* *##% - * Copyright (C) 2006 + * Copyright (C) 2006 - 2009 * Ifremer, Code Lutin, Cédric Pineau, Benjamin Poussin * * This program is free software; you can redistribute it and/or @@ -17,18 +17,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *##%*/ -/* * - * RuleMonitor.java - * - * Created: 21 août 2006 15:45:03 - * - * @author poussin - * @version $Revision$ - * - * Last update: $Date$ - * by : $Author$ - */ - package fr.ifremer.isisfish.simulator; import org.apache.commons.collections.map.MultiKeyMap; @@ -37,26 +25,28 @@ import fr.ifremer.isisfish.rule.Rule; import fr.ifremer.isisfish.types.Date; - /** - * This class keep trace of rule evalution condition for all step and all metier + * This class keep trace of rule evalution condition for all step and all metier. * + * Created: 21 août 2006 15:45:03 + * * @author poussin + * @version $Revision$ * + * Last update: $Date$ + * by : $Author$ */ public class RuleMonitor { protected MultiKeyMap evalutionCondition = new MultiKeyMap(); public boolean getEvalutionCondition(Date date, Rule rule, Metier metier) { - return (Boolean)this.evalutionCondition.get(date, rule, metier); + return (Boolean) this.evalutionCondition.get(date, rule, metier); } - public void setEvaluationCondition(Date date, Rule rule, Metier metier, boolean evalutionCondition) { + public void setEvaluationCondition(Date date, Rule rule, Metier metier, + boolean evalutionCondition) { this.evalutionCondition.put(date, rule, metier, evalutionCondition); } - } - - Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/SimulationControl.java =================================================================== --- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/SimulationControl.java 2009-02-23 15:26:14 UTC (rev 1861) +++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/SimulationControl.java 2009-02-23 15:42:34 UTC (rev 1862) @@ -1,5 +1,5 @@ /* *##% - * Copyright (C) 2002-2005 Code Lutin, Cédric Pineau, + * Copyright (C) 2002 - 2009 Code Lutin, Cédric Pineau, Benjamin Poussin * * This program is free software; you can redistribute it and/or @@ -17,18 +17,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *##%*/ -/* * - * SimulationControl.java - * - * Created: Fri Oct 6 2000 - * - * @author POUSSIN Benjamin <poussin at codelutin.com> - * @version $Revision$ - * - * Mise a jour: $Date$ - * par : $Author$ - */ - package fr.ifremer.isisfish.simulator; import java.beans.PropertyChangeEvent; @@ -45,13 +33,20 @@ import fr.ifremer.isisfish.types.Date; /** - * Permit to communicate with user interface from simulation thread - * @author poussin + * Permit to communicate with user interface from simulation thread. + * + * Created: Fri Oct 6 2000 + * + * @author POUSSIN Benjamin <poussin at codelutin.com> + * @version $Revision$ + * + * Mise a jour: $Date$ + * par : $Author$ */ public class SimulationControl implements PropertyChangeListener { // SimulationControl /** to use log facility, just put in your code: log.info(\"...\"); */ - static private Log log = LogFactory.getLog(SimulationControl.class); + private static Log log = LogFactory.getLog(SimulationControl.class); protected PropertyChangeSupport listeners = new PropertyChangeSupport(this); protected boolean inUpdateFromHashtable = false; @@ -385,7 +380,7 @@ } } - /* (non-Javadoc) + /* * @see java.beans.PropertyChangeListener#propertyChange(java.beans.PropertyChangeEvent) */ public void propertyChange(PropertyChangeEvent e) { Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/SimulationParameter.java =================================================================== --- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/SimulationParameter.java 2009-02-23 15:26:14 UTC (rev 1861) +++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/SimulationParameter.java 2009-02-23 15:42:34 UTC (rev 1862) @@ -1,5 +1,4 @@ -/* - * *##% Copyright (C) 2006 Code Lutin, C?dric Pineau, Benjamin Poussin +/* *##% Copyright (C) 2006 - 2009 Code Lutin, Cédric Pineau, 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 @@ -16,18 +15,8 @@ * Place - Suite 330, Boston, MA 02111-1307, USA. ##% */ -/******************************************************************************* - * SimulationParameter.java - * - * Created: 10 janv. 2006 17:03:37 - * - * @author poussin - * - * @version $Revision$ - * - * Last update: $Date$ by : $Author$ - */ + package fr.ifremer.isisfish.simulator; import static org.codelutin.i18n.I18n._; @@ -71,17 +60,21 @@ /** * Contains all parameter for one simulation * + * Created: 10 janv. 2006 17:03:37 + * * @author poussin + * + * @version $Revision$ + * + * Last update: $Date$ by : $Author$ */ public class SimulationParameter { - /** - * Logger for this class - */ - private static final Log log = LogFactory.getLog(SimulationParameter.class); + /** Logger for this class. */ + private static Log log = LogFactory.getLog(SimulationParameter.class); /** Isis-fish version that permit to do the simulation, must be set just - * before simulation by simulator */ + * before simulation by simulator. */ protected String isisFishVersion = IsisConfig.getVersion(); /** description de la simulation */ @@ -138,7 +131,7 @@ protected String analysePlan = ""; /** le numero de sequence de la liste des plans d'analyse, le premier - * ?lement du plan doit etre 0. Si la simulation ne fait pas partie d'un + * élement du plan doit etre 0. Si la simulation ne fait pas partie d'un * plan la valeur est -1 */ protected int analysePlanNumber = -1; @@ -150,17 +143,17 @@ /** * si vrai seul les exports automatiques ne sont souhaiter, la simulation - * pourrait etre supprim?e a la fin + * pourrait etre supprimée a la fin */ protected boolean onlyExport = false; transient protected RegionStorage region = null; - /** le niveau de log du simulateur ? utiliser pendant la simulation , par default info */ + /** le niveau de log du simulateur à utiliser pendant la simulation , par default info */ protected String simulLogLevel = "info"; - /** le niveau de log des scripts ? utiliser pendant la simulation , par default info */ + /** le niveau de log des scripts à utiliser pendant la simulation , par default info */ protected String scriptLogLevel = "info"; - /** le niveau de log des librairies ? utiliser pendant la simulation , par default info */ + /** le niveau de log des librairies à utiliser pendant la simulation , par default info */ protected String libLogLevel = "error"; /** Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/types/hibernate/MatrixType.java =================================================================== --- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/types/hibernate/MatrixType.java 2009-02-23 15:26:14 UTC (rev 1861) +++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/types/hibernate/MatrixType.java 2009-02-23 15:42:34 UTC (rev 1862) @@ -38,7 +38,6 @@ import java.util.LinkedList; import java.util.List; -import org.apache.commons.beanutils.BeanUtilsBean; import org.apache.commons.beanutils.ConvertUtilsBean; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -54,12 +53,7 @@ import org.hibernate.type.Type; import org.hibernate.usertype.CompositeUserType; -import fr.ifremer.isisfish.types.Date; -import fr.ifremer.isisfish.types.Month; import fr.ifremer.isisfish.util.ConverterUtil; -import fr.ifremer.isisfish.util.DateConverter; -import fr.ifremer.isisfish.util.MonthConverter; -import fr.ifremer.isisfish.util.StringConverter; import fr.ifremer.isisfish.util.TopiaEntityConverter; public class MatrixType implements CompositeUserType { Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/script/action/BackupAction.java =================================================================== --- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/script/action/BackupAction.java 2009-02-23 15:26:14 UTC (rev 1861) +++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/script/action/BackupAction.java 2009-02-23 15:42:34 UTC (rev 1862) @@ -1,20 +1,49 @@ +/* *##% + * Copyright (C) 2005 - 2009 + * Ifremer, Code Lutin, Cedric Pineau, 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. + *##%*/ + package fr.ifremer.isisfish.ui.script.action; -import fr.ifremer.isisfish.IsisFish; -import fr.ifremer.isisfish.IsisFishRuntimeException; -import fr.ifremer.isisfish.ui.util.IsisAction; -import org.apache.commons.logging.Log; -import static org.apache.commons.logging.LogFactory.getLog; -import org.codelutin.util.FileUtil; - import java.awt.event.ActionEvent; import java.io.File; import java.io.IOException; import java.util.List; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.codelutin.util.FileUtil; + +import fr.ifremer.isisfish.IsisFish; +import fr.ifremer.isisfish.IsisFishRuntimeException; +import fr.ifremer.isisfish.ui.util.IsisAction; + +/** + * BackupAction. + * + * @author bpoussin + * @version $Revision$ + * + * Last update : $Date$ + * By : $Author$ + */ public class BackupAction extends IsisAction { - static private Log log = getLog(BackupAction.class); + private static Log log = LogFactory.getLog(BackupAction.class); /** source root directory */ protected File src; Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/script/action/CancelAction.java =================================================================== --- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/script/action/CancelAction.java 2009-02-23 15:26:14 UTC (rev 1861) +++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/script/action/CancelAction.java 2009-02-23 15:42:34 UTC (rev 1862) @@ -1,3 +1,22 @@ +/* *##% + * Copyright (C) 2005 - 2009 + * Ifremer, Code Lutin, Cedric Pineau, 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. + *##%*/ + package fr.ifremer.isisfish.ui.script.action; import fr.ifremer.isisfish.ui.util.IsisAction; @@ -6,6 +25,7 @@ import java.awt.event.ActionEvent; public class CancelAction extends IsisAction { + private static final long serialVersionUID = 2536223593370089763L; public CancelAction(JDialog dialog) { Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/script/action/ChooseFileAction.java =================================================================== --- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/script/action/ChooseFileAction.java 2009-02-23 15:26:14 UTC (rev 1861) +++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/script/action/ChooseFileAction.java 2009-02-23 15:42:34 UTC (rev 1862) @@ -1,3 +1,22 @@ +/* *##% + * Copyright (C) 2005 - 2009 + * Ifremer, Code Lutin, Cedric Pineau, 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. + *##%*/ + package fr.ifremer.isisfish.ui.script.action; import static org.codelutin.i18n.I18n._; @@ -11,12 +30,12 @@ public class ChooseFileAction extends AbstractAction { + private static final long serialVersionUID = -5004217809548352109L; + protected JTextField file; protected JDialog dialog; - private static final long serialVersionUID = -5004217809548352109L; - public ChooseFileAction(JDialog dialog, JTextField file) { super("..."); this.dialog = dialog; @@ -41,7 +60,9 @@ if (ret == JFileChooser.APPROVE_OPTION) { File newFile = chooser.getSelectedFile(); String path; - if (newFile.isFile()) path = newFile.getAbsolutePath(); + if (newFile.isFile()) { + path = newFile.getAbsolutePath(); + } else { path = newFile.getAbsolutePath(); if (!"".equals(name)) path += File.separator + name; Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/SensWizard.java =================================================================== --- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/SensWizard.java 2009-02-23 15:26:14 UTC (rev 1861) +++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/SensWizard.java 2009-02-23 15:42:34 UTC (rev 1862) @@ -1,5 +1,5 @@ /* *##% - * Copyright (C) 2002, 2003 Code Lutin + * Copyright (C) 2002, 2009 Code Lutin * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -16,8 +16,13 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *##%*/ -/* * - * SensWizard.java +package fr.ifremer.isisfish.ui.simulator; + +import javax.swing.JButton; +import javax.swing.JTabbedPane; + +/** + * SensWizard. * * Created: 14 nov. 2005 * @@ -27,13 +32,9 @@ * * Mise a jour: $Date$ * par : $Author$ + * + * @deprecated on 20080223 seams to be unused */ -package fr.ifremer.isisfish.ui.simulator; - -import javax.swing.JButton; -import javax.swing.JTabbedPane; - - public class SensWizard { /** @@ -41,8 +42,8 @@ * wizard * @return l'index de la tab a selectionner */ - public static int newTab(JButton prev, JButton next, - JButton finish, JTabbedPane tabPane) { + public static int newTab(JButton prev, JButton next, JButton finish, + JTabbedPane tabPane) { // La direction du changement de tab (+1, -1) //int step = ((Integer)currentContext.getData("_step")).intValue(); // La nouvelle tab sélectionnée par l'utilisateur 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 2009-02-23 15:26:14 UTC (rev 1861) +++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/SimulAction.java 2009-02-23 15:42:34 UTC (rev 1862) @@ -1,5 +1,5 @@ /* *##% - * Copyright (C) 2005 + * Copyright (C) 2005 - 2009 * Ifremer, Code Lutin, Cedric Pineau, Benjamin Poussin * * This program is free software; you can redistribute it and/or @@ -17,26 +17,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *##%*/ -/* * - * IsisFish.java - * - * Created: 1 aout 2005 18:37:25 CEST - * - * @author Benjamin POUSSIN <poussin at codelutin.com> - * @version $Revision: 1312 $ - * - * Last update: $Date: 2008-08-28 10:21:07 +0200 (jeu, 28 aoû 2008) $ - * by : $Author: sletellier $ - */ - -/* - * To change this template, choose Tools | Templates - * and open the template in the editor. - */ -/** - * - * @author letellier - */ package fr.ifremer.isisfish.ui.simulator; import static org.codelutin.i18n.I18n._; @@ -51,7 +31,6 @@ import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; -import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Properties; @@ -87,10 +66,21 @@ import fr.ifremer.isisfish.ui.widget.ErrorDialogUI; import fr.ifremer.isisfish.ui.widget.filter.FilterModel; +/** + * SimulAction. + * + * Created: 1 aout 2005 18:37:25 CEST + * + * @author Benjamin POUSSIN <poussin at codelutin.com> + * @version $Revision: 1312 $ + * + * Last update: $Date: 2008-08-28 10:21:07 +0200 (jeu, 28 aoû 2008) $ + * by : $Author: sletellier $ + */ public class SimulAction { /** to use log facility, just put in your code: log.info(\"...\"); */ - static private Log log = LogFactory.getLog(SimulAction.class); + private static Log log = LogFactory.getLog(SimulAction.class); protected SimulationParameter param = null; protected RegionStorage regionStorage = null; protected SimulationStorage simulStorage = null; Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/SimulatorListeners.java =================================================================== --- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/SimulatorListeners.java 2009-02-23 15:26:14 UTC (rev 1861) +++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/SimulatorListeners.java 2009-02-23 15:42:34 UTC (rev 1862) @@ -1,3 +1,22 @@ +/* *##% + * Copyright (C) 2005 - 2009 + * Ifremer, Code Lutin, Cedric Pineau, 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. + *##%*/ + package fr.ifremer.isisfish.ui.simulator; import fr.ifremer.isisfish.simulator.launcher.SimulationService; @@ -13,12 +32,6 @@ import javax.swing.JList; import javax.swing.JTable; import javax.swing.ListModel; -import javax.swing.event.ListSelectionEvent; -import javax.swing.event.ListSelectionListener; -import javax.swing.event.TableModelEvent; -import javax.swing.event.TableModelListener; -import java.beans.PropertyChangeEvent; -import java.beans.PropertyChangeListener; /** * This class contains some listeners used in ui. Some are generics and could @@ -33,7 +46,7 @@ public class SimulatorListeners { /** to use log facility, just put in your code: log.info(\"...\"); */ - static private Log log = LogFactory.getLog(SimulatorListeners.class); + private static Log log = LogFactory.getLog(SimulatorListeners.class); public static void initAnalysePlanButtonsListener(JButton remove, JList list) { initButtonRemoveIfItemSelected(remove, list); Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/ToolTipListModelFactory.java =================================================================== --- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/ToolTipListModelFactory.java 2009-02-23 15:26:14 UTC (rev 1861) +++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/ui/simulator/ToolTipListModelFactory.java 2009-02-23 15:42:34 UTC (rev 1862) @@ -1,3 +1,22 @@ +/* *##% + * Copyright (C) 2005 - 2009 + * Ifremer, Code Lutin, Cedric Pineau, 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. + *##%*/ + package fr.ifremer.isisfish.ui.simulator; import fr.ifremer.isisfish.datastore.AnalysePlanStorage; @@ -31,7 +50,7 @@ public class ToolTipListModelFactory { /** to use log facility, just put in your code: log.info(\"...\"); */ - static private Log log = LogFactory.getLog(SimulAction.class); + private static Log log = LogFactory.getLog(SimulAction.class); /** * Build a new {@link ToolTipListModel} for for @Doc'field of all given @@ -92,8 +111,7 @@ * @param names Export names to use * @return the model builded */ - - static public ToolTipListModel createExportClassDocsModel( + public static ToolTipListModel createExportClassDocsModel( List<String> names) { List<String> texts = new ArrayList<String>(); @@ -127,7 +145,7 @@ * @param names Rule names * @return the model builded */ - static public ToolTipListModel createRuleDescriptionsModel( + public static ToolTipListModel createRuleDescriptionsModel( List<String> names) { List<String> texts = new ArrayList<String>(); @@ -167,7 +185,7 @@ * @param list the list containing the renderer * @return the model builded */ - static public ToolTipListModel createRuleDescriptionsModel2( + public static ToolTipListModel createRuleDescriptionsModel2( List<Rule> rules, JButton clearButton, JList list) { List<String> texts = new ArrayList<String>(); @@ -206,7 +224,7 @@ * @param rules the selected rules (we only use the first one) * @return the model builded */ - static public ToolTipListModel createRuleParamsModel(Collection rules) { + public static ToolTipListModel createRuleParamsModel(Collection rules) { List<String> texts = new ArrayList<String>(); List<String> toolTips = new ArrayList<String>(); @@ -248,7 +266,7 @@ * @return the model builded */ @SuppressWarnings({"unchecked"}) - static public ToolTipListModel createAnalysePlanDescriptionsModel( + public static ToolTipListModel createAnalysePlanDescriptionsModel( List<String> names) { List<String> texts = new ArrayList<String>(); @@ -293,7 +311,7 @@ * @return the model builded */ @SuppressWarnings({"unchecked"}) - static public ToolTipListModel createAnalysePlanDescriptionsModel2( + public static ToolTipListModel createAnalysePlanDescriptionsModel2( List<AnalysePlan> plans, JButton clearButton, JList list) { List<String> texts = new ArrayList<String>(); @@ -333,10 +351,9 @@ * @param analysePlans the selected analyse plan (we only use the first one) * @return the model builded */ - static public ToolTipListModel createAnalysePlanParamsModel( + public static ToolTipListModel createAnalysePlanParamsModel( Collection analysePlans) { - List<String> texts = new ArrayList<String>(); List<String> toolTips = new ArrayList<String>(); if (analysePlans.size() > 0) { @@ -344,7 +361,6 @@ analysePlans.iterator().next()); try { - AnalysePlanStorage storage = AnalysePlanStorage.getAnalysePlan(name); Map<String, Class> mapParams = storage.getParameterNames();
participants (1)
-
chatellier@users.labs.libre-entreprise.org